QGuiRadioSelector Class Reference
[Apollo GuiApollo]

Inheritance diagram for QGuiRadioSelector:

QGuiCompositeFrame

List of all members.


Detailed Description

widget for mutually exclusive selections

Author:
Sergio Di Domizio This class implements an arbitrary number of radiobuttons in which only one of them can be selected. It associates a label and possibly a picture to each radiobutton. Picture display is not implemented at present.

Public Member Functions

 QGuiRadioSelector (const TGWindow *parent)
 constructor
virtual ~QGuiRadioSelector ()
 destructor
void SetEntries (const std::vector< std::string > &entries)
 set the entries to be shown by this widget
Bool_t SetPictures (const std::vector< TGPicture * > &pictures)
 set pictures to be associated to the buttons
Bool_t SetSelected (size_t id)
 set selected button
size_t GetSelected () const
 get id of selected item
void ValueChanged ()
 updates the widget and emits the ValueChanged() signal
void Lock (Bool_t doLock)

Private Member Functions

void Display ()
void UpdateSelected ()
 ClassDef (QGuiRadioSelector, 0)

Private Attributes

std::vector< std::string > fEntries
std::vector< TGPicture * > fPictures
std::vector< TGRadioButton * > fButtons
size_t fSelected

Constructor & Destructor Documentation

QGuiRadioSelector::QGuiRadioSelector ( const TGWindow *  parent  ) 

constructor

Parameters:
parent parent window for this frame


Member Function Documentation

void QGuiRadioSelector::SetEntries ( const std::vector< std::string > &  entries  ) 

set the entries to be shown by this widget

Parameters:
entries list of entries to be shown
the picutres associated to this widget are discarded every time this method is called

References SetSelected().

Bool_t QGuiRadioSelector::SetPictures ( const std::vector< TGPicture * > &  pictures  ) 

set pictures to be associated to the buttons

Parameters:
pictures vector containing the pictures

Bool_t QGuiRadioSelector::SetSelected ( size_t  id  ) 

set selected button

Parameters:
id id of the selected button
Returns:
true unless the requested id is out of range

Referenced by QGEBiasFrame::SetBiasPolarity(), SetEntries(), QGEBiasFrame::SetGroundStatus(), QGEOffsetFrame::SetOffsetPolarity(), and ValueChanged().

size_t QGuiRadioSelector::GetSelected (  )  const [inline]

get id of selected item

Returns:
id of currently selected item

Referenced by QGEOffsetFrame::GetOffsetPolarity().


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

Generated on Tue Nov 16 10:50:06 2010 for CUORE Software by  doxygen 1.5.6