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

Inheritance diagram for KTool\-Bar\-Popup\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=80pt]{classKToolBarPopupAction__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KTool\-Bar\-Popup\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=143pt]{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  KShortcut \&cut=KShortcut(), {\bf QObject} $\ast${\bf parent}=0, const  char $\ast${\bf name}=0)
\begin{CompactList}\small\item\em Create a KTool\-Bar\-Popup\-Action, with a text, an icon, an optionnal accelerator, parent and name. \item\end{CompactList}\item 
{\bf KTool\-Bar\-Popup\-Action} (const  {\bf QString} \&text, const  {\bf QString} \&icon, const  KShortcut \&cut, const  {\bf QObject} $\ast$receiver, const  char $\ast$slot, {\bf QObject} $\ast${\bf parent}=0, const  char $\ast${\bf name}=0)
\begin{CompactList}\small\item\em Create a KTool\-Bar\-Popup\-Action, with a text, an icon, an accelerator, a slot connected to the action, parent and name. \item\end{CompactList}\item 
{\bf KTool\-Bar\-Popup\-Action} (const  KGui\-Item \&item, 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 a KTool\-Bar\-Popup\-Action, with a KGui\-Item, an accelerator, a slot connected to the action, parent and name. \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}\item 
{\bf KPopup\-Menu} $\ast$ {\bf popup\-Menu} () const 
\begin{CompactList}\small\item\em The popup menu that is shown when clicking (some time) on the toolbar button. \item\end{CompactList}\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}\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{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 1537 of file kaction.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 KShortcut \& {\em cut} = KShortcut(), {\bf QObject} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0)}\label{classKToolBarPopupAction_a0}


Create a KTool\-Bar\-Popup\-Action, with a text, an icon, an optionnal 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 2738 of file kaction.cpp.

References KStd\-Accel::cut(), and KStd\-Accel::name().\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 KShortcut \& {\em cut}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot}, {\bf QObject} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 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 2749 of file kaction.cpp.

References KStd\-Accel::cut(), and KStd\-Accel::name().\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 KGui\-Item \& {\em item}, 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{classKToolBarPopupAction_a2}


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

The text and the icon are taken from the KGui\-Item.

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 2762 of file kaction.cpp.

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

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


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

Definition at line 2796 of file kaction.cpp.

References QWhats\-This::add(), QObject::connect(), delayed(), QObject::destroyed(), KTool\-Bar::get\-Button(), KTool\-Bar::insert\-Button(), KGlobal::instance(), KAction\-Collection::instance(), KNotify\-Client::instance(), QString::is\-Empty(), KAction::is\-Enabled(), QObject::name(), KAction::plug(), popup\-Menu(), KTool\-Bar::set\-Delayed\-Popup(), KTool\-Bar\-Button::set\-Popup(), 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 2837 of file kaction.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. 



Definition at line 2780 of file kaction.cpp.

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

Definition at line 2788 of file kaction.cpp.

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 2792 of file kaction.cpp.

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