.TH "KToolBarPopupAction" 3 "28 Jan 2004" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KToolBarPopupAction \- This action is a normal action everywhere, except in a toolbar where it also has a popupmenu (optionnally delayed).  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kaction.h>\fP
.PP
Inherits \fBKAction\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKToolBarPopupAction\fP (const  \fBQString\fP &text, const  \fBQString\fP &icon, const  KShortcut &cut=KShortcut(), \fBQObject\fP *\fBparent\fP=0, const  char *\fBname\fP=0)"
.br
.RI "\fICreate a KToolBarPopupAction, with a text, an icon, an optionnal accelerator, parent and name. \fP"
.ti -1c
.RI "\fBKToolBarPopupAction\fP (const  \fBQString\fP &text, const  \fBQString\fP &icon, const  KShortcut &cut, const  \fBQObject\fP *receiver, const  char *slot, \fBQObject\fP *\fBparent\fP=0, const  char *\fBname\fP=0)"
.br
.RI "\fICreate a KToolBarPopupAction, with a text, an icon, an accelerator, a slot connected to the action, parent and name. \fP"
.ti -1c
.RI "\fBKToolBarPopupAction\fP (const  KGuiItem &item, const  KShortcut &cut, const  \fBQObject\fP *receiver, const  char *slot, \fBKActionCollection\fP *\fBparent\fP, const  char *\fBname\fP)"
.br
.RI "\fICreate a KToolBarPopupAction, with a KGuiItem, an accelerator, a slot connected to the action, parent and name. \fP"
.ti -1c
.RI "virtual int \fBplug\fP (\fBQWidget\fP *widget, int index=-1)"
.br
.RI "\fI'Plug' or insert this action into a given widget. \fP"
.ti -1c
.RI "\fBKPopupMenu\fP * \fBpopupMenu\fP () const "
.br
.RI "\fIThe popup menu that is shown when clicking (some time) on the toolbar button. \fP"
.ti -1c
.RI "bool \fBdelayed\fP () const "
.br
.RI "\fIReturns true if this action creates a delayed popup menu when plugged in a KToolbar. \fP"
.ti -1c
.RI "void \fBsetDelayed\fP (bool delayed)"
.br
.RI "\fIIf set to true, this action will create a delayed popup menu when plugged in a KToolbar. \fP"
.ti -1c
.RI "bool \fBstickyMenu\fP () const "
.br
.RI "\fIReturns true if this action creates a sticky popup menu. \fP"
.ti -1c
.RI "void \fBsetStickyMenu\fP (bool sticky)"
.br
.RI "\fIIf set to true, this action will create a sticky popup menu when plugged in a KToolbar. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
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 'Other' leading to a dialog...). 
.PP
Definition at line 1537 of file kaction.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KToolBarPopupAction::KToolBarPopupAction (const \fBQString\fP & text, const \fBQString\fP & icon, const KShortcut & cut = KShortcut(), \fBQObject\fP * parent = 0, const char * name = 0)"
.PP
Create a KToolBarPopupAction, with a text, an icon, an optionnal accelerator, parent and name. \fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIicon\fP The icon to display. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.RE
.PP
Definition at line 2738 of file kaction.cpp.
.PP
References KStdAccel::cut(), and KStdAccel::name().
.SS "KToolBarPopupAction::KToolBarPopupAction (const \fBQString\fP & text, const \fBQString\fP & icon, const KShortcut & cut, const \fBQObject\fP * receiver, const char * slot, \fBQObject\fP * parent = 0, const char * name = 0)"
.PP
Create a KToolBarPopupAction, 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 \fCcut\fP param to 0.
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIicon\fP The icon to display. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIreceiver\fP The SLOT's owner. 
.br
\fIslot\fP The SLOT to invoke to execute this action. 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.RE
.PP
Definition at line 2749 of file kaction.cpp.
.PP
References KStdAccel::cut(), and KStdAccel::name().
.SS "KToolBarPopupAction::KToolBarPopupAction (const KGuiItem & item, const KShortcut & cut, const \fBQObject\fP * receiver, const char * slot, \fBKActionCollection\fP * parent, const char * name)"
.PP
Create a KToolBarPopupAction, with a KGuiItem, an accelerator, a slot connected to the action, parent and name. The text and the icon are taken from the KGuiItem.
.PP
If you do not want or have a keyboard accelerator, set the \fCcut\fP param to 0.
.PP
\fBParameters:\fP
.RS 4
\fIitem\fP The text and icon that will be displayed. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIreceiver\fP The SLOT's owner. 
.br
\fIslot\fP The SLOT to invoke to execute this action. 
.br
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.RE
.PP
Definition at line 2762 of file kaction.cpp.
.PP
References KStdAccel::cut(), and KStdAccel::name().
.SH "Member Function Documentation"
.PP 
.SS "int KToolBarPopupAction::plug (\fBQWidget\fP * widget, int index = -1)\fC [virtual]\fP"
.PP
'Plug' 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 \fBKAction\fP object.
.PP
\fBParameters:\fP
.RS 4
\fIw\fP The GUI element to display this action 
.RE
.PP
Reimplemented from \fBKAction\fP.
.PP
Definition at line 2796 of file kaction.cpp.
.PP
References QWhatsThis::add(), QObject::connect(), delayed(), QObject::destroyed(), KToolBar::getButton(), KToolBar::insertButton(), KGlobal::instance(), KActionCollection::instance(), KNotifyClient::instance(), QString::isEmpty(), KAction::isEnabled(), QObject::name(), KAction::plug(), popupMenu(), KToolBar::setDelayedPopup(), KToolBarButton::setPopup(), stickyMenu(), and KAction::whatsThis().
.SS "\fBKPopupMenu\fP * KToolBarPopupAction::popupMenu () const"
.PP
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 aboutToShow for a more dynamic menu. Definition at line 2837 of file kaction.cpp.
.PP
References m_popup.
.PP
Referenced by plug().
.SS "bool KToolBarPopupAction::delayed () const"
.PP
Returns true if this action creates a delayed popup menu when plugged in a KToolbar. Definition at line 2780 of file kaction.cpp.
.PP
Referenced by plug().
.SS "void KToolBarPopupAction::setDelayed (bool delayed)"
.PP
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.
.SS "bool KToolBarPopupAction::stickyMenu () const"
.PP
Returns true if this action creates a sticky popup menu. See \fBsetStickyMenu\fP. Definition at line 2788 of file kaction.cpp.
.PP
Referenced by plug().
.SS "void KToolBarPopupAction::setStickyMenu (bool sticky)"
.PP
If set to true, this action will create a sticky popup menu when plugged in a KToolbar. 'Sticky', 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 \fBdelayed()\fP is true. Default: sticky. Definition at line 2792 of file kaction.cpp.

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
