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
30
class
YRadioButtonGroup
;
31
class
YRadioButtonPrivate
;
32
33
51
class
YRadioButton
:
public
YWidget
52
{
53
protected
:
70
YRadioButton
(
YWidget
*
parent
,
const
std::string &
label
);
71
72
public
:
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
130
YRadioButtonGroup
*
buttonGroup
();
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
187
protected
:
188
195
YRadioButtonGroup
*
findRadioButtonGroup
()
const
;
196
203
virtual
void
saveUserInput
(
YMacroRecorder
*
macroRecorder
);
204
205
private
:
206
207
ImplPtr<YRadioButtonPrivate>
priv;
208
};
209
210
211
#endif
// YRadioButton_h
TreeItem
Definition
TreeItem.h:41
YMacroRecorder
Definition
YMacroRecorder.h:39
YPropertySet
Definition
YProperty.h:198
YPropertyValue
Definition
YProperty.h:105
YRadioButtonGroup
Definition
YRadioButtonGroup.h:42
YRadioButton
Definition
YRadioButton.h:52
YRadioButton::label
std::string label() const
Definition
YRadioButton.cc:94
YRadioButton::value
virtual bool value()=0
YRadioButton::setProperty
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition
YRadioButton.cc:134
YRadioButton::YRadioButton
YRadioButton(YWidget *parent, const std::string &label)
Definition
YRadioButton.cc:61
YRadioButton::setLabel
virtual void setLabel(const std::string &label)
Definition
YRadioButton.cc:88
YRadioButton::getProperty
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition
YRadioButton.cc:150
YRadioButton::widgetClass
virtual const char * widgetClass() const
Definition
YRadioButton.h:84
YRadioButton::findRadioButtonGroup
YRadioButtonGroup * findRadioButtonGroup() const
Definition
YRadioButton.cc:176
YRadioButton::~YRadioButton
virtual ~YRadioButton()
Definition
YRadioButton.cc:78
YRadioButton::userInputProperty
const char * userInputProperty()
Definition
YRadioButton.h:184
YRadioButton::propertySet
virtual const YPropertySet & propertySet()
Definition
YRadioButton.cc:113
YRadioButton::setUseBoldFont
virtual void setUseBoldFont(bool bold=true)
Definition
YRadioButton.cc:106
YRadioButton::buttonGroup
YRadioButtonGroup * buttonGroup()
Definition
YRadioButton.cc:164
YRadioButton::useBoldFont
bool useBoldFont() const
Definition
YRadioButton.cc:100
YRadioButton::setValue
virtual void setValue(bool checked)=0
YRadioButton::saveUserInput
virtual void saveUserInput(YMacroRecorder *macroRecorder)
Definition
YRadioButton.cc:195
YRadioButton::shortcutString
virtual std::string shortcutString() const
Definition
YRadioButton.h:170
YRadioButton::setShortcutString
virtual void setShortcutString(const std::string &str)
Definition
YRadioButton.h:177
YWidget
Definition
YWidget.h:55
YWidget::parent
YWidget * parent() const
Definition
YWidget.cc:277
YRadioButtonPrivate
Definition
YRadioButton.cc:41
src
YRadioButton.h
Generated by
1.10.0