1 //-----------------------------------------------------------------------------
3 // KDE xscreensaver configuration dialog
5 // Copyright (c) Martin R. Jones <mjones@kde.org> 1999
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public
9 // License as published by the Free Software Foundation;
10 // version 2 of the License.
12 // This program is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; see the file COPYING. If not, write to
19 // the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20 // Boston, MA 02110-1301, USA.
22 #ifndef __KXSCONTROL_H__
23 #define __KXSCONTROL_H__
26 #include <qcheckbox.h>
38 //===========================================================================
39 class KXSRangeControl
: public QWidget
, public KXSRangeItem
43 KXSRangeControl(QWidget
*parent
, const QString
&name
, KConfig
&config
);
44 KXSRangeControl(QWidget
*parent
, const QString
&name
, const QXmlAttributes
&attr
);
46 virtual void read(KConfig
&config
);
52 void slotValueChanged(int value
);
59 //===========================================================================
60 class KXSDoubleRangeControl
: public QWidget
, public KXSDoubleRangeItem
64 KXSDoubleRangeControl(QWidget
*parent
, const QString
&name
, KConfig
&config
);
65 KXSDoubleRangeControl(QWidget
*parent
, const QString
&name
, const QXmlAttributes
&attr
);
67 virtual void read(KConfig
&config
);
73 void slotValueChanged(int value
);
80 //===========================================================================
81 class KXSCheckBoxControl
: public QCheckBox
, public KXSBoolItem
85 KXSCheckBoxControl(QWidget
*parent
, const QString
&name
, KConfig
&config
);
86 KXSCheckBoxControl(QWidget
*parent
, const QString
&name
, const QXmlAttributes
&attr
);
88 virtual void read(KConfig
&config
);
94 void slotToggled(bool);
97 //===========================================================================
98 class KXSDropListControl
: public QWidget
, public KXSSelectItem
102 KXSDropListControl(QWidget
*parent
, const QString
&name
, KConfig
&config
);
103 KXSDropListControl(QWidget
*parent
, const QString
&name
, const QXmlAttributes
&attr
);
105 virtual void read(KConfig
&config
);
107 virtual void addOption( const QXmlAttributes
&attr
);
113 void slotActivated(int);
119 //===========================================================================
120 class KXSLineEditControl
: public QWidget
, public KXSStringItem
124 KXSLineEditControl(QWidget
*parent
, const QString
&name
, KConfig
&config
);
125 KXSLineEditControl(QWidget
*parent
, const QString
&name
, const QXmlAttributes
&attr
);
127 virtual void read(KConfig
&config
);
133 void textChanged(const QString
&);
139 //===========================================================================
140 class KXSFileControl
: public QWidget
, public KXSStringItem
144 KXSFileControl(QWidget
*parent
, const QString
&name
, KConfig
&config
);
145 KXSFileControl(QWidget
*parent
, const QString
&name
, const QXmlAttributes
&attr
);
147 virtual void read(KConfig
&config
);
153 void textChanged(const QString
&);