libyui
|
Public Member Functions | |
virtual | ~YCheckBox () |
virtual const char * | widgetClass () const |
virtual YCheckBoxState | value ()=0 |
virtual void | setValue (YCheckBoxState state)=0 |
bool | isChecked () |
void | setChecked (bool checked=true) |
bool | dontCare () |
void | setDontCare () |
string | label () const |
virtual void | setLabel (const string &label) |
bool | useBoldFont () const |
virtual void | setUseBoldFont (bool bold=true) |
virtual bool | setProperty (const string &propertyName, const YPropertyValue &val) |
virtual YPropertyValue | getProperty (const string &propertyName) |
virtual const YPropertySet & | propertySet () |
virtual string | shortcutString () const |
virtual void | setShortcutString (const string &str) |
const char * | userInputProperty () |
Protected Member Functions | |
YCheckBox (YWidget *parent, const string &label) |
YCheckBox::YCheckBox | ( | YWidget * | parent, |
const string & | label | ||
) | [protected] |
Constructor.
YCheckBox::~YCheckBox | ( | ) | [virtual] |
Destructor.
bool YCheckBox::dontCare | ( | ) | [inline] |
Simplified access to tri-state ("don't care").
YPropertyValue YCheckBox::getProperty | ( | const string & | propertyName | ) | [virtual] |
bool YCheckBox::isChecked | ( | ) | [inline] |
Simplified access to value(): Return 'true' if the CheckBox is checked.
string YCheckBox::label | ( | ) | const |
Get the label (the text on the CheckBox).
const YPropertySet & YCheckBox::propertySet | ( | ) | [virtual] |
void YCheckBox::setChecked | ( | bool | checked = true | ) | [inline] |
Simplified access to setValue(): Check of uncheck the CheckBox.
void YCheckBox::setDontCare | ( | ) | [inline] |
Simplified access to setting tri-state ("don't care").
void YCheckBox::setLabel | ( | const string & | label | ) | [virtual] |
Set the label (the text on the CheckBox).
Derived classes are free to reimplement this, but they should call this base class method at the end of the overloaded function.
bool YCheckBox::setProperty | ( | const string & | propertyName, |
const YPropertyValue & | val | ||
) | [virtual] |
Set a property. Reimplemented from YWidget.
This method may throw exceptions, for example
This function returns 'true' if the value was successfully set and 'false' if that value requires special handling (not in error cases: those are covered by exceptions).
Reimplemented from YWidget.
virtual void YCheckBox::setShortcutString | ( | const string & | str | ) | [inline, virtual] |
void YCheckBox::setUseBoldFont | ( | bool | bold = true | ) | [virtual] |
Indicate whether or not a bold font should be used.
Derived classes are free to reimplement this, but they should call this base class method at the end of the overloaded function.
virtual void YCheckBox::setValue | ( | YCheckBoxState | state | ) | [pure virtual] |
Set the CheckBox value (on/off/don't care).
Derived classes are required to implement this.
virtual string YCheckBox::shortcutString | ( | ) | const [inline, virtual] |
bool YCheckBox::useBoldFont | ( | ) | const |
Returns 'true' if a bold font should be used.
const char* YCheckBox::userInputProperty | ( | ) | [inline, virtual] |
virtual YCheckBoxState YCheckBox::value | ( | ) | [pure virtual] |
Get the current value:
YCheckBox_on CheckBox is checked YCheckBox_off CheckBox is unchecked
YCheckBox_dont_care tri-state: CheckBox is greyed out, neither checked nor unchecked
The user cannot set YCheckBox_dont_care directly. This status is always only set from the outside, usually because a setting cannot be clearly determined. For example, a checkbox
[ ] Read only
would be set to "don't care" (by the application, not directly by the user) when it is to display the read-only state of a group of files where some are read-only and some are writeable.
Derived classes are required to implement this function. (Intentionally not const)
virtual const char* YCheckBox::widgetClass | ( | ) | const [inline, virtual] |
Returns a descriptive name of this widget class for logging, debugging etc.
Reimplemented from YWidget.