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::QtButtonGroup Class Reference

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

#include <QtButtonGroup.qo.h>

List of all members.

Public Slots

void setEnabled (bool enabled)
 Sets all buttons to enabled.
void setDisabled (bool disabled)
 Sets all buttons to disabled.

Signals

void buttonClicked (QAbstractButton *button)
 See QButtonGroup::buttonClicked().
void buttonPressed (QAbstractButton *button)
 See QButtonGroup::buttonPressed().
void buttonReleased (QAbstractButton *button)
 See QButtonGroup::buttonReleased().
void unchecked ()
 This signals is emitted when all buttons in the group have been unchecked.

Public Member Functions

 QtButtonGroup (QObject *parent)
 Constructor that takes optional parent object.
 ~QtButtonGroup ()
 Destructor.
QList< QAbstractButton * > buttons () const
 See QButtonGroup::buttons().
QAbstractButton * checkedButton () const
 See QButtonGroup::checkedButton().
void addButton (QAbstractButton *button)
 See QButtonGroup::addButton().
void removeButton (QAbstractButton *button)
 See QButtonGroup::removeButton().
bool isEnabled () const
 Returns whether this group is enabled or not.

Private Slots

void clicked (bool checked)
 Slot for QAbstractButton::clicked(), which calls toggled_() as needed.
void toggled (bool checked)
 Slot for QAbstractButton::toggled(), which calls toggled_() as needed.
void pressed ()
 Slot for QAbstractButton::pressed().
void released ()
 Slot for QAbstractButton::released().

Private Member Functions

void toggled_ (QAbstractButton *button, bool checked)
 Method for when a button is the group is checked or toggled.

Private Attributes

bool isEnabled_
 Enabled flag.
QAbstractButton * itsCheckedButton_
 Currently checked button, or NULL if none are checked.
QList< QAbstractButton * > itsButtons_
 Buttons in group.

Detailed Description

This class meant to be used almost identically to an exclusive QButtonGroup.

The difference is that this class allows all QAbstractButtons to be unchecked; in other words, either one button is checked or none are. Some methods from QButtonGroup have not been included, but they would be easy to include if desired.

Definition at line 39 of file QtButtonGroup.qo.h.


Constructor & Destructor Documentation

casa::QtButtonGroup::QtButtonGroup ( QObject *  parent)

Constructor that takes optional parent object.

Destructor.


Member Function Documentation

void casa::QtButtonGroup::addButton ( QAbstractButton *  button)

See QButtonGroup::addButton().

void casa::QtButtonGroup::buttonClicked ( QAbstractButton *  button) [signal]

See QButtonGroup::buttonClicked().

void casa::QtButtonGroup::buttonPressed ( QAbstractButton *  button) [signal]

See QButtonGroup::buttonPressed().

void casa::QtButtonGroup::buttonReleased ( QAbstractButton *  button) [signal]

See QButtonGroup::buttonReleased().

QList<QAbstractButton*> casa::QtButtonGroup::buttons ( ) const

See QButtonGroup::buttons().

QAbstractButton* casa::QtButtonGroup::checkedButton ( ) const

See QButtonGroup::checkedButton().

Will return NULL if no button is currently checked.

void casa::QtButtonGroup::clicked ( bool  checked) [private, slot]

Slot for QAbstractButton::clicked(), which calls toggled_() as needed.

Returns whether this group is enabled or not.

void casa::QtButtonGroup::pressed ( ) [private, slot]

Slot for QAbstractButton::pressed().

void casa::QtButtonGroup::released ( ) [private, slot]

Slot for QAbstractButton::released().

void casa::QtButtonGroup::removeButton ( QAbstractButton *  button)

See QButtonGroup::removeButton().

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

Sets all buttons to disabled.

Definition at line 71 of file QtButtonGroup.qo.h.

References setEnabled().

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

Sets all buttons to enabled.

Referenced by setDisabled().

void casa::QtButtonGroup::toggled ( bool  checked) [private, slot]

Slot for QAbstractButton::toggled(), which calls toggled_() as needed.

void casa::QtButtonGroup::toggled_ ( QAbstractButton *  button,
bool  checked 
) [private]

Method for when a button is the group is checked or toggled.

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

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


Member Data Documentation

Enabled flag.

Definition at line 89 of file QtButtonGroup.qo.h.

QList<QAbstractButton*> casa::QtButtonGroup::itsButtons_ [private]

Buttons in group.

Definition at line 95 of file QtButtonGroup.qo.h.

QAbstractButton* casa::QtButtonGroup::itsCheckedButton_ [private]

Currently checked button, or NULL if none are checked.

Definition at line 92 of file QtButtonGroup.qo.h.


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