author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /libkdepim/kprefswidget.h | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | libkdepim/kprefswidget.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/libkdepim/kprefswidget.h b/libkdepim/kprefswidget.h index 8543a39..9de1be5 100644 --- a/libkdepim/kprefswidget.h +++ b/libkdepim/kprefswidget.h | |||
@@ -12,45 +12,47 @@ | |||
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
13 | GNU General Public License for more details. | 13 | GNU General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
16 | along with this program; if not, write to the Free Software | 16 | along with this program; if not, write to the Free Software |
17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | 17 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
18 | 18 | ||
19 | As a special exception, permission is given to link this program | 19 | As a special exception, permission is given to link this program |
20 | with any edition of Qt, and distribute the resulting executable, | 20 | with any edition of Qt, and distribute the resulting executable, |
21 | without including the source code for Qt in the source distribution. | 21 | without including the source code for Qt in the source distribution. |
22 | */ | 22 | */ |
23 | // $Id$ | 23 | // $Id$ |
24 | 24 | ||
25 | #ifndef _KPREFSWIDGET_H | 25 | #ifndef _KPREFSWIDGET_H |
26 | #define _KPREFSWIDGET_H | 26 | #define _KPREFSWIDGET_H |
27 | 27 | ||
28 | #include <qptrlist.h> | 28 | #include <q3ptrlist.h> |
29 | #include <qlineedit.h> | 29 | #include <qlineedit.h> |
30 | #include <qpushbutton.h> | 30 | #include <qpushbutton.h> |
31 | 31 | ||
32 | #include <qwidget.h> | 32 | #include <qwidget.h> |
33 | //Added by qt3to4: | ||
34 | #include <QLabel> | ||
33 | 35 | ||
34 | class KPrefs; | 36 | class KPrefs; |
35 | 37 | ||
36 | class KColorButton; | 38 | class KColorButton; |
37 | class QCheckBox; | 39 | class QCheckBox; |
38 | class QLabel; | 40 | class QLabel; |
39 | class QSpinBox; | 41 | class QSpinBox; |
40 | class QButtonGroup; | 42 | class Q3ButtonGroup; |
41 | 43 | ||
42 | /** | 44 | /** |
43 | @short Base class for widgets used by @ref KPrefsDialog. | 45 | @short Base class for widgets used by @ref KPrefsDialog. |
44 | @author Cornelius Schumacher | 46 | @author Cornelius Schumacher |
45 | @see KPrefsDialog | 47 | @see KPrefsDialog |
46 | 48 | ||
47 | This class provides the interface for the preferences widgets used by | 49 | This class provides the interface for the preferences widgets used by |
48 | KPrefsDialog. | 50 | KPrefsDialog. |
49 | */ | 51 | */ |
50 | class KPrefsWid : public QObject | 52 | class KPrefsWid : public QObject |
51 | { | 53 | { |
52 | Q_OBJECT | 54 | Q_OBJECT |
53 | public: | 55 | public: |
54 | /** | 56 | /** |
55 | This function is called to read value of the setting from the | 57 | This function is called to read value of the setting from the |
56 | stored configuration and display it in the widget. | 58 | stored configuration and display it in the widget. |
@@ -252,41 +254,41 @@ class KPrefsWidRadios : public KPrefsWid | |||
252 | @param reference Pointer to variable read and written by this widget. | 254 | @param reference Pointer to variable read and written by this widget. |
253 | @param parent Parent widget. | 255 | @param parent Parent widget. |
254 | */ | 256 | */ |
255 | KPrefsWidRadios(const QString &text,int *reference,QWidget *parent); | 257 | KPrefsWidRadios(const QString &text,int *reference,QWidget *parent); |
256 | virtual ~KPrefsWidRadios(); | 258 | virtual ~KPrefsWidRadios(); |
257 | 259 | ||
258 | /** | 260 | /** |
259 | Add a radio button. | 261 | Add a radio button. |
260 | 262 | ||
261 | @param text Text of the button. | 263 | @param text Text of the button. |
262 | */ | 264 | */ |
263 | void addRadio(const QString &text); | 265 | void addRadio(const QString &text); |
264 | 266 | ||
265 | /** | 267 | /** |
266 | Return the box widget used by this widget. | 268 | Return the box widget used by this widget. |
267 | */ | 269 | */ |
268 | QButtonGroup *groupBox(); | 270 | Q3ButtonGroup *groupBox(); |
269 | 271 | ||
270 | void readConfig(); | 272 | void readConfig(); |
271 | void writeConfig(); | 273 | void writeConfig(); |
272 | 274 | ||
273 | private: | 275 | private: |
274 | int *mReference; | 276 | int *mReference; |
275 | 277 | ||
276 | QButtonGroup *mBox; | 278 | Q3ButtonGroup *mBox; |
277 | }; | 279 | }; |
278 | 280 | ||
279 | 281 | ||
280 | /** | 282 | /** |
281 | @short Widget for string settings in @ref KPrefsDialog. | 283 | @short Widget for string settings in @ref KPrefsDialog. |
282 | 284 | ||
283 | This class provides a widget for configuring string values. It is meant to be | 285 | This class provides a widget for configuring string values. It is meant to be |
284 | used by KPrefsDialog. The user is responsible for the layout management. | 286 | used by KPrefsDialog. The user is responsible for the layout management. |
285 | */ | 287 | */ |
286 | class KPrefsWidString : public KPrefsWid | 288 | class KPrefsWidString : public KPrefsWid |
287 | { | 289 | { |
288 | public: | 290 | public: |
289 | /** | 291 | /** |
290 | Create a string widget consisting of a test label and a line edit. | 292 | Create a string widget consisting of a test label and a line edit. |
291 | 293 | ||
292 | @param text Text of label. | 294 | @param text Text of label. |
@@ -436,20 +438,20 @@ class KPrefsWidget : public QWidget | |||
436 | //US void accept(); | 438 | //US void accept(); |
437 | /** Accept changes to preferences and close dialog */ | 439 | /** Accept changes to preferences and close dialog */ |
438 | //US void slotOk(); | 440 | //US void slotOk(); |
439 | 441 | ||
440 | /** Set preferences to default values */ | 442 | /** Set preferences to default values */ |
441 | //US void slotDefault(); | 443 | //US void slotDefault(); |
442 | 444 | ||
443 | protected: | 445 | protected: |
444 | /** Implement this to read custom configuration widgets. */ | 446 | /** Implement this to read custom configuration widgets. */ |
445 | virtual void usrReadConfig() {} | 447 | virtual void usrReadConfig() {} |
446 | /** Implement this to write custom configuration widgets. */ | 448 | /** Implement this to write custom configuration widgets. */ |
447 | virtual void usrWriteConfig() {} | 449 | virtual void usrWriteConfig() {} |
448 | 450 | ||
449 | private: | 451 | private: |
450 | KPrefs *mPrefs; | 452 | KPrefs *mPrefs; |
451 | 453 | ||
452 | QPtrList<KPrefsWid> mPrefsWids; | 454 | Q3PtrList<KPrefsWid> mPrefsWids; |
453 | }; | 455 | }; |
454 | 456 | ||
455 | #endif | 457 | #endif |