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


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

Inheritance diagram for KWidget\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=73pt]{classKWidgetAction__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KWidget\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=146pt]{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 {\bf KShortcut} \&cut, const {\bf QObject} $\ast$receiver, const char $\ast$slot, {\bf KAction\-Collection} $\ast${\bf parent}, const char $\ast${\bf name})
\item 
{\bf QWidget} $\ast$ {\bf widget} ()
\item 
void {\bf set\-Auto\-Sized} (bool)\label{classKWidgetAction_a3}

\item 
virtual int {\bf plug} ({\bf QWidget} $\ast$widget, int index=-1)
\item 
virtual void {\bf unplug} ({\bf QWidget} $\ast$w)
\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 1262 of file kactionclasses.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 {\bf 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 2004 of file kactionclasses.cpp.

References QObject::connect(), KAction::set\-Enabled(), and widget().

\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 1280 of file kactionclasses.h.

Referenced by KWidget\-Action().\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 widget}, int {\em index} = {\tt -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 2038 of file kactionclasses.cpp.

References QWhats\-This::add(), QObject::connect(), QObject::destroyed(), endl(), KAction::get\-Tool\-Button\-ID(), KTool\-Bar::insert\-Widget(), kd\-Error(), KTool\-Bar::set\-Item\-Auto\-Sized(), and KAction::whats\-This().\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 2069 of file kactionclasses.cpp.

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

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