\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 $<$kaction.h$>$}

Inheritance diagram for KAction\-Menu:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=59pt]{classKActionMenu__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KAction\-Menu:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=112pt]{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 
\begin{CompactList}\small\item\em Returns true if this action creates a delayed popup menu when plugged in a KToolbar. \item\end{CompactList}\item 
void {\bf set\-Delayed} (bool \_\-delayed)
\begin{CompactList}\small\item\em If set to true, this action will create a delayed popup menu when plugged in a KToolbar. \item\end{CompactList}\item 
bool {\bf sticky\-Menu} () const 
\begin{CompactList}\small\item\em Returns true if this action creates a sticky popup menu. \item\end{CompactList}\item 
void {\bf set\-Sticky\-Menu} (bool sticky)
\begin{CompactList}\small\item\em If set to true, this action will create a sticky popup menu when plugged in a KToolbar. \item\end{CompactList}\item 
virtual int {\bf plug} ({\bf QWidget} $\ast$widget, int index=-1)
\begin{CompactList}\small\item\em \char`\"{}Plug\char`\"{} or insert this action into a given widget. \item\end{CompactList}\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{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 1464 of file kaction.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. 



Definition at line 2640 of file kaction.cpp.

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 2644 of file kaction.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 {\bf set\-Sticky\-Menu}{\rm (p.\,\pageref{classKActionMenu_a12})}. 

Definition at line 2648 of file kaction.cpp.

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 2652 of file kaction.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} = -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 w}]The GUI element to display this action \end{description}
\end{Desc}


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

Definition at line 2656 of file kaction.cpp.

References QWhats\-This::add(), QObject::connect(), delayed(), QObject::destroyed(), KTool\-Bar::get\-Button(), KAction::icon\-Set(), KTool\-Bar::insert\-Button(), QMenu\-Bar::insert\-Item(), QPopup\-Menu::insert\-Item(), KGlobal::instance(), KAction\-Collection::instance(), KNotify\-Client::instance(), QString::is\-Empty(), KAction::is\-Enabled(), QIcon\-Set::is\-Null(), QObject::name(), 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 
kaction.h\item 
kaction.cpp\end{CompactItemize}
