YRadioButtonGroup Class Reference

Implementation of the RadioButtonGroup widget. More...

#include <YRadioButtonGroup.h>

Inheritance diagram for YRadioButtonGroup:

YContainerWidget YWidget List of all members.

Public Member Functions

 YRadioButtonGroup (const YWidgetOpt &opt)
virtual ~YRadioButtonGroup ()
virtual char * widgetClass ()
bool isRadioButtonGroup () const
virtual void addRadioButton (YRadioButton *button)
virtual void removeRadioButton (YRadioButton *button)
YCPValue changeWidget (const YCPSymbol &property, const YCPValue &newvalue)
YCPValue queryWidget (const YCPSymbol &property)
void uncheckOtherButtons (const YRadioButton *radiobutton)

Protected Types

typedef vector< YRadioButton * > buttonlist_type

Protected Member Functions

YRadioButtoncurrentButton () const
bool setCurrentButton (const YCPValue &id)

Protected Attributes

buttonlist_type buttonlist

Detailed Description

Implementation of the RadioButtonGroup widget.

RadioButtonGroup

A RadioButtonGroup is a container widget that has neither impact on the layout nor has it a graphical representation. It is just used to logically group RadioButtons together so the one-out-of-many selection strategy can be ensured.

Radio button groups may be nested. Looking bottom up we can say that a radio button belongs to the radio button group that is nearest to it. If you give the RadioButtonGroup widget an id, you can use it to query and set which radio button is currently selected.


Member Typedef Documentation

typedef vector<YRadioButton *> YRadioButtonGroup::buttonlist_type [protected]


Constructor & Destructor Documentation

YRadioButtonGroup::YRadioButtonGroup ( const YWidgetOpt opt  ) 

Creates a new and empty radio button group.

YRadioButtonGroup::~YRadioButtonGroup (  )  [virtual]

Cleans up


Member Function Documentation

virtual char* YRadioButtonGroup::widgetClass (  )  [inline, virtual]

Returns a descriptive name of this widget class for logging, debugging etc.

Reimplemented from YContainerWidget.

bool YRadioButtonGroup::isRadioButtonGroup (  )  const [virtual]

Returns true, since this is a radio button group

Reimplemented from YWidget.

void YRadioButtonGroup::addRadioButton ( YRadioButton button  )  [virtual]

Adds a radio button to the button group. If you overload this function ui specific, call YRadioButtonGroup::addRadioButton() as well!

void YRadioButtonGroup::removeRadioButton ( YRadioButton button  )  [virtual]

Removes a radio button from the button group. If you overload this function ui specific, call YRadioButtonGroup::removeRadioButton() as well! Don't delete the removed radio button in this function! It's not ours. We just have a pointer to it. It's parent widget will deletes it when neccessary.

YCPValue YRadioButtonGroup::changeWidget ( const YCPSymbol property,
const YCPValue newvalue 
) [virtual]

Implements the ui command changeWidget.

The id of the currently selected radio button belonging to this group. If no button is selected, CurrentButton is nil. Alias: Value

Reimplemented from YWidget.

YCPValue YRadioButtonGroup::queryWidget ( const YCPSymbol property  )  [virtual]

Implements the ui command queryWidget

Reimplemented from YWidget.

void YRadioButtonGroup::uncheckOtherButtons ( const YRadioButton radiobutton  ) 

Unchecks all radio buttons except one. This method can be used by an actual ui ( for example ncurses ) in the implementation of setValue() of the Radiobutton

YRadioButton * YRadioButtonGroup::currentButton (  )  const [protected]

Find the currently selected button

bool YRadioButtonGroup::setCurrentButton ( const YCPValue id  )  [protected]

Make another of the buttons currently selected


Member Data Documentation

buttonlist_type YRadioButtonGroup::buttonlist [protected]

List of all RadioButtons contained in this group. The buttons do not _live_ here, so we don't delete them after use.


The documentation for this class was generated from the following files:
Generated on Tue Nov 6 01:20:23 2007 for yast2-core by  doxygen 1.5.0