.TH "KActionMenu" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KActionMenu \- A KActionMenu is an action that holds a sub-menu of other actions.  

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

.in +1c
.ti -1c
.RI "\fBKActionMenu\fP (const \fBQString\fP &text, \fBQObject\fP *\fBparent\fP=0, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "\fBKActionMenu\fP (const \fBQString\fP &text, const \fBQIconSet\fP &icon, \fBQObject\fP *\fBparent\fP=0, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "\fBKActionMenu\fP (const \fBQString\fP &text, const \fBQString\fP &icon, \fBQObject\fP *\fBparent\fP=0, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "\fBKActionMenu\fP (\fBQObject\fP *\fBparent\fP=0, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "virtual void \fBinsert\fP (\fBKAction\fP *, int index=-1)"
.br
.ti -1c
.RI "virtual void \fBremove\fP (\fBKAction\fP *)"
.br
.ti -1c
.RI "\fBKPopupMenu\fP * \fBpopupMenu\fP () const "
.br
.ti -1c
.RI "void \fBpopup\fP (const \fBQPoint\fP &global)"
.br
.ti -1c
.RI "bool \fBdelayed\fP () const "
.br
.ti -1c
.RI "void \fBsetDelayed\fP (bool _delayed)"
.br
.ti -1c
.RI "bool \fBstickyMenu\fP () const "
.br
.ti -1c
.RI "void \fBsetStickyMenu\fP (bool sticky)"
.br
.ti -1c
.RI "virtual int \fBplug\fP (\fBQWidget\fP *widget, int index=-1)"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Properties"

.in +1c
.ti -1c
.RI "bool \fBdelayed\fP"
.br
.ti -1c
.RI "bool \fBstickyMenu\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
A KActionMenu 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.
.PP
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 \fBKSelectAction\fP. See also setDelayed about the main action. 
.PP
Definition at line 977 of file kactionclasses.h.
.SH "Member Function Documentation"
.PP 
.SS "bool KActionMenu::delayed () const"
.PP
Returns true if this action creates a delayed popup menu when plugged in a KToolbar. 
.PP
Referenced by plug().
.SS "void KActionMenu::setDelayed (bool _delayed)"
.PP
If set to true, this action will create a delayed popup menu when plugged in a KToolbar. 
.PP
Otherwise it creates a normal popup. Default: delayed
.PP
Remember that if the 'main' action (the toolbar button itself) cannot be clicked, then you should call setDelayed(false).
.PP
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 'normal' menu item when plugged a menu (and no submenu) use \fBKToolBarPopupAction\fP. 
.PP
Definition at line 1664 of file kactionclasses.cpp.
.SS "bool KActionMenu::stickyMenu () const"
.PP
Returns true if this action creates a sticky popup menu. 
.PP
See setStickyMenu. 
.PP
Referenced by plug().
.SS "void KActionMenu::setStickyMenu (bool sticky)"
.PP
If set to true, this action will create a sticky popup menu when plugged in a KToolbar. 
.PP
'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. Default: sticky. 
.PP
Definition at line 1672 of file kactionclasses.cpp.
.SS "int KActionMenu::plug (\fBQWidget\fP * widget, int index = \fC-1\fP)\fC [virtual]\fP"
.PP
'Plug' or insert this action into a given widget. 
.PP
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
\fIwidget\fP The GUI element to display this action 
.br
\fIindex\fP The position into which the action is plugged. If this is negative, the action is inserted at the end. 
.RE
.PP

.PP
Reimplemented from \fBKAction\fP.
.PP
Definition at line 1676 of file kactionclasses.cpp.
.PP
References QWhatsThis::add(), QObject::connect(), KActionCollection::connectHighlight(), delayed(), QObject::destroyed(), endl(), KToolBar::getButton(), KAction::getToolButtonID(), KAction::iconSet(), KToolBar::insertButton(), QMenuBar::insertItem(), QPopupMenu::insertItem(), KGlobal::instance(), KActionCollection::instance(), KAction::isEnabled(), kdDebug(), KToolBar::setDelayedPopup(), QMenuBar::setItemEnabled(), QPopupMenu::setItemEnabled(), KToolBarButton::setPopup(), stickyMenu(), KAction::text(), and KAction::whatsThis().

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