\section{KTool\-Bar\-Popup\-Action Class Reference}
\label{classKToolBarPopupAction}\index{KToolBarPopupAction@{KToolBarPopupAction}}
This action is a normal action everywhere, except in a toolbar where it also has a popupmenu (optionnally delayed).  


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

Inheritance diagram for KTool\-Bar\-Popup\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=75pt]{classKToolBarPopupAction__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KTool\-Bar\-Popup\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=135pt]{classKToolBarPopupAction__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KTool\-Bar\-Popup\-Action} (const {\bf QString} \&text, const {\bf QString} \&icon, const {\bf KShortcut} \&cut={\bf KShortcut}(), {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)
\item 
{\bf KTool\-Bar\-Popup\-Action} (const {\bf QString} \&text, const {\bf QString} \&icon, const {\bf KShortcut} \&cut, const {\bf QObject} $\ast$receiver, const char $\ast$slot, {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)
\item 
{\bf KTool\-Bar\-Popup\-Action} (const {\bf KGui\-Item} \&item, 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 
virtual int {\bf plug} ({\bf QWidget} $\ast$widget, int index=-1)
\item 
{\bf KPopup\-Menu} $\ast$ {\bf popup\-Menu} () const 
\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)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKToolBarPopupAction_b0}

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

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

\end{CompactItemize}


\subsection{Detailed Description}
This action is a normal action everywhere, except in a toolbar where it also has a popupmenu (optionnally delayed). 

This action is designed for history actions (back/forward, undo/redo) and for any other action that has more detail in a toolbar than in a menu (e.g. tool chooser with \char`\"{}Other\char`\"{} leading to a dialog...). 



Definition at line 1050 of file kactionclasses.h.

\subsection{Constructor \& Destructor Documentation}
\index{KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}!KToolBarPopupAction@{KToolBarPopupAction}}
\index{KToolBarPopupAction@{KToolBarPopupAction}!KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar\-Popup\-Action::KTool\-Bar\-Popup\-Action (const {\bf QString} \& {\em text}, const {\bf QString} \& {\em icon}, const {\bf KShortcut} \& {\em cut} = {\tt {\bf KShortcut}()}, {\bf QObject} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKToolBarPopupAction_a0}


Create a KTool\-Bar\-Popup\-Action, with a text, an icon, an optional accelerator, parent and name. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The text that will be displayed. \item[{\em icon}]The icon to display. \item[{\em cut}]The corresponding keyboard accelerator (shortcut). \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 1765 of file kactionclasses.cpp.\index{KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}!KToolBarPopupAction@{KToolBarPopupAction}}
\index{KToolBarPopupAction@{KToolBarPopupAction}!KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar\-Popup\-Action::KTool\-Bar\-Popup\-Action (const {\bf QString} \& {\em text}, const {\bf QString} \& {\em icon}, const {\bf KShortcut} \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf QObject} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKToolBarPopupAction_a1}


Create a KTool\-Bar\-Popup\-Action, with a text, an icon, an accelerator, a slot connected to the action, parent and name. 

If you do not want or have a keyboard accelerator, set the {\tt cut} param to 0.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The text that will be displayed. \item[{\em icon}]The icon to display. \item[{\em cut}]The corresponding keyboard accelerator (shortcut). \item[{\em receiver}]The SLOT's owner. \item[{\em slot}]The SLOT to invoke to execute this action. \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 1776 of file kactionclasses.cpp.\index{KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}!KToolBarPopupAction@{KToolBarPopupAction}}
\index{KToolBarPopupAction@{KToolBarPopupAction}!KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KTool\-Bar\-Popup\-Action::KTool\-Bar\-Popup\-Action (const {\bf KGui\-Item} \& {\em item}, 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{classKToolBarPopupAction_a2}


Create a KTool\-Bar\-Popup\-Action, with a {\bf KGui\-Item}{\rm (p.\,\pageref{classKGuiItem})}, an accelerator, a slot connected to the action, parent and name. 

The text and the icon are taken from the {\bf KGui\-Item}{\rm (p.\,\pageref{classKGuiItem})}.

If you do not want or have a keyboard accelerator, set the {\tt cut} param to 0.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em item}]The text and icon that will be displayed. \item[{\em cut}]The corresponding keyboard accelerator (shortcut). \item[{\em receiver}]The SLOT's owner. \item[{\em slot}]The SLOT to invoke to execute this action. \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 1789 of file kactionclasses.cpp.

\subsection{Member Function Documentation}
\index{KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}!plug@{plug}}
\index{plug@{plug}!KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KTool\-Bar\-Popup\-Action::plug ({\bf QWidget} $\ast$ {\em widget}, int {\em index} = {\tt -1})\hspace{0.3cm}{\tt  [virtual]}}\label{classKToolBarPopupAction_a4}


\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 1822 of file kactionclasses.cpp.

References QWhats\-This::add(), QObject::connect(), delayed(), QObject::destroyed(), KTool\-Bar::get\-Button(), KAction::get\-Tool\-Button\-ID(), KAction::icon\-Set(), KTool\-Bar::insert\-Button(), KGlobal::instance(), KAction\-Collection::instance(), KAction::is\-Enabled(), KAction::plug(), popup\-Menu(), KTool\-Bar::set\-Delayed\-Popup(), KTool\-Bar\-Button::set\-Popup(), KAction::slot\-Button\-Clicked(), sticky\-Menu(), and KAction::whats\-This().\index{KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}!popupMenu@{popupMenu}}
\index{popupMenu@{popupMenu}!KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KPopup\-Menu} $\ast$ KTool\-Bar\-Popup\-Action::popup\-Menu () const}\label{classKToolBarPopupAction_a5}


The popup menu that is shown when clicking (some time) on the toolbar button. 

You may want to plug items into it on creation, or connect to about\-To\-Show for a more dynamic menu. 

Definition at line 1871 of file kactionclasses.cpp.

References m\_\-popup.

Referenced by plug().\index{KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}!delayed@{delayed}}
\index{delayed@{delayed}!KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KTool\-Bar\-Popup\-Action::delayed () const}\label{classKToolBarPopupAction_a6}


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



Referenced by plug().\index{KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}!setDelayed@{setDelayed}}
\index{setDelayed@{setDelayed}!KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Popup\-Action::set\-Delayed (bool {\em delayed})}\label{classKToolBarPopupAction_a7}


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. 

Definition at line 1810 of file kactionclasses.cpp.\index{KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}!stickyMenu@{stickyMenu}}
\index{stickyMenu@{stickyMenu}!KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KTool\-Bar\-Popup\-Action::sticky\-Menu () const}\label{classKToolBarPopupAction_a8}


Returns true if this action creates a sticky popup menu. 

See set\-Sticky\-Menu. 

Referenced by plug().\index{KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}!setStickyMenu@{setStickyMenu}}
\index{setStickyMenu@{setStickyMenu}!KToolBarPopupAction@{KTool\-Bar\-Popup\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KTool\-Bar\-Popup\-Action::set\-Sticky\-Menu (bool {\em sticky})}\label{classKToolBarPopupAction_a9}


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. Only available if {\bf delayed()}{\rm (p.\,\pageref{classKToolBarPopupAction_a6})} is true. Default: sticky. 

Definition at line 1818 of file kactionclasses.cpp.

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