YRadioButton Class Reference

Implementation of the RadioButton widget. More...

#include <YRadioButton.h>

Inheritance diagram for YRadioButton:

YWidget List of all members.

Public Member Functions

 YRadioButton (const YWidgetOpt &opt, const YCPString &label, YRadioButtonGroup *rbg)
virtual char * widgetClass ()
virtual ~YRadioButton ()
YCPValue changeWidget (const YCPSymbol &property, const YCPValue &newvalue)
YCPValue queryWidget (const YCPSymbol &property)
virtual void setValue (const YCPBoolean &checked)=0
virtual YCPBoolean getValue ()=0
virtual void setLabel (const YCPString &label)
YCPString getLabel ()
void buttonGroupIsDead ()
YRadioButtonGroupbuttonGroup ()
const char * shortcutProperty ()
const char * userInputProperty ()

Protected Attributes

YCPString label
YRadioButtonGroupradiobuttongroup

Private Member Functions

virtual void saveUserInput (YMacroRecorder *macroRecorder)

Detailed Description

Implementation of the RadioButton widget.

RadioButton

A radio button is not usefull alone. Radio buttons are group such that the user can select one radio button of a group. It is much like a selection box, but radio buttons can be dispersed over the dialog. Radio buttons must be contained in a RadioButtonGroup.


Constructor & Destructor Documentation

YRadioButton::YRadioButton const YWidgetOpt opt,
const YCPString label,
YRadioButtonGroup rbg
 

Creates a new text entry with a label and an initial text. Enters it into the radio button group rbg.

YRadioButton::~YRadioButton  )  [virtual]
 

Cleans up. Removes the button from the radio button group


Member Function Documentation

YRadioButtonGroup * YRadioButton::buttonGroup  ) 
 

Get a pointer to the radio button group this button belongs to.

void YRadioButton::buttonGroupIsDead  ) 
 

This function is called from YRadioButtonGroup~YRadioButtonGroup and tells that the pointer to the radiobuttongroup is not longer valid.

YCPValue YRadioButton::changeWidget const YCPSymbol property,
const YCPValue newvalue
[virtual]
 

Implements the ui command changeWidget.

Reimplemented from YWidget.

YCPString YRadioButton::getLabel  ) 
 

Get the current label of the text entry. This method cannot be overidden. The value of the label cannot be changed other than by calling setLabel, i.e. not by the ui. Therefore setLabel stores the current label in label.

virtual YCPBoolean YRadioButton::getValue  )  [pure virtual]
 

get the text currently entered in the text entry

YCPValue YRadioButton::queryWidget const YCPSymbol property  )  [virtual]
 

Implements the ui command queryWidget

Reimplemented from YWidget.

void YRadioButton::saveUserInput YMacroRecorder macroRecorder  )  [private, virtual]
 

Save the widget's user input to a macro recorder. Intentionally declared as "private" so all macro recording internals are handled by the abstract libyui level, not by a specific UI.

Reimplemented from YWidget.

void YRadioButton::setLabel const YCPString label  )  [virtual]
 

change the label of the text entry. Overload this, but call YRadioButton::setLabel at the end of your own function.

virtual void YRadioButton::setValue const YCPBoolean checked  )  [pure virtual]
 

Set the text in the entry to a new value

const char* YRadioButton::shortcutProperty  )  [inline, virtual]
 

The name of the widget property that holds the keyboard shortcut. Inherited from YWidget.

Reimplemented from YWidget.

const char* YRadioButton::userInputProperty  )  [inline, virtual]
 

The name of the widget property that will return user input. Inherited from YWidget.

Reimplemented from YWidget.

virtual char* YRadioButton::widgetClass  )  [inline, virtual]
 

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

Reimplemented from YWidget.


Member Data Documentation

YCPString YRadioButton::label [protected]
 

The CheckBox label

YRadioButtonGroup* YRadioButton::radiobuttongroup [protected]
 

The radio button group this button belongs to


The documentation for this class was generated from the following files:
Generated on Fri Jun 16 18:07:47 2006 for yast2-core by  doxygen 1.4.6