.TH "KToggleAction" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KToggleAction \- Checkbox like action.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kactionclasses.h>\fP
.PP
Inherits \fBKAction\fP.
.PP
Inherited by \fBKRadioAction\fP, \fBKToggleFullScreenAction\fP, and \fBKToggleToolBarAction\fP.
.PP
.SS "Public Slots"

.in +1c
.ti -1c
.RI "virtual void \fBsetChecked\fP (bool)"
.br
.in -1c
.SS "Signals"

.in +1c
.ti -1c
.RI "void \fBtoggled\fP (bool)"
.br
.in -1c
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKToggleAction\fP (const \fBQString\fP &text, const \fBKShortcut\fP &cut=\fBKShortcut\fP(), \fBQObject\fP *\fBparent\fP=0, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "\fBKToggleAction\fP (const \fBQString\fP &text, const \fBKShortcut\fP &cut, const \fBQObject\fP *receiver, const char *slot, \fBQObject\fP *\fBparent\fP, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "\fBKToggleAction\fP (const \fBQString\fP &text, const \fBQIconSet\fP &pix, const \fBKShortcut\fP &cut=\fBKShortcut\fP(), \fBQObject\fP *\fBparent\fP=0, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "\fBKToggleAction\fP (const \fBQString\fP &text, const \fBQString\fP &pix, const \fBKShortcut\fP &cut=\fBKShortcut\fP(), \fBQObject\fP *\fBparent\fP=0, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "\fBKToggleAction\fP (const \fBQString\fP &text, const \fBQIconSet\fP &pix, const \fBKShortcut\fP &cut, const \fBQObject\fP *receiver, const char *slot, \fBQObject\fP *\fBparent\fP, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "\fBKToggleAction\fP (const \fBQString\fP &text, const \fBQString\fP &pix, const \fBKShortcut\fP &cut, const \fBQObject\fP *receiver, const char *slot, \fBQObject\fP *\fBparent\fP, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "\fBKToggleAction\fP (\fBQObject\fP *\fBparent\fP=0, const char *\fBname\fP=0)"
.br
.ti -1c
.RI "virtual \fB~KToggleAction\fP ()"
.br
.ti -1c
.RI "virtual int \fBplug\fP (\fBQWidget\fP *widget, int index=-1)"
.br
.ti -1c
.RI "bool \fBisChecked\fP () const "
.br
.ti -1c
.RI "\fBQString\fP \fBexclusiveGroup\fP () const "
.br
.ti -1c
.RI "virtual void \fBsetExclusiveGroup\fP (const \fBQString\fP &\fBname\fP)"
.br
.ti -1c
.RI "void \fBsetCheckedState\fP (const \fBKGuiItem\fP &checkedItem)"
.br
.ti -1c
.RI "virtual \fBQString\fP \fBtoolTip\fP () const "
.br
.in -1c
.SS "Protected Slots"

.in +1c
.ti -1c
.RI "virtual void \fBslotActivated\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

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

.in +1c
.ti -1c
.RI "bool \fBchecked\fP"
.br
.ti -1c
.RI "\fBQString\fP \fBexclusiveGroup\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
Checkbox like action. 

Checkbox like action.
.PP
This action provides two states: checked or not. 
.PP
Definition at line 68 of file kactionclasses.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KToggleAction::KToggleAction (const \fBQString\fP & text, const \fBKShortcut\fP & cut = \fC\fBKShortcut\fP()\fP, \fBQObject\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
Constructs a toggle action with text and potential keyboard accelerator but nothing else. 
.PP
Use this only if you really know what you are doing.
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.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

.PP
Definition at line 70 of file kactionclasses.cpp.
.SS "KToggleAction::KToggleAction (const \fBQString\fP & text, const \fBKShortcut\fP & cut, const \fBQObject\fP * receiver, const char * slot, \fBQObject\fP * parent, const char * name = \fC0\fP)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIreceiver\fP The SLOT's parent. 
.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

.PP
Definition at line 78 of file kactionclasses.cpp.
.SS "KToggleAction::KToggleAction (const \fBQString\fP & text, const \fBQIconSet\fP & pix, const \fBKShortcut\fP & cut = \fC\fBKShortcut\fP()\fP, \fBQObject\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIpix\fP The icons that go with this action. 
.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

.PP
Definition at line 86 of file kactionclasses.cpp.
.SS "KToggleAction::KToggleAction (const \fBQString\fP & text, const \fBQString\fP & pix, const \fBKShortcut\fP & cut = \fC\fBKShortcut\fP()\fP, \fBQObject\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIpix\fP The dynamically loaded icon that goes with this action. 
.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

.PP
Definition at line 94 of file kactionclasses.cpp.
.SS "KToggleAction::KToggleAction (const \fBQString\fP & text, const \fBQIconSet\fP & pix, const \fBKShortcut\fP & cut, const \fBQObject\fP * receiver, const char * slot, \fBQObject\fP * parent, const char * name = \fC0\fP)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIpix\fP The icons that go with this action. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIreceiver\fP The SLOT's parent. 
.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

.PP
Definition at line 102 of file kactionclasses.cpp.
.SS "KToggleAction::KToggleAction (const \fBQString\fP & text, const \fBQString\fP & pix, const \fBKShortcut\fP & cut, const \fBQObject\fP * receiver, const char * slot, \fBQObject\fP * parent, const char * name = \fC0\fP)"
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The text that will be displayed. 
.br
\fIpix\fP The dynamically loaded icon that goes with this action. 
.br
\fIcut\fP The corresponding keyboard accelerator (shortcut). 
.br
\fIreceiver\fP The SLOT's parent. 
.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

.PP
Definition at line 112 of file kactionclasses.cpp.
.SS "KToggleAction::KToggleAction (\fBQObject\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP This action's parent. 
.br
\fIname\fP An internal name for this action. 
.RE
.PP

.PP
Definition at line 122 of file kactionclasses.cpp.
.SS "KToggleAction::~\fBKToggleAction\fP ()\fC [virtual]\fP"
.PP
Destructor. 
.PP
Definition at line 128 of file kactionclasses.cpp.
.SH "Member Function Documentation"
.PP 
.SS "int KToggleAction::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 KToggleAction object.
.PP
\fBParameters:\fP
.RS 4
\fIwidget\fP The GUI element to display this action. 
.br
\fIindex\fP The index of the item. 
.RE
.PP

.PP
Reimplemented from \fBKAction\fP.
.PP
Reimplemented in \fBKToggleToolBarAction\fP.
.PP
Definition at line 134 of file kactionclasses.cpp.
.PP
References endl(), isChecked(), kdWarning(), KAction::plug(), KToolBar::setButton(), and KToolBar::setToggle().
.PP
Referenced by KToggleToolBarAction::plug().
.SS "bool KToggleAction::isChecked () const"
.PP
Returns the actual state of the action. 
.PP
Definition at line 234 of file kactionclasses.cpp.
.PP
Referenced by plug(), and setChecked().
.SS "\fBQString\fP KToggleAction::exclusiveGroup () const"
.PP
\fBReturns:\fP
.RS 4
which 'exclusive group' this action is part of. 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBsetExclusiveGroup\fP 
.RE
.PP

.PP
Referenced by setChecked().
.SS "void KToggleAction::setExclusiveGroup (const \fBQString\fP & name)\fC [virtual]\fP"
.PP
Defines which 'exclusive group' this action is part of. 
.PP
In a given exclusive group, only one toggle action can be checked at a any moment. Checking an action unchecks the other actions of the group. 
.PP
Definition at line 239 of file kactionclasses.cpp.
.SS "void KToggleAction::setCheckedState (const \fBKGuiItem\fP & checkedItem)"
.PP
Defines the text (and icon, tooltip, whatsthis) that should be displayed instead of the normal text, when the action is checked. 
.PP
This feature replaces the checkmark that usually appears in front of the text, in menus. It is useful when the text is mainly a verb: e.g. 'Show <foo>' should turn into 'Hide <foo>' when activated.
.PP
If hasIcon(), the icon is kept for the 'checked state', unless \fCcheckedItem\fP defines an icon explicitely. Same thing for tooltip and whatsthis. 
.PP
\fBSince:\fP
.RS 4
3.3 
.RE
.PP

.PP
Definition at line 249 of file kactionclasses.cpp.
.PP
Referenced by KStdAction::showMenubar(), and KStdAction::showStatusbar().
.SS "\fBQString\fP KToggleAction::toolTip () const\fC [virtual]\fP"
.PP
Reimplemented for internal reasons. 
.PP
Reimplemented from \fBKAction\fP.
.PP
Definition at line 255 of file kactionclasses.cpp.
.PP
References KAction::toolTip().
.SS "void KToggleAction::setChecked (bool)\fC [virtual, slot]\fP"
.PP
Sets the state of the action. 
.PP
Reimplemented in \fBKToggleToolBarAction\fP, and \fBKToggleFullScreenAction\fP.
.PP
Definition at line 161 of file kactionclasses.cpp.
.PP
References exclusiveGroup(), isChecked(), QObject::parent(), and toggled().
.PP
Referenced by KStdAction::create(), KToggleFullScreenAction::setChecked(), KToggleToolBarAction::setChecked(), KStdAction::showMenubar(), KStdAction::showStatusbar(), and KStdAction::showToolbar().

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