CTK  0.1.0
The Common Toolkit is a community effort to provide support code for medical image analysis, surgical navigation, and related projects.
Public Slots | Public Member Functions | Protected Slots | Protected Attributes | List of all members
ctkButtonGroup Class Reference

#include <Libs/Widgets/ctkButtonGroup.h>

Inheritance diagram for ctkButtonGroup:
Inheritance graph
[legend]
Collaboration diagram for ctkButtonGroup:
Collaboration graph
[legend]

Public Slots

void setChecked (QAbstractButton *button, bool checked=true)
 Check or uncheck the button. More...
 

Public Member Functions

 ctkButtonGroup (QObject *_parent=0)
 
virtual ~ctkButtonGroup ()
 

Protected Slots

void onButtonClicked (int button)
 
void onButtonPressed (int button)
 

Protected Attributes

QScopedPointer< ctkButtonGroupPrivate > d_ptr
 

Detailed Description

ctkButtonGroup is a QButtonGroup with a different behavior when exclusive. An exclusive ctkButtonGroup switches off the previously checked button when a new button is checked. ctkButtonGroup doesn't enforce that 1 button is checked at all time (contrary to QButtonGroup). If a button is checked it is possible to uncheck it without having to check another button. Use ctkButtonGroup the same way than QButtonGroup.

ctkButtonGroup* buttonGroup = new ctkButtonGroup(parent);
buttonGroup->addButton(button1);
buttonGroup->addButton(button2);
ctkButtonGroup(QObject *_parent=0)

By default ctkButtonGroup is exclusive.

See also
QButtonGroup

Definition at line 49 of file ctkButtonGroup.h.

Constructor & Destructor Documentation

◆ ctkButtonGroup()

ctkButtonGroup::ctkButtonGroup ( QObject *  _parent = 0)
explicit

◆ ~ctkButtonGroup()

virtual ctkButtonGroup::~ctkButtonGroup ( )
virtual

Member Function Documentation

◆ onButtonClicked

void ctkButtonGroup::onButtonClicked ( int  button)
protectedslot

◆ onButtonPressed

void ctkButtonGroup::onButtonPressed ( int  button)
protectedslot

◆ setChecked

void ctkButtonGroup::setChecked ( QAbstractButton *  button,
bool  checked = true 
)
slot

Check or uncheck the button.

Member Data Documentation

◆ d_ptr

QScopedPointer<ctkButtonGroupPrivate> ctkButtonGroup::d_ptr
protected

Definition at line 65 of file ctkButtonGroup.h.


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