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.
26 #include <QStringList>
33 KXSConfigItem(const QString
&name
, KConfig
&config
);
34 KXSConfigItem(const QString
&name
, const QXmlAttributes
&attr
);
35 virtual ~KXSConfigItem() {}
37 virtual QString
command() = 0;
38 virtual void save(KConfig
&config
) = 0;
39 virtual void read(KConfig
&config
) = 0;
46 class KXSRangeItem
: public KXSConfigItem
49 KXSRangeItem(const QString
&name
, KConfig
&config
);
50 KXSRangeItem(const QString
&name
, const QXmlAttributes
&attr
);
52 virtual QString
command();
53 virtual void save(KConfig
&config
);
54 virtual void read(KConfig
&config
);
64 class KXSDoubleRangeItem
: public KXSConfigItem
67 KXSDoubleRangeItem(const QString
&name
, KConfig
&config
);
68 KXSDoubleRangeItem(const QString
&name
, const QXmlAttributes
&attr
);
70 virtual QString
command();
71 virtual void read(KConfig
&config
);
72 virtual void save(KConfig
&config
);
82 class KXSBoolItem
: public KXSConfigItem
85 KXSBoolItem(const QString
&name
, KConfig
&config
);
86 KXSBoolItem(const QString
&name
, const QXmlAttributes
&attr
);
88 virtual QString
command();
89 virtual void read(KConfig
&config
);
90 virtual void save(KConfig
&config
);
98 class KXSSelectItem
: public KXSConfigItem
101 KXSSelectItem(const QString
&name
, KConfig
&config
);
102 KXSSelectItem(const QString
&name
, const QXmlAttributes
&attr
);
104 virtual void addOption(const QXmlAttributes
&attr
);
106 virtual QString
command();
108 virtual void read(KConfig
&config
);
109 virtual void save(KConfig
&config
);
112 QStringList mOptions
;
113 QStringList mSwitches
;
117 class KXSStringItem
: public KXSConfigItem
120 KXSStringItem(const QString
&name
, KConfig
&config
);
121 KXSStringItem(const QString
&name
, const QXmlAttributes
&attr
);
123 virtual QString
command();
124 virtual void save(KConfig
&config
);
125 virtual void read(KConfig
&config
);