QtlMovie 1.12 (A specialized FFmpeg front-end)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
QtlButtonGrid Class Reference

A containers for buttons with a grid layout and id values. More...

Inheritance diagram for QtlButtonGrid:
QtlAutoGrid

Public Types

typedef QtlAutoGrid SuperClass
 Reference to superclass. More...
 
- Public Types inherited from QtlAutoGrid
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...
 
- Public Member Functions inherited from QtlAutoGrid
 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...
 
- Protected Member Functions inherited from QtlAutoGrid
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...
 

Detailed Description

A containers for buttons with a grid layout and id values.

Member Typedef Documentation

◆ SuperClass

Reference to superclass.

Constructor & Destructor Documentation

◆ QtlButtonGrid()

QtlButtonGrid::QtlButtonGrid ( QWidget *  parent = 0)
explicit

Constructor.

Parameters
[in]parentOptional parent widget.

Member Function Documentation

◆ addExternalButton()

void QtlButtonGrid::addExternalButton ( QAbstractButton *  button,
int  id = -1 
)

Add an external button in the group (not a direct child of this object).

Parameters
[in]buttonThe button to add.
[in]idThe id to assign to this button.

◆ setButtonId()

void QtlButtonGrid::setButtonId ( QAbstractButton *  button,
int  id = -1 
)

Assign an id to a button in the group.

Parameters
[in]buttonThe button to assign.
[in]idThe id to assign to this button.

◆ buttonOf()

QAbstractButton* QtlButtonGrid::buttonOf ( int  id) const
inline

Search the button which is associated to an id.

Parameters
[in]idThe id to search.
Returns
The first button which is associated to id or zero if none found.

◆ buttonId()

int QtlButtonGrid::buttonId ( QAbstractButton *  button) const
inline

Get the id of the specified button.

Returns
The id of the specified button or -1 if the button is unknown or has no id.

◆ checkedId()

int QtlButtonGrid::checkedId ( ) const
inline

Get the id of the checked button.

Returns
The id of the checked button or -1 if no button is checked or if the checked button has no id.

◆ checkId()

bool QtlButtonGrid::checkId ( int  id)

Check ("select") the button with the specified id.

Parameters
[in]idThe id of the button to check.
Returns
True if the button was found, false if not found (and consequently not checked).

◆ childEvent()

void QtlButtonGrid::childEvent ( QChildEvent *  event)
protectedvirtual

Invoked when a child is added, polished or removed.

Reimplemented from QObject.

Parameters
[in]eventThe event to intercept.

Reimplemented from QtlAutoGrid.

Member Data Documentation

◆ _buttonGroup

QButtonGroup* QtlButtonGrid::_buttonGroup
private

The button group.


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