VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties 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.

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

Signals

void clicked (int index)
 
void rightClicked (int index)
 

Public Member Functions

 DtRadioPushButtonsWidget (DtPushButtonList &buttons, int colums=5, QWidget *parent=NULL, Qt::WindowFlags flags=Qt::Widget)
 
virtual ~DtRadioPushButtonsWidget ()
 
virtual void pressButton (int index)
 
virtual int numButtons () const
 
virtual int checkedButton () const
 

Protected Attributes

DtPushButtonList myButtons
 
QGridLayout * myLayout
 
QSignalMapper * myLeftSignalMapper
 
QSignalMapper * myRightSignalMapper
 

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 Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)