\section{KAction\-Menu Class Reference}
\label{classKActionMenu}\index{KActionMenu@{KActionMenu}}
A KAction\-Menu is an action that holds a sub-menu of other actions.  


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

Inheritance diagram for KAction\-Menu:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=55pt]{classKActionMenu__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KAction\-Menu:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=98pt]{classKActionMenu__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KAction\-Menu} (const {\bf QString} \&text, {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)\label{classKActionMenu_a0}

\item 
{\bf KAction\-Menu} (const {\bf QString} \&text, const {\bf QIcon\-Set} \&icon, {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)\label{classKActionMenu_a1}

\item 
{\bf KAction\-Menu} (const {\bf QString} \&text, const {\bf QString} \&icon, {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)\label{classKActionMenu_a2}

\item 
{\bf KAction\-Menu} ({\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)\label{classKActionMenu_a3}

\item 
virtual void {\bf insert} ({\bf KAction} $\ast$, int index=-1)\label{classKActionMenu_a5}

\item 
virtual void {\bf remove} ({\bf KAction} $\ast$)\label{classKActionMenu_a6}

\item 
{\bf KPopup\-Menu} $\ast$ {\bf popup\-Menu} () const \label{classKActionMenu_a7}

\item 
void {\bf popup} (const {\bf QPoint} \&global)\label{classKActionMenu_a8}

\item 
bool {\bf delayed} () const 
\item 
void {\bf set\-Delayed} (bool \_\-delayed)
\item 
bool {\bf sticky\-Menu} () const 
\item 
void {\bf set\-Sticky\-Menu} (bool sticky)
\item 
virtual int {\bf plug} ({\bf QWidget} $\ast$widget, int index=-1)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKActionMenu_b0}

\end{CompactItemize}
\subsection*{Properties}
\begin{CompactItemize}
\item 
bool {\bf delayed}\label{classKActionMenu_00}

\item 
bool {\bf sticky\-Menu}\label{classKActionMenu_01}

\end{CompactItemize}


\subsection{Detailed Description}
A KAction\-Menu is an action that holds a sub-menu of other actions. 

insert() and remove() allow to insert and remove actions into this action-menu. Plugged in a popupmenu, it will create a submenu. Plugged in a toolbar, it will create a button with a popup menu.

This is the action used by the XMLGUI since it holds other actions. If you want a submenu for selecting one tool among many (without icons), see {\bf KSelect\-Action}{\rm (p.\,\pageref{classKSelectAction})}. See also set\-Delayed about the main action. 



Definition at line 977 of file kactionclasses.h.

\subsection{Member Function Documentation}
\index{KActionMenu@{KAction\-Menu}!delayed@{delayed}}
\index{delayed@{delayed}!KActionMenu@{KAction\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAction\-Menu::delayed () const}\label{classKActionMenu_a9}


Returns true if this action creates a delayed popup menu when plugged in a KToolbar. 



Referenced by plug().\index{KActionMenu@{KAction\-Menu}!setDelayed@{setDelayed}}
\index{setDelayed@{setDelayed}!KActionMenu@{KAction\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAction\-Menu::set\-Delayed (bool {\em \_\-delayed})}\label{classKActionMenu_a10}


If set to true, this action will create a delayed popup menu when plugged in a KToolbar. 

Otherwise it creates a normal popup. Default: delayed

Remember that if the \char`\"{}main\char`\"{} action (the toolbar button itself) cannot be clicked, then you should call set\-Delayed(false).

On the opposite, if the main action can be clicked, it can only happen in a toolbar: in a menu, the parent of a submenu can't be activated. To get a \char`\"{}normal\char`\"{} menu item when plugged a menu (and no submenu) use {\bf KTool\-Bar\-Popup\-Action}{\rm (p.\,\pageref{classKToolBarPopupAction})}. 

Definition at line 1664 of file kactionclasses.cpp.\index{KActionMenu@{KAction\-Menu}!stickyMenu@{stickyMenu}}
\index{stickyMenu@{stickyMenu}!KActionMenu@{KAction\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KAction\-Menu::sticky\-Menu () const}\label{classKActionMenu_a11}


Returns true if this action creates a sticky popup menu. 

See set\-Sticky\-Menu. 

Referenced by plug().\index{KActionMenu@{KAction\-Menu}!setStickyMenu@{setStickyMenu}}
\index{setStickyMenu@{setStickyMenu}!KActionMenu@{KAction\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KAction\-Menu::set\-Sticky\-Menu (bool {\em sticky})}\label{classKActionMenu_a12}


If set to true, this action will create a sticky popup menu when plugged in a KToolbar. 

\char`\"{}Sticky\char`\"{}, means it's visible until a selection is made or the mouse is clicked elsewhere. This feature allows you to make a selection without having to press and hold down the mouse while making a selection. Default: sticky. 

Definition at line 1672 of file kactionclasses.cpp.\index{KActionMenu@{KAction\-Menu}!plug@{plug}}
\index{plug@{plug}!KActionMenu@{KAction\-Menu}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KAction\-Menu::plug ({\bf QWidget} $\ast$ {\em widget}, int {\em index} = {\tt -1})\hspace{0.3cm}{\tt  [virtual]}}\label{classKActionMenu_a13}


\char`\"{}Plug\char`\"{} or insert this action into a given widget. 

This will typically be a menu or a toolbar. From this point on, you will never need to directly manipulate the item in the menu or toolbar. You do all enabling/disabling/manipulation directly with your {\bf KAction}{\rm (p.\,\pageref{classKAction})} object.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em widget}]The GUI element to display this action \item[{\em index}]The position into which the action is plugged. If this is negative, the action is inserted at the end. \end{description}
\end{Desc}


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

Definition at line 1676 of file kactionclasses.cpp.

References QWhats\-This::add(), QObject::connect(), KAction\-Collection::connect\-Highlight(), delayed(), QObject::destroyed(), endl(), KTool\-Bar::get\-Button(), KAction::get\-Tool\-Button\-ID(), KAction::icon\-Set(), KTool\-Bar::insert\-Button(), QMenu\-Bar::insert\-Item(), QPopup\-Menu::insert\-Item(), KGlobal::instance(), KAction\-Collection::instance(), KAction::is\-Enabled(), kd\-Debug(), KTool\-Bar::set\-Delayed\-Popup(), QMenu\-Bar::set\-Item\-Enabled(), QPopup\-Menu::set\-Item\-Enabled(), KTool\-Bar\-Button::set\-Popup(), sticky\-Menu(), KAction::text(), and KAction::whats\-This().

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