KToggleAction
#include <KToggleAction>
Protected Slots | |
virtual void | slotToggled (bool checked) |
Protected Member Functions | |
KWIDGETSADDONS_NO_EXPORT | KToggleAction (KToggleActionPrivate &dd, QObject *parent) |
Protected Member Functions inherited from QAction | |
virtual bool | event (QEvent *e) override |
Protected Member Functions inherited from QObject | |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const QMetaMethod &signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const QMetaMethod &signal) |
bool | isSignalConnected (const QMetaMethod &signal) const const |
int | receivers (const char *signal) const const |
QObject * | sender () const const |
int | senderSignalIndex () const const |
virtual void | timerEvent (QTimerEvent *event) |
Protected Attributes | |
std::unique_ptr< class KToggleActionPrivate > const | d_ptr |
Detailed Description
Checkbox like action.
This action provides two states: checked or not.
Definition at line 35 of file ktoggleaction.h.
Constructor & Destructor Documentation
◆ KToggleAction() [1/4]
|
explicit |
Constructs an action with the specified parent.
- Parameters
-
parent The action's parent object.
Definition at line 20 of file ktoggleaction.cpp.
◆ KToggleAction() [2/4]
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 QAction 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 34 of file ktoggleaction.cpp.
◆ KToggleAction() [3/4]
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 QAction 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 44 of file ktoggleaction.cpp.
◆ ~KToggleAction()
|
overridedefault |
Destructor.
◆ KToggleAction() [4/4]
|
protected |
Definition at line 25 of file ktoggleaction.cpp.
Member Function Documentation
◆ setCheckedState()
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 57 of file ktoggleaction.cpp.
◆ slotToggled
|
protectedvirtualslot |
Definition at line 65 of file ktoggleaction.cpp.
Member Data Documentation
◆ d_ptr
Definition at line 98 of file ktoggleaction.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:43 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.