casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes
casa::QtActionGroup Class Reference

This class meant to be used almost identically to an exclusive QActionGroup. More...

#include <QtActionGroup.qo.h>

Inheritance diagram for casa::QtActionGroup:
casa::QtActionSynchronizer

List of all members.

Public Slots

void setEnabled (bool enabled)
 
     

void setDisabled (bool disabled)
 Sets all actions to disabled.

Signals

void hovered (QAction *action)
 See QActionGroup::hovered().
void triggered (QAction *action)
 See QActionGroup::triggered().
void unchecked ()
 This signals is emitted when all actions in the group have been unchecked.

Public Member Functions

 QtActionGroup (QObject *parent=NULL)
 Constructor that optionally takes a parent object.
 ~QtActionGroup ()
 Destructor.
QList< QAction * > actions () const
 See QActionGroup::actions().
QAction * checkedAction () const
 See QActionGroup::checkedAction().
QAction * addAction (QAction *action)
 See QActionGroup::addAction().
void removeAction (QAction *action)
 See QActionGroup::removeAction().
bool isEnabled () const
 See QActionGroup::isEnabled().
void synchronize (QAction *action, QAbstractButton *button)
 Overrides QtActionSynchronizer::synchronize to only allow actions that are in the group.
void synchronize (QAction *action, QAction *otherAction)

Private Slots

void actionHovered ()
 Slot for QAction::hover().
void actionTriggered (bool checked)
 Slot for QAction::triggered(), which calls actionTriggered_ as needed.
void actionToggled (bool checked)
 Slot for QAction::toggled(), which calls actionTriggered_ as needed.

Private Member Functions

void action_ (QAction *action, bool checked)
 Enforces mutual exclusivity and emits signals as needed.

Private Attributes

bool isEnabled_
 Enabled flag.
QAction * itsCheckedAction_
 Currently checked action, or NULL if none are checked.
QList< QAction * > itsActions_
 Actions in group.

Detailed Description

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.


Constructor & Destructor Documentation

casa::QtActionGroup::QtActionGroup ( QObject *  parent = NULL)

Constructor that optionally takes a parent object.

Destructor.


Member Function Documentation

void casa::QtActionGroup::action_ ( QAction *  action,
bool  checked 
) [private]

Enforces mutual exclusivity and emits signals as needed.

void casa::QtActionGroup::actionHovered ( ) [private, slot]

Slot for QAction::hover().

QList<QAction*> casa::QtActionGroup::actions ( ) const

See QActionGroup::actions().

void casa::QtActionGroup::actionToggled ( bool  checked) [private, virtual, slot]

Slot for QAction::toggled(), which calls actionTriggered_ as needed.

Reimplemented from casa::QtActionSynchronizer.

void casa::QtActionGroup::actionTriggered ( bool  checked) [private, virtual, slot]

Slot for QAction::triggered(), which calls actionTriggered_ as needed.

Reimplemented from casa::QtActionSynchronizer.

QAction* casa::QtActionGroup::addAction ( QAction *  action)

See QActionGroup::addAction().

See QActionGroup::checkedAction().

Will return NULL if no action is currently checked.

void casa::QtActionGroup::hovered ( QAction *  action) [signal]

See QActionGroup::hovered().

See QActionGroup::isEnabled().

void casa::QtActionGroup::removeAction ( QAction *  action)

See QActionGroup::removeAction().

void casa::QtActionGroup::setDisabled ( bool  disabled) [inline, slot]

Sets all actions to disabled.

Definition at line 154 of file QtActionGroup.qo.h.

void casa::QtActionGroup::setEnabled ( bool  enabled) [slot]

     

Sets all actions to enabled.

void casa::QtActionGroup::synchronize ( QAction *  action,
QAbstractButton *  button 
) [virtual]

Overrides QtActionSynchronizer::synchronize to only allow actions that are in the group.

Reimplemented from casa::QtActionSynchronizer.

void casa::QtActionGroup::synchronize ( QAction *  action,
QAction *  otherAction 
) [virtual]

Reimplemented from casa::QtActionSynchronizer.

void casa::QtActionGroup::triggered ( QAction *  action) [signal]

See QActionGroup::triggered().

void casa::QtActionGroup::unchecked ( ) [signal]

This signals is emitted when all actions in the group have been unchecked.


Member Data Documentation

Enabled flag.

Definition at line 169 of file QtActionGroup.qo.h.

QList<QAction*> casa::QtActionGroup::itsActions_ [private]

Actions in group.

Definition at line 175 of file QtActionGroup.qo.h.

Currently checked action, or NULL if none are checked.

Definition at line 172 of file QtActionGroup.qo.h.


The documentation for this class was generated from the following file: