casa
5.7.0-16
|
This class meant to be used almost identically to an exclusive QActionGroup. More...
#include <QtActionGroup.qo.h>
Public Slots | |
void | setEnabled (bool enabled) |
Sets all actions to enabled. More... | |
void | setDisabled (bool disabled) |
Sets all actions to disabled. More... | |
Signals | |
void | hovered (QAction *action) |
See QActionGroup::hovered(). More... | |
void | triggered (QAction *action) |
See QActionGroup::triggered(). More... | |
void | unchecked () |
This signals is emitted when all actions in the group have been unchecked. More... | |
Public Member Functions | |
QtActionGroup (QObject *parent=NULL) | |
Constructor that optionally takes a parent object. More... | |
~QtActionGroup () | |
Destructor. More... | |
QList< QAction * > | actions () const |
See QActionGroup::actions(). More... | |
QAction * | checkedAction () const |
See QActionGroup::checkedAction(). More... | |
QAction * | addAction (QAction *action) |
See QActionGroup::addAction(). More... | |
void | removeAction (QAction *action) |
See QActionGroup::removeAction(). More... | |
bool | isEnabled () const |
See QActionGroup::isEnabled(). More... | |
void | synchronize (QAction *action, QAbstractButton *button) |
Overrides QtActionSynchronizer::synchronize to only allow actions that are in the group. More... | |
void | synchronize (QAction *action, QAction *otherAction) |
Public Member Functions inherited from casa::QtActionSynchronizer | |
QtActionSynchronizer (QObject *parent=NULL) | |
Constructor which takes an optional parent. More... | |
virtual | ~QtActionSynchronizer () |
Destructor. More... | |
virtual void | unsynchronize (QAction *action) |
Unsynchronizes all buttons/actions associated with the given in this group. More... | |
virtual void | unsynchronize (QAbstractButton *button) |
virtual void | unsynchronize (QAction *action, QAbstractButton *button) |
Unsyncrhonizes the given action in this group with the given button/action. More... | |
virtual void | unsynchronize (QAction *action, QAction *otherAction) |
Private Slots | |
void | actionHovered () |
Slot for QAction::hover(). More... | |
void | actionTriggered (bool checked) |
Slot for QAction::triggered(), which calls actionTriggered_ as needed. More... | |
void | actionToggled (bool checked) |
Slot for QAction::toggled(), which calls actionTriggered_ as needed. More... | |
Private Member Functions | |
void | action_ (QAction *action, bool checked) |
Enforces mutual exclusivity and emits signals as needed. More... | |
Private Attributes | |
bool | isEnabled_ |
Enabled flag. More... | |
QAction * | itsCheckedAction_ |
Currently checked action, or NULL if none are checked. More... | |
QList< QAction * > | itsActions_ |
Actions in group. More... | |
Additional Inherited Members | |
Protected Slots inherited from casa::QtActionSynchronizer | |
virtual void | actionToggled (bool checked) |
Slot for when an action is toggled, which calls actionTriggered_() as needed. More... | |
virtual void | actionTriggered (bool checked) |
Slot for when an action is triggered, which calls actionTriggered_() as needed. More... | |
virtual void | synchronizedToggled (bool checked) |
Slot for when a synchronizing button/action is toggled, which calls synchronizedTriggered_() as needed. More... | |
virtual void | synchronizedTriggered (bool checked) |
Slot for when a synchronizing button/action is clicked/triggered, which calls synchronizedTriggered_() as needed. More... | |
Protected Member Functions inherited from casa::QtActionSynchronizer | |
virtual void | actionTriggered_ (QAction *action, bool checked) |
Method which updates the actions/buttons associated with the given action. More... | |
virtual void | synchronizedTriggered_ (QAction *action, QAbstractButton *button, bool checked) |
Method which updates the action(s) associated with the given action or button to the given checked state. More... | |
Protected Attributes inherited from casa::QtActionSynchronizer | |
QMultiMap< QAction *, QAbstractButton * > | itsSynchedButtons_ |
Synchronized actions maps. More... | |
QMultiMap< QAction *, QAction * > | itsSynchedActions_ |
This class meant to be used almost identically to an exclusive QActionGroup.
The difference is that this class allows all QActions to be unchecked; in other words, either one action is checked or none are. Some methods from QActionGroup have not been included, but they would be easy to include if desired. This class also has the added functionality included in QtActionSynchronnizer.
Definition at line 116 of file QtActionGroup.qo.h.
casa::QtActionGroup::QtActionGroup | ( | QObject * | parent = NULL | ) |
Constructor that optionally takes a parent object.
casa::QtActionGroup::~QtActionGroup | ( | ) |
Destructor.
|
private |
Enforces mutual exclusivity and emits signals as needed.
|
privateslot |
Slot for QAction::hover().
QList<QAction*> casa::QtActionGroup::actions | ( | ) | const |
See QActionGroup::actions().
|
privateslot |
Slot for QAction::toggled(), which calls actionTriggered_ as needed.
|
privateslot |
Slot for QAction::triggered(), which calls actionTriggered_ as needed.
QAction* casa::QtActionGroup::addAction | ( | QAction * | action | ) |
See QActionGroup::addAction().
QAction* casa::QtActionGroup::checkedAction | ( | ) | const |
See QActionGroup::checkedAction().
Will return NULL if no action is currently checked.
|
signal |
See QActionGroup::hovered().
bool casa::QtActionGroup::isEnabled | ( | ) | const |
See QActionGroup::isEnabled().
void casa::QtActionGroup::removeAction | ( | QAction * | action | ) |
See QActionGroup::removeAction().
|
inlineslot |
Sets all actions to disabled.
Definition at line 154 of file QtActionGroup.qo.h.
|
slot |
Sets all actions to enabled.
|
virtual |
Overrides QtActionSynchronizer::synchronize to only allow actions that are in the group.
Reimplemented from casa::QtActionSynchronizer.
|
virtual |
Reimplemented from casa::QtActionSynchronizer.
|
signal |
See QActionGroup::triggered().
|
signal |
This signals is emitted when all actions in the group have been unchecked.
|
private |
Enabled flag.
Definition at line 169 of file QtActionGroup.qo.h.
|
private |
Actions in group.
Definition at line 175 of file QtActionGroup.qo.h.
|
private |
Currently checked action, or NULL if none are checked.
Definition at line 172 of file QtActionGroup.qo.h.