KDEUI
#include <ktoggleaction.h>
Protected Slots | |
virtual void | slotToggled (bool checked) |
Additional Inherited Members | |
Public Types inherited from KAction | |
enum | GlobalShortcutLoading { Autoloading = 0x0, NoAutoloading = 0x4 } |
enum | ShortcutType { ActiveShortcut = 0x1, DefaultShortcut = 0x2 } |
Signals inherited from KAction | |
void | authorized (KAuth::Action *action) |
void | globalShortcutChanged (const QKeySequence &) |
void | triggered (Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) |
Properties inherited from KAction | |
KShortcut | globalShortcut |
bool | globalShortcutAllowed |
bool | globalShortcutEnabled |
KShortcut | shortcut |
bool | shortcutConfigurable |
Detailed Description
Checkbox like action.
This action provides two states: checked or not.
Definition at line 40 of file ktoggleaction.h.
Constructor & Destructor Documentation
|
explicit |
Constructs an action with the specified parent.
- Parameters
-
parent The action's parent object.
Definition at line 60 of file ktoggleaction.cpp.
Constructs an action with text; a shortcut may be specified by the ampersand character (e.g.
"&Option" creates a shortcut with key O )
This is the most common KAction used when you do not have a corresponding icon (note that it won't appear in the current version of the "Edit ToolBar" dialog, because an action needs an icon to be plugged in a toolbar...).
- Parameters
-
text The text that will be displayed. parent The action's parent object.
Definition at line 67 of file ktoggleaction.cpp.
Constructs an action with text and an icon; a shortcut may be specified by the ampersand character (e.g.
"&Option" creates a shortcut with key O )
This is the other common KAction used. Use it when you do have a corresponding icon.
- Parameters
-
icon The icon to display. text The text that will be displayed. parent The action's parent object.
Definition at line 74 of file ktoggleaction.cpp.
|
virtual |
Destructor.
Definition at line 81 of file ktoggleaction.cpp.
Member Function Documentation
void KToggleAction::setCheckedState | ( | const KGuiItem & | checkedItem | ) |
Defines the text (and icon, tooltip, whatsthis) that should be displayed instead of the normal text, when the action is checked.
Note that this does not replace the check box in front of the menu. So you should not use it to replace the text "Show <foo>" with "Hide <foo>", for example.
If hasIcon(), the icon is kept for the 'checked state', unless checkedItem
defines an icon explicitly. Same thing for tooltip and whatsthis.
Definition at line 87 of file ktoggleaction.cpp.
|
protectedvirtualslot |
Definition at line 93 of file ktoggleaction.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:49:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.