A containers for buttons with a grid layout and id values. More...
Public Types | |
typedef QtlAutoGrid | SuperClass |
Reference to superclass. More... | |
![]() | |
typedef QWidget | SuperClass |
Reference to superclass. More... | |
Public Member Functions | |
QtlButtonGrid (QWidget *parent=0) | |
Constructor. More... | |
void | addExternalButton (QAbstractButton *button, int id=-1) |
Add an external button in the group (not a direct child of this object). More... | |
int | buttonId (QAbstractButton *button) const |
Get the id of the specified button. More... | |
QAbstractButton * | buttonOf (int id) const |
Search the button which is associated to an id. More... | |
int | checkedId () const |
Get the id of the checked button. More... | |
bool | checkId (int id) |
Check ("select") the button with the specified id. More... | |
void | setButtonId (QAbstractButton *button, int id=-1) |
Assign an id to a button in the group. More... | |
![]() | |
QtlAutoGrid (QWidget *parent=0) | |
Constructor. More... | |
int | bottomMargin () const |
Get the bottom margin in pixels. More... | |
virtual bool | hasHeightForWidth () const Q_DECL_OVERRIDE |
Check if the preferred height of the widget depends on its width. More... | |
virtual int | heightForWidth (int width) const Q_DECL_OVERRIDE |
Compute the widget height for a given width. More... | |
int | horizontalSpacing () const |
Get the horizontal spacing in pixels. More... | |
int | leftMargin () const |
Get the left margin in pixels. More... | |
virtual QSize | minimumSizeHint () const Q_DECL_OVERRIDE |
Return the recommended minimum size for the widget. More... | |
int | rightMargin () const |
Get the right margin in pixels. More... | |
void | setBottomMargin (int bottomMargin) |
Set the bottom margin in pixels. More... | |
void | setHorizontalSpacing (int horizontalSpacing) |
Set the horizontal spacing in pixels. More... | |
void | setLeftMargin (int leftMargin) |
Set the left margin in pixels. More... | |
void | setRightMargin (int rightMargin) |
Set the right margin in pixels. More... | |
void | setTopMargin (int topMargin) |
Set the top margin in pixels. More... | |
void | setVerticalSpacing (int verticalSpacing) |
Set the vertical spacing in pixels. More... | |
virtual QSize | sizeHint () const Q_DECL_OVERRIDE |
Return the widget size hint. More... | |
int | topMargin () const |
Get the top margin in pixels. More... | |
int | verticalSpacing () const |
Get the vertical spacing in pixels. More... | |
Protected Member Functions | |
virtual void | childEvent (QChildEvent *event) Q_DECL_OVERRIDE |
Invoked when a child is added, polished or removed. More... | |
![]() | |
virtual bool | event (QEvent *event) Q_DECL_OVERRIDE |
General event handler. More... | |
virtual void | resizeEvent (QResizeEvent *event) Q_DECL_OVERRIDE |
Invoked when the widget is resized. More... | |
Private Attributes | |
QButtonGroup * | _buttonGroup |
The button group. More... | |
A containers for buttons with a grid layout and id values.
typedef QtlAutoGrid QtlButtonGrid::SuperClass |
Reference to superclass.
|
explicit |
Constructor.
[in] | parent | Optional parent widget. |
void QtlButtonGrid::addExternalButton | ( | QAbstractButton * | button, |
int | id = -1 |
||
) |
Add an external button in the group (not a direct child of this object).
[in] | button | The button to add. |
[in] | id | The id to assign to this button. |
void QtlButtonGrid::setButtonId | ( | QAbstractButton * | button, |
int | id = -1 |
||
) |
Assign an id to a button in the group.
[in] | button | The button to assign. |
[in] | id | The id to assign to this button. |
|
inline |
Search the button which is associated to an id.
[in] | id | The id to search. |
|
inline |
Get the id of the specified button.
|
inline |
Get the id of the checked button.
bool QtlButtonGrid::checkId | ( | int | id | ) |
Check ("select") the button with the specified id.
[in] | id | The id of the button to check. |
|
protectedvirtual |
Invoked when a child is added, polished or removed.
Reimplemented from QObject.
[in] | event | The event to intercept. |
Reimplemented from QtlAutoGrid.
|
private |
The button group.