libyui
 
Loading...
Searching...
No Matches
YRadioButtonGroup.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: YRadioButtonGroup.h
20
21 Author: Stefan Hundhammer <shundhammer@suse.de>
22
23/-*/
24
25#ifndef YRadioButtonGroup_h
26#define YRadioButtonGroup_h
27
28#include "YSingleChildContainerWidget.h"
29
30class YRadioButton;
32
33typedef std::list<YRadioButton *> YRadioButtonList;
34typedef YRadioButtonList::iterator YRadioButtonListIterator;
35typedef YRadioButtonList::const_iterator YRadioButtonListConstIterator;
36
37
42{
43protected:
48
49public:
53 virtual ~YRadioButtonGroup();
54
59 virtual const char * widgetClass() const { return "YRadioButtonGroup"; }
60
65
69 YRadioButton * value() const { return currentButton(); }
70
78 virtual void addRadioButton( YRadioButton * radioButton );
79
89 virtual void removeRadioButton( YRadioButton * radioButton );
90
96 void uncheckOtherButtons( YRadioButton * radioButton );
97
111 virtual bool setProperty( const std::string & propertyName,
112 const YPropertyValue & val );
113
121 virtual YPropertyValue getProperty( const std::string & propertyName );
122
129 virtual const YPropertySet & propertySet();
130
131protected:
132
140 YRadioButtonListConstIterator radioButtonsBegin() const;
141
146 YRadioButtonListConstIterator radioButtonsEnd() const;
147
151 int radioButtonsCount() const;
152
153
154private:
155
157};
158
159
160#endif // YRadioButtonGroup_h
Definition ImplPtr.h:43
Definition YProperty.h:198
Definition YProperty.h:105
YRadioButtonGroup(YWidget *parent)
Definition YRadioButtonGroup.cc:48
virtual ~YRadioButtonGroup()
Definition YRadioButtonGroup.cc:56
virtual void removeRadioButton(YRadioButton *radioButton)
Definition YRadioButtonGroup.cc:90
YRadioButtonListConstIterator radioButtonsEnd() const
Definition YRadioButtonGroup.cc:69
virtual const char * widgetClass() const
Definition YRadioButtonGroup.h:59
YRadioButtonListConstIterator radioButtonsBegin() const
Definition YRadioButtonGroup.cc:62
virtual YPropertyValue getProperty(const std::string &propertyName)
Definition YRadioButtonGroup.cc:161
int radioButtonsCount() const
Definition YRadioButtonGroup.cc:76
virtual bool setProperty(const std::string &propertyName, const YPropertyValue &val)
Definition YRadioButtonGroup.cc:145
YRadioButton * currentButton() const
Definition YRadioButtonGroup.cc:110
virtual const YPropertySet & propertySet()
Definition YRadioButtonGroup.cc:125
YRadioButton * value() const
Definition YRadioButtonGroup.h:69
virtual void addRadioButton(YRadioButton *radioButton)
Definition YRadioButtonGroup.cc:83
void uncheckOtherButtons(YRadioButton *radioButton)
Definition YRadioButtonGroup.cc:97
Definition YRadioButton.h:52
YSingleChildContainerWidget(YWidget *parent)
Definition YSingleChildContainerWidget.cc:29
YWidget(YWidget *parent)
Definition YWidget.cc:106
YWidget * parent() const
Definition YWidget.cc:277
Definition YRadioButtonGroup.cc:37