casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Slots | Signals | Public Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
casa::QtButtonGroup Class Reference

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

#include <QtButtonGroup.qo.h>

Inheritance diagram for casa::QtButtonGroup:

Public Slots

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

Signals

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

Public Member Functions

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

Private Slots

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

Private Member Functions

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

Private Attributes

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

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.

casa::QtButtonGroup::~QtButtonGroup ( )

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)
privateslot

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

bool casa::QtButtonGroup::isEnabled ( ) const

Returns whether this group is enabled or not.

void casa::QtButtonGroup::pressed ( )
privateslot

Slot for QAbstractButton::pressed().

void casa::QtButtonGroup::released ( )
privateslot

Slot for QAbstractButton::released().

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

See QButtonGroup::removeButton().

void casa::QtButtonGroup::setDisabled ( bool  disabled)
inlineslot

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)
privateslot

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

bool casa::QtButtonGroup::isEnabled_
private

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: