\section{KWidget\-Action Class Reference}
\label{classKWidgetAction}\index{KWidgetAction@{KWidgetAction}}
An action that automatically embeds a widget into a toolbar.  


{\tt \#include $<$kaction.h$>$}

Inheritance diagram for KWidget\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=62pt]{classKWidgetAction__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KWidget\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=163pt]{classKWidgetAction__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KWidget\-Action} ({\bf QWidget} $\ast$widget, const  {\bf QString} \&text, const  KShortcut \&cut, const  {\bf QObject} $\ast$receiver, const  char $\ast$slot, {\bf KAction\-Collection} $\ast${\bf parent}, const  char $\ast${\bf name})
\begin{CompactList}\small\item\em Create an action that will embed widget into a toolbar when plugged. \item\end{CompactList}\item 
{\bf QWidget} $\ast$ {\bf widget} ()
\begin{CompactList}\small\item\em Returns the widget associated with this action. \item\end{CompactList}\item 
void {\bf set\-Auto\-Sized} (bool)\label{classKWidgetAction_a3}

\item 
virtual int {\bf plug} ({\bf QWidget} $\ast$w, int index=-1)
\begin{CompactList}\small\item\em Plug the action. \item\end{CompactList}\item 
virtual void {\bf unplug} ({\bf QWidget} $\ast$w)
\begin{CompactList}\small\item\em Unplug the action. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf slot\-Toolbar\-Destroyed} ()\label{classKWidgetAction_j0}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKWidgetAction_b0}

\end{CompactItemize}


\subsection{Detailed Description}
An action that automatically embeds a widget into a toolbar. 



Definition at line 1696 of file kaction.h.

\subsection{Constructor \& Destructor Documentation}
\index{KWidgetAction@{KWidget\-Action}!KWidgetAction@{KWidgetAction}}
\index{KWidgetAction@{KWidgetAction}!KWidgetAction@{KWidget\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KWidget\-Action::KWidget\-Action ({\bf QWidget} $\ast$ {\em widget}, const {\bf QString} \& {\em text}, const KShortcut \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf KAction\-Collection} $\ast$ {\em parent}, const char $\ast$ {\em name})}\label{classKWidgetAction_a0}


Create an action that will embed widget into a toolbar when plugged. 

This action may only be plugged into a toolbar. 

Definition at line 2914 of file kaction.cpp.

References KStd\-Accel::cut(), and KStd\-Accel::name().

\subsection{Member Function Documentation}
\index{KWidgetAction@{KWidget\-Action}!widget@{widget}}
\index{widget@{widget}!KWidgetAction@{KWidget\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QWidget}$\ast$ KWidget\-Action::widget ()\hspace{0.3cm}{\tt  [inline]}}\label{classKWidgetAction_a2}


Returns the widget associated with this action. 



Definition at line 1714 of file kaction.h.\index{KWidgetAction@{KWidget\-Action}!plug@{plug}}
\index{plug@{plug}!KWidgetAction@{KWidget\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KWidget\-Action::plug ({\bf QWidget} $\ast$ {\em w}, int {\em index} = -1)\hspace{0.3cm}{\tt  [virtual]}}\label{classKWidgetAction_a4}


Plug the action. 

The widget passed to the constructor will be reparented to w, which must inherit {\bf KTool\-Bar}{\rm (p.\,\pageref{classKToolBar})}. 

Reimplemented from {\bf KAction} {\rm (p.\,\pageref{classKAction_a12})}.

Definition at line 2947 of file kaction.cpp.

References QObject::connect(), QObject::destroyed(), KTool\-Bar::insert\-Widget(), QObject::name(), and KTool\-Bar::set\-Item\-Auto\-Sized().\index{KWidgetAction@{KWidget\-Action}!unplug@{unplug}}
\index{unplug@{unplug}!KWidgetAction@{KWidget\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KWidget\-Action::unplug ({\bf QWidget} $\ast$ {\em w})\hspace{0.3cm}{\tt  [virtual]}}\label{classKWidgetAction_a5}


Unplug the action. 

Ensures that the action is not destroyed. It will be hidden and reparented to 0L instead. 

Reimplemented from {\bf KAction} {\rm (p.\,\pageref{classKAction_a14})}.

Definition at line 2977 of file kaction.cpp.

References QObject::disconnect(), KAction::is\-Plugged(), and KAction::unplug().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kaction.h\item 
kaction.cpp\end{CompactItemize}
