libyui
 
Loading...
Searching...
No Matches
YRadioButton.h
1/*
2 Copyright (C) 2000-2012 Novell, Inc
3 This library is free software; you can redistribute it and/or modify
4 it under the terms of the GNU Lesser General Public License as
5 published by the Free Software Foundation; either version 2.1 of the
6 License, or (at your option) version 3.0 of the License. This library
7 is distributed in the hope that it will be useful, but WITHOUT ANY
8 WARRANTY; without even the implied warranty of MERCHANTABILITY or
9 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
10 License for more details. You should have received a copy of the GNU
11 Lesser General Public License along with this library; if not, write
12 to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
13 Floor, Boston, MA 02110-1301 USA
14*/
15
16
17/*-/
18
19 File: YRadioButton.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YRadioButton_h
26#define YRadioButton_h
27
28#include "YWidget.h"
29
32
33
51class YRadioButton : public YWidget
52{
53protected:
70 YRadioButton( YWidget * parent, const std::string & label );
71
72public:
76 virtual ~YRadioButton();
77
84 virtual const char * widgetClass() const { return "YRadioButton"; }
85
92 virtual bool value() = 0;
93
99 virtual void setValue( bool checked ) = 0;
100
104 std::string label() const;
105
112 virtual void setLabel( const std::string & label );
113
117 bool useBoldFont() const;
118
125 virtual void setUseBoldFont( bool bold = true );
126
131
145 virtual bool setProperty( const std::string & propertyName,
146 const YPropertyValue & val );
147
155 virtual YPropertyValue getProperty( const std::string & propertyName );
156
163 virtual const YPropertySet & propertySet();
164
170 virtual std::string shortcutString() const { return label(); }
171
177 virtual void setShortcutString( const std::string & str )
178 { setLabel( str ); }
179
184 const char * userInputProperty() { return YUIProperty_Value; }
185
186
187protected:
188
196
203 virtual void saveUserInput( YMacroRecorder * macroRecorder );
204
205private:
206
208};
209
210
211#endif // YRadioButton_h
Definition ImplPtr.h:43
Definition YMacroRecorder.h:39
Definition YProperty.h:198
Definition YProperty.h:105
Definition YRadioButtonGroup.h:42
std::string label() const
Definition YRadioButton.cc:94
virtual bool value()=0
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition YRadioButton.cc:134
YRadioButton(YWidget *parent, const std::string &label)
Definition YRadioButton.cc:61
virtual void setLabel(const std::string &label)
Definition YRadioButton.cc:88
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition YRadioButton.cc:150
virtual const char * widgetClass() const
Definition YRadioButton.h:84
YRadioButtonGroup * findRadioButtonGroup() const
Definition YRadioButton.cc:176
virtual ~YRadioButton()
Definition YRadioButton.cc:78
const char * userInputProperty()
Definition YRadioButton.h:184
virtual const YPropertySet & propertySet()
Definition YRadioButton.cc:113
virtual void setUseBoldFont(bool bold=true)
Definition YRadioButton.cc:106
YRadioButtonGroup * buttonGroup()
Definition YRadioButton.cc:164
bool useBoldFont() const
Definition YRadioButton.cc:100
virtual void setValue(bool checked)=0
virtual void saveUserInput(YMacroRecorder *macroRecorder)
Definition YRadioButton.cc:195
virtual std::string shortcutString() const
Definition YRadioButton.h:170
virtual void setShortcutString(const std::string &str)
Definition YRadioButton.h:177
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YRadioButton.cc:41