00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: YRadioButton.h 00014 00015 Author: Mathias Kettner <kettner@suse.de> 00016 Maintainer: Stefan Hundhammer <sh@suse.de> 00017 00018 /-*/ 00019 00020 #ifndef YRadioButton_h 00021 #define YRadioButton_h 00022 00023 #include "YWidget.h" 00024 #include <ycp/YCPString.h> 00025 00026 class YRadioButtonGroup; 00027 class YMacroRecorder; 00028 00032 class YRadioButton : public YWidget 00033 { 00034 public: 00039 YRadioButton( const YWidgetOpt & opt, const YCPString & label, YRadioButtonGroup *rbg ); 00040 00045 virtual char *widgetClass() { return "YRadioButton"; } 00046 00050 virtual ~YRadioButton(); 00051 00055 YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue ); 00056 00060 YCPValue queryWidget( const YCPSymbol & property ); 00061 00065 virtual void setValue( const YCPBoolean & checked ) = 0; 00066 00071 virtual YCPBoolean getValue() = 0; 00072 00077 virtual void setLabel( const YCPString & label ); 00078 00084 YCPString getLabel(); 00085 00090 void buttonGroupIsDead(); 00091 00095 YRadioButtonGroup *buttonGroup(); 00096 00101 const char *shortcutProperty() { return YUIProperty_Label; } 00102 00107 const char *userInputProperty() { return YUIProperty_Value; } 00108 00109 00110 protected: 00114 YCPString label; 00115 00119 YRadioButtonGroup *radiobuttongroup; 00120 00121 private: 00127 virtual void saveUserInput( YMacroRecorder *macroRecorder ); 00128 }; 00129 00130 00131 #endif // YRadioButton_h
1.5.3