VR-Forces Development_Version Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Signals | Public Member Functions | Protected Attributes
makVrv::DtRadioPushButtonsWidget Class Reference

A widget for arranging push-buttons in a grid and have them behave as a set of radio buttons. More...

Inheritance diagram for makVrv::DtRadioPushButtonsWidget:
Inheritance graph
[legend]

Signals

void clicked (int index)
 Signal when a button is pressed.
void rightClicked (int index)
 Signal when a button is pressed with the right mouse button.

Public Member Functions

 DtRadioPushButtonsWidget (DtPushButtonList &buttons, int colums=5, QWidget *parent=NULL, Qt::WindowFlags flags=Qt::Widget)
 CTOR.
virtual ~DtRadioPushButtonsWidget ()
 virtual DTOR
virtual void pressButton (int index)
 Function to programmatically press a button.
virtual int numButtons () const
 Get the number of buttons.
virtual int checkedButton () const
 Get the index of the checked button.

Protected Attributes

DtPushButtonList myButtons
QGridLayout * myLayout
QSignalMapper * myLeftSignalMapper
QSignalMapper * myRightSignalMapper

Detailed Description

A widget for arranging push-buttons in a grid and have them behave as a set of radio buttons.

Constructor & Destructor Documentation

makVrv::DtRadioPushButtonsWidget::DtRadioPushButtonsWidget ( DtPushButtonList buttons,
int  colums = 5,
QWidget parent = NULL,
Qt::WindowFlags  flags = Qt::Widget 
)

CTOR.

Parameters
[in]buttonsis a list of buttons to add to this widget.
[in]columnsis the max number of columns in the grid.
[in]parentis the parent to manage this widget.
[in]flagsis a set of windowing flags for display.
virtual makVrv::DtRadioPushButtonsWidget::~DtRadioPushButtonsWidget ( )
virtual

virtual DTOR

Member Function Documentation

virtual void makVrv::DtRadioPushButtonsWidget::pressButton ( int  index)
virtual

Function to programmatically press a button.

Pressing a button will uncheck all buttons then check the button at the given index. Giving an out of range index or an index less than zero will uncheck all buttons. Un-checking buttons will not send any signals.

Parameters
[in]indexis the list-index of the button to press.
virtual int makVrv::DtRadioPushButtonsWidget::numButtons ( ) const
virtual

Get the number of buttons.

Returns
the size of the list of buttons.
virtual int makVrv::DtRadioPushButtonsWidget::checkedButton ( ) const
virtual

Get the index of the checked button.

Returns
the index of the checked button or -1 if none are checked.
void makVrv::DtRadioPushButtonsWidget::clicked ( int  index)
signal

Signal when a button is pressed.

Parameters
[in]indexis the list-index of the button that was pressed.
void makVrv::DtRadioPushButtonsWidget::rightClicked ( int  index)
signal

Signal when a button is pressed with the right mouse button.

Parameters
[in]indexis the list-index of the button that was pressed.

Member Data Documentation

DtPushButtonList makVrv::DtRadioPushButtonsWidget::myButtons
protected
QGridLayout* makVrv::DtRadioPushButtonsWidget::myLayout
protected
QSignalMapper* makVrv::DtRadioPushButtonsWidget::myLeftSignalMapper
protected
QSignalMapper* makVrv::DtRadioPushButtonsWidget::myRightSignalMapper
protected

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

Document ID: Generated on Mon Jul 4 01:00:18 EDT 2016 from SVN revision 166489
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)