00001 /*---------------------------------------------------------------------\ 00002 | | 00003 | __ __ ____ _____ ____ | 00004 | \ \ / /_ _/ ___|_ _|___ \ | 00005 | \ V / _` \___ \ | | __) | | 00006 | | | (_| |___) || | / __/ | 00007 | |_|\__,_|____/ |_| |_____| | 00008 | | 00009 | core system | 00010 | (C) SuSE GmbH | 00011 \----------------------------------------------------------------------/ 00012 00013 File: YRadioButtonGroup.h 00014 00015 Author: Mathias Kettner <kettner@suse.de> 00016 Maintainer: Stefan Hundhammer <sh@suse.de> 00017 00018 /-*/ 00019 00020 #ifndef YRadioButtonGroup_h 00021 #define YRadioButtonGroup_h 00022 00023 #include "YContainerWidget.h" 00024 00025 class YRadioButton; 00026 00030 class YRadioButtonGroup : public YContainerWidget 00031 { 00032 public: 00036 YRadioButtonGroup( const YWidgetOpt & opt ); 00037 00041 virtual ~YRadioButtonGroup(); 00042 00047 virtual char *widgetClass() { return "YRadioButtonGroup"; } 00048 00052 bool isRadioButtonGroup() const; 00053 00059 virtual void addRadioButton( YRadioButton *button ); 00060 00068 virtual void removeRadioButton( YRadioButton *button ); 00069 00073 YCPValue changeWidget( const YCPSymbol & property, const YCPValue & newvalue ); 00074 00078 YCPValue queryWidget( const YCPSymbol & property ); 00079 00085 void uncheckOtherButtons( const YRadioButton *radiobutton ); 00086 00087 00088 protected: 00092 YRadioButton *currentButton() const; 00093 00097 bool setCurrentButton( const YCPValue & id ); 00098 00099 00100 typedef vector <YRadioButton *> buttonlist_type; 00101 00106 buttonlist_type buttonlist; 00107 00108 }; 00109 00110 00111 #endif // YRadioButtonGroup_h