SVN_SILENT made messages (.desktop file)
[kdeartwork.git] / kscreensaver / kxsconfig / kxscontrol.h
blobafe8ad9d27fa25f6ed17a177c06fd2391f495c01
1 //-----------------------------------------------------------------------------
2 //
3 // KDE xscreensaver configuration dialog
4 //
5 // Copyright (c) Martin R. Jones <mjones@kde.org> 1999
6 //
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__
25 #include <qwidget.h>
26 #include <qcheckbox.h>
27 //Added by qt3to4:
28 #include <QLabel>
30 #include "kxsitem.h"
32 class QLabel;
33 class QSlider;
34 class QSpinBox;
35 class QComboBox;
36 class QLineEdit;
38 //===========================================================================
39 class KXSRangeControl : public QWidget, public KXSRangeItem
41 Q_OBJECT
42 public:
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);
48 signals:
49 void changed();
51 protected slots:
52 void slotValueChanged(int value);
54 protected:
55 QSlider *mSlider;
56 QSpinBox *mSpinBox;
59 //===========================================================================
60 class KXSDoubleRangeControl : public QWidget, public KXSDoubleRangeItem
62 Q_OBJECT
63 public:
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);
69 signals:
70 void changed();
72 protected slots:
73 void slotValueChanged(int value);
75 protected:
76 QSlider *mSlider;
77 double mStep;
80 //===========================================================================
81 class KXSCheckBoxControl : public QCheckBox, public KXSBoolItem
83 Q_OBJECT
84 public:
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);
90 signals:
91 void changed();
93 protected slots:
94 void slotToggled(bool);
97 //===========================================================================
98 class KXSDropListControl : public QWidget, public KXSSelectItem
100 Q_OBJECT
101 public:
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 );
109 signals:
110 void changed();
112 protected slots:
113 void slotActivated(int);
115 protected:
116 QComboBox *mCombo;
119 //===========================================================================
120 class KXSLineEditControl : public QWidget, public KXSStringItem
122 Q_OBJECT
123 public:
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);
129 signals:
130 void changed();
132 protected slots:
133 void textChanged(const QString &);
135 protected:
136 QLineEdit *mEdit;
139 //===========================================================================
140 class KXSFileControl : public QWidget, public KXSStringItem
142 Q_OBJECT
143 public:
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);
149 signals:
150 void changed();
152 protected slots:
153 void textChanged(const QString &);
154 void selectFile();
156 protected:
157 QLineEdit *mEdit;
161 #endif