The ExclusiveActionGroup class groups multiple QAction's together.
More...
#include <exclusiveactiongroup.h>
Inherits QObject.
The ExclusiveActionGroup class groups multiple QAction's together.
This class is basically the same as QActionGroup (http://doc.qt.io/qt-5/qactiongroup.html). But there is one important difference: When the user clicks on a QAction, that action won't be checked instantly. Instead, this class only emits the signal changeRequestTriggered(). Whether the triggered action actually gets checked or the request is rejected can be decided from outside this class (typically by the state machine of an editor window). To change the selected action, setCurrentAction() needs to be called.
◆ ExclusiveActionGroup() [1/2]
◆ ExclusiveActionGroup() [2/2]
◆ ~ExclusiveActionGroup()
◆ reset()
◆ setEnabled()
void setEnabled |
( |
bool |
enabled | ) |
|
|
noexcept |
◆ addAction()
void addAction |
( |
const QVariant & |
key, |
|
|
QAction * |
action |
|
) |
| |
|
noexcept |
◆ setActionEnabled()
void setActionEnabled |
( |
const QVariant & |
key, |
|
|
bool |
enabled |
|
) |
| |
|
noexcept |
◆ setCurrentAction()
void setCurrentAction |
( |
const QVariant & |
key | ) |
|
|
noexcept |
◆ getCurrentAction()
const QVariant& getCurrentAction |
( |
| ) |
const |
|
inlinenoexcept |
◆ operator=()
◆ changeRequestTriggered
void changeRequestTriggered |
( |
const QVariant & |
key | ) |
|
|
signal |
◆ actionTriggered()
◆ mCurrentAction
◆ mActions
QMap<QVariant, QAction*> mActions |
|
private |
The documentation for this class was generated from the following files: