summaryrefslogtreecommitdiffabout
path: root/libkdepim/kprefsdialog.h
authorMichael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
committer Michael Krelin <hacker@klever.net>2007-07-04 11:23:42 (UTC)
commita08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff)
tree8ee90d686081c52e7c69b5ce946e9b1a7d690001 /libkdepim/kprefsdialog.h
parent11edc920afe4f274c0964436633aa632c8288a40 (diff)
downloadkdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz
kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2
initial public commit of qt4 portp1
Diffstat (limited to 'libkdepim/kprefsdialog.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kprefsdialog.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index 52ec809..cc95dd4 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -1,471 +1,473 @@
1/* 1/*
2 This file is part of KOrganizer. 2 This file is part of KOrganizer.
3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 3 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
4 4
5 This program is free software; you can redistribute it and/or modify 5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by 6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or 7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version. 8 (at your option) any later version.
9 9
10 This program is distributed in the hope that it will be useful, 10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of 11 but WITHOUT ANY WARRANTY; without even the implied warranty of
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#ifndef _KPREFSDIALOG_H 23#ifndef _KPREFSDIALOG_H
24#define _KPREFSDIALOG_H 24#define _KPREFSDIALOG_H
25// $Id$ 25// $Id$
26 26
27#include <qptrlist.h> 27#include <q3ptrlist.h>
28#include <qlineedit.h> 28#include <qlineedit.h>
29//Added by qt3to4:
30#include <QLabel>
29 31
30#include <kdialogbase.h> 32#include <kdialogbase.h>
31 33
32class KPrefs; 34class KPrefs;
33class KPrefsDialog; 35class KPrefsDialog;
34 36
35class KColorButton; 37class KColorButton;
36class QCheckBox; 38class QCheckBox;
37class QLabel; 39class QLabel;
38class QSpinBox; 40class QSpinBox;
39class QButtonGroup; 41class Q3ButtonGroup;
40 42
41/** 43/**
42 @short Base class for widgets used by @ref KPrefsDialog. 44 @short Base class for widgets used by @ref KPrefsDialog.
43 @author Cornelius Schumacher 45 @author Cornelius Schumacher
44 @see KPrefsDialog 46 @see KPrefsDialog
45 47
46 This class provides the interface for the preferences widgets used by 48 This class provides the interface for the preferences widgets used by
47 KPrefsDialog. 49 KPrefsDialog.
48*/ 50*/
49class KPrefsDialogWid : public QObject 51class KPrefsDialogWid : public QObject
50{ 52{
51 public: 53 public:
52 /** 54 /**
53 This function is called to read value of the setting from the 55 This function is called to read value of the setting from the
54 stored configuration and display it in the widget. 56 stored configuration and display it in the widget.
55 */ 57 */
56 virtual void readConfig() = 0; 58 virtual void readConfig() = 0;
57 /** 59 /**
58 This function is called to write the current setting of the widget to the 60 This function is called to write the current setting of the widget to the
59 stored configuration. 61 stored configuration.
60 */ 62 */
61 virtual void writeConfig() = 0; 63 virtual void writeConfig() = 0;
62}; 64};
63 65
64/** 66/**
65 @short Widget for bool settings in @ref KPrefsDialog. 67 @short Widget for bool settings in @ref KPrefsDialog.
66 68
67 This class provides a widget for configuring bool values. It is meant to be 69 This class provides a widget for configuring bool values. It is meant to be
68 used by KPrefsDialog. The user is responsible for the layout management. 70 used by KPrefsDialog. The user is responsible for the layout management.
69*/ 71*/
70class KPrefsDialogWidBool : public KPrefsDialogWid 72class KPrefsDialogWidBool : public KPrefsDialogWid
71{ 73{
72 public: 74 public:
73 /** 75 /**
74 Create a bool widget consisting of a QCheckbox. 76 Create a bool widget consisting of a QCheckbox.
75 77
76 @param text Text of QCheckBox. 78 @param text Text of QCheckBox.
77 @param reference Pointer to variable read and written by this widget. 79 @param reference Pointer to variable read and written by this widget.
78 @param parent Parent widget. 80 @param parent Parent widget.
79 */ 81 */
80 KPrefsDialogWidBool(const QString &text,bool *reference,QWidget *parent); 82 KPrefsDialogWidBool(const QString &text,bool *reference,QWidget *parent);
81 83
82 /** 84 /**
83 Return the QCheckbox used by this widget. 85 Return the QCheckbox used by this widget.
84 */ 86 */
85 QCheckBox *checkBox(); 87 QCheckBox *checkBox();
86 88
87 void readConfig(); 89 void readConfig();
88 void writeConfig(); 90 void writeConfig();
89 91
90 private: 92 private:
91 bool *mReference; 93 bool *mReference;
92 94
93 QCheckBox *mCheck; 95 QCheckBox *mCheck;
94}; 96};
95 97
96/** 98/**
97 @short Widget for time settings in @ref KPrefsDialog. 99 @short Widget for time settings in @ref KPrefsDialog.
98 100
99 This class provides a widget for configuring time values. It is meant to be 101 This class provides a widget for configuring time values. It is meant to be
100 used by KPrefsDialog. The user is responsible for the layout management. 102 used by KPrefsDialog. The user is responsible for the layout management.
101*/ 103*/
102class KPrefsDialogWidTime : public KPrefsDialogWid 104class KPrefsDialogWidTime : public KPrefsDialogWid
103{ 105{
104 public: 106 public:
105 /** 107 /**
106 Create a time widget consisting of a label and a spinbox. 108 Create a time widget consisting of a label and a spinbox.
107 109
108 @param text Text of Label. 110 @param text Text of Label.
109 @param reference Pointer to variable read and written by this widget. 111 @param reference Pointer to variable read and written by this widget.
110 @param parent Parent widget. 112 @param parent Parent widget.
111 */ 113 */
112 KPrefsDialogWidTime(const QString &text,int *reference,QWidget *parent); 114 KPrefsDialogWidTime(const QString &text,int *reference,QWidget *parent);
113 115
114 /** 116 /**
115 Return QLabel used by this widget. 117 Return QLabel used by this widget.
116 */ 118 */
117 QLabel *label(); 119 QLabel *label();
118 /** 120 /**
119 Return QSpinBox used by this widget. 121 Return QSpinBox used by this widget.
120 */ 122 */
121 QSpinBox *spinBox(); 123 QSpinBox *spinBox();
122 124
123 void readConfig(); 125 void readConfig();
124 void writeConfig(); 126 void writeConfig();
125 127
126 private: 128 private:
127 int *mReference; 129 int *mReference;
128 130
129 QLabel *mLabel; 131 QLabel *mLabel;
130 QSpinBox *mSpin; 132 QSpinBox *mSpin;
131}; 133};
132 134
133/** 135/**
134 @short Widget for color settings in @ref KPrefsDialog. 136 @short Widget for color settings in @ref KPrefsDialog.
135 137
136 This class provides a widget for configuring color values. It is meant to be 138 This class provides a widget for configuring color values. It is meant to be
137 used by KPrefsDialog. The user is responsible for the layout management. 139 used by KPrefsDialog. The user is responsible for the layout management.
138*/ 140*/
139class KPrefsDialogWidColor : public KPrefsDialogWid 141class KPrefsDialogWidColor : public KPrefsDialogWid
140{ 142{
141 public: 143 public:
142 /** 144 /**
143 Create a color widget consisting of a test field and a button for opening 145 Create a color widget consisting of a test field and a button for opening
144 a color dialog. 146 a color dialog.
145 147
146 @param text Text of button. 148 @param text Text of button.
147 @param reference Pointer to variable read and written by this widget. 149 @param reference Pointer to variable read and written by this widget.
148 @param parent Parent widget. 150 @param parent Parent widget.
149 */ 151 */
150 KPrefsDialogWidColor(const QString &text,QColor *reference,QWidget *parent); 152 KPrefsDialogWidColor(const QString &text,QColor *reference,QWidget *parent);
151 /** 153 /**
152 Destruct color setting widget. 154 Destruct color setting widget.
153 */ 155 */
154 ~KPrefsDialogWidColor(); 156 ~KPrefsDialogWidColor();
155 157
156 /** 158 /**
157 Return QLabel for the button 159 Return QLabel for the button
158 */ 160 */
159 QLabel *label(); 161 QLabel *label();
160 /** 162 /**
161 Return button opening the color dialog. 163 Return button opening the color dialog.
162 */ 164 */
163 KColorButton *button(); 165 KColorButton *button();
164 166
165 void readConfig(); 167 void readConfig();
166 void writeConfig(); 168 void writeConfig();
167 169
168 private: 170 private:
169 QColor *mReference; 171 QColor *mReference;
170 172
171 QLabel *mLabel; 173 QLabel *mLabel;
172 KColorButton *mButton; 174 KColorButton *mButton;
173}; 175};
174 176
175/** 177/**
176 @short Widget for font settings in @ref KPrefsDialog. 178 @short Widget for font settings in @ref KPrefsDialog.
177 179
178 This class provides a widget for configuring font values. It is meant to be 180 This class provides a widget for configuring font values. It is meant to be
179 used by KPrefsDialog. The user is responsible for the layout management. 181 used by KPrefsDialog. The user is responsible for the layout management.
180*/ 182*/
181class KPrefsDialogWidFont : public KPrefsDialogWid 183class KPrefsDialogWidFont : public KPrefsDialogWid
182{ 184{
183 Q_OBJECT 185 Q_OBJECT
184 public: 186 public:
185 /** 187 /**
186 Create a font widget consisting of a test field and a button for opening 188 Create a font widget consisting of a test field and a button for opening
187 a font dialog. 189 a font dialog.
188 190
189 @param label Text of label. 191 @param label Text of label.
190 @param reference Pointer to variable read and written by this widget. 192 @param reference Pointer to variable read and written by this widget.
191 @param parent Parent widget. 193 @param parent Parent widget.
192 */ 194 */
193 KPrefsDialogWidFont(const QString &sampleText,const QString &labelText, 195 KPrefsDialogWidFont(const QString &sampleText,const QString &labelText,
194 QFont *reference,QWidget *parent); 196 QFont *reference,QWidget *parent);
195 /** 197 /**
196 Destruct font setting widget. 198 Destruct font setting widget.
197 */ 199 */
198 ~KPrefsDialogWidFont(); 200 ~KPrefsDialogWidFont();
199 201
200 /** 202 /**
201 Return label. 203 Return label.
202 */ 204 */
203 QLabel *label(); 205 QLabel *label();
204 /** 206 /**
205 Return QFrame used as preview field. 207 Return QFrame used as preview field.
206 */ 208 */
207 QLabel *preview(); 209 QLabel *preview();
208 /** 210 /**
209 Return button opening the font dialog. 211 Return button opening the font dialog.
210 */ 212 */
211 QPushButton *button(); 213 QPushButton *button();
212 214
213 void readConfig(); 215 void readConfig();
214 void writeConfig(); 216 void writeConfig();
215 217
216 protected slots: 218 protected slots:
217 void selectFont(); 219 void selectFont();
218 220
219 private: 221 private:
220 QFont *mReference; 222 QFont *mReference;
221 223
222 QLabel *mLabel; 224 QLabel *mLabel;
223 QLabel *mPreview; 225 QLabel *mPreview;
224 QPushButton *mButton; 226 QPushButton *mButton;
225}; 227};
226 228
227/** 229/**
228 @short Widget for settings represented by a group of radio buttons in 230 @short Widget for settings represented by a group of radio buttons in
229 @ref KPrefsDialog. 231 @ref KPrefsDialog.
230 232
231 This class provides a widget for configuring selections. It is meant to be 233 This class provides a widget for configuring selections. It is meant to be
232 used by KPrefsDialog. The user is responsible for the layout management. The 234 used by KPrefsDialog. The user is responsible for the layout management. The
233 setting is interpreted as an int value, corresponding to the position of the 235 setting is interpreted as an int value, corresponding to the position of the
234 radio button. The position of the button is defined by the sequence of @ref 236 radio button. The position of the button is defined by the sequence of @ref
235 addRadio() calls, starting with 0. 237 addRadio() calls, starting with 0.
236*/ 238*/
237class KPrefsDialogWidRadios : public KPrefsDialogWid 239class KPrefsDialogWidRadios : public KPrefsDialogWid
238{ 240{
239 public: 241 public:
240 /** 242 /**
241 Create a widget for selection of an option. It consists of a box with 243 Create a widget for selection of an option. It consists of a box with
242 several radio buttons. 244 several radio buttons.
243 245
244 @param text Text of main box. 246 @param text Text of main box.
245 @param reference Pointer to variable read and written by this widget. 247 @param reference Pointer to variable read and written by this widget.
246 @param parent Parent widget. 248 @param parent Parent widget.
247 */ 249 */
248 KPrefsDialogWidRadios(const QString &text,int *reference,QWidget *parent); 250 KPrefsDialogWidRadios(const QString &text,int *reference,QWidget *parent);
249 virtual ~KPrefsDialogWidRadios(); 251 virtual ~KPrefsDialogWidRadios();
250 252
251 /** 253 /**
252 Add a radio button. 254 Add a radio button.
253 255
254 @param text Text of the button. 256 @param text Text of the button.
255 */ 257 */
256 void addRadio(const QString &text); 258 void addRadio(const QString &text);
257 259
258 /** 260 /**
259 Return the box widget used by this widget. 261 Return the box widget used by this widget.
260 */ 262 */
261 QButtonGroup *groupBox(); 263 Q3ButtonGroup *groupBox();
262 264
263 void readConfig(); 265 void readConfig();
264 void writeConfig(); 266 void writeConfig();
265 267
266 private: 268 private:
267 int *mReference; 269 int *mReference;
268 270
269 QButtonGroup *mBox; 271 Q3ButtonGroup *mBox;
270}; 272};
271 273
272 274
273/** 275/**
274 @short Widget for string settings in @ref KPrefsDialog. 276 @short Widget for string settings in @ref KPrefsDialog.
275 277
276 This class provides a widget for configuring string values. It is meant to be 278 This class provides a widget for configuring string values. It is meant to be
277 used by KPrefsDialog. The user is responsible for the layout management. 279 used by KPrefsDialog. The user is responsible for the layout management.
278*/ 280*/
279class KPrefsDialogWidString : public KPrefsDialogWid 281class KPrefsDialogWidString : public KPrefsDialogWid
280{ 282{
281 public: 283 public:
282 /** 284 /**
283 Create a string widget consisting of a test label and a line edit. 285 Create a string widget consisting of a test label and a line edit.
284 286
285 @param text Text of label. 287 @param text Text of label.
286 @param reference Pointer to variable read and written by this widget. 288 @param reference Pointer to variable read and written by this widget.
287 @param parent Parent widget. 289 @param parent Parent widget.
288 */ 290 */
289 KPrefsDialogWidString(const QString &text,QString *reference,QWidget *parent,QLineEdit::EchoMode echomode=QLineEdit::Normal); 291 KPrefsDialogWidString(const QString &text,QString *reference,QWidget *parent,QLineEdit::EchoMode echomode=QLineEdit::Normal);
290 /** 292 /**
291 Destructor. 293 Destructor.
292 */ 294 */
293 virtual ~KPrefsDialogWidString(); 295 virtual ~KPrefsDialogWidString();
294 296
295 /** 297 /**
296 Return label used by this widget. 298 Return label used by this widget.
297 */ 299 */
298 QLabel *label(); 300 QLabel *label();
299 /** 301 /**
300 Return QLineEdit used by this widget. 302 Return QLineEdit used by this widget.
301 */ 303 */
302 QLineEdit *lineEdit(); 304 QLineEdit *lineEdit();
303 305
304 void readConfig(); 306 void readConfig();
305 void writeConfig(); 307 void writeConfig();
306 308
307 private: 309 private:
308 QString *mReference; 310 QString *mReference;
309 311
310 QLabel *mLabel; 312 QLabel *mLabel;
311 QLineEdit *mEdit; 313 QLineEdit *mEdit;
312}; 314};
313 315
314 316
315/** 317/**
316 @short Base class for a preferences dialog. 318 @short Base class for a preferences dialog.
317 319
318 This class provides the framework for a preferences dialog. You have to 320 This class provides the framework for a preferences dialog. You have to
319 subclass it and add the code to create the actual configuration widgets and 321 subclass it and add the code to create the actual configuration widgets and
320 do the layout management. 322 do the layout management.
321 323
322 KPrefsDialog provides functions to add subclasses of @ref KPrefsDialogWid. For 324 KPrefsDialog provides functions to add subclasses of @ref KPrefsDialogWid. For
323 these widgets the reading, writing and setting to default values is handled 325 these widgets the reading, writing and setting to default values is handled
324 automatically. Custom widgets have to be handled in the functions @ref 326 automatically. Custom widgets have to be handled in the functions @ref
325 usrReadConfig() and @ref usrWriteConfig(). 327 usrReadConfig() and @ref usrWriteConfig().
326*/ 328*/
327class KPrefsDialog : public KDialogBase 329class KPrefsDialog : public KDialogBase
328{ 330{
329 Q_OBJECT 331 Q_OBJECT
330 public: 332 public:
331 /** 333 /**
332 Create a KPrefsDialog for a KPrefs object. 334 Create a KPrefsDialog for a KPrefs object.
333 335
334 @param prefs KPrefs object used to access te configuration. 336 @param prefs KPrefs object used to access te configuration.
335 @param parent Parent widget. 337 @param parent Parent widget.
336 @param name Widget name. 338 @param name Widget name.
337 @param modal true, if dialog has to be modal, false for non-modal. 339 @param modal true, if dialog has to be modal, false for non-modal.
338 */ 340 */
339 KPrefsDialog(KPrefs *prefs,QWidget *parent=0,char *name=0,bool modal=false); 341 KPrefsDialog(KPrefs *prefs,QWidget *parent=0,char *name=0,bool modal=false);
340 /** 342 /**
341 Destructor. 343 Destructor.
342 */ 344 */
343 virtual ~KPrefsDialog(); 345 virtual ~KPrefsDialog();
344 346
345 /** 347 /**
346 Register a custom KPrefsDialogWid object. 348 Register a custom KPrefsDialogWid object.
347 */ 349 */
348 void addWid(KPrefsDialogWid *); 350 void addWid(KPrefsDialogWid *);
349 /** 351 /**
350 Register a @ref KPrefsDialogWidBool object. 352 Register a @ref KPrefsDialogWidBool object.
351 353
352 @param text Text of bool widget. 354 @param text Text of bool widget.
353 @param reference Reference to variable storing the setting. 355 @param reference Reference to variable storing the setting.
354 @param parent Parent widget. 356 @param parent Parent widget.
355 */ 357 */
356 KPrefsDialogWidBool *addWidBool(const QString &text,bool *reference,QWidget *parent); 358 KPrefsDialogWidBool *addWidBool(const QString &text,bool *reference,QWidget *parent);
357 /** 359 /**
358 Register a @ref KPrefsDialogWidTime object. 360 Register a @ref KPrefsDialogWidTime object.
359 361
360 @param text Text of time widget. 362 @param text Text of time widget.
361 @param reference Reference to variable storing the setting. 363 @param reference Reference to variable storing the setting.
362 @param parent Parent widget. 364 @param parent Parent widget.
363 */ 365 */
364 KPrefsDialogWidTime *addWidTime(const QString &text,int *reference,QWidget *parent); 366 KPrefsDialogWidTime *addWidTime(const QString &text,int *reference,QWidget *parent);
365 /** 367 /**
366 Register a @ref KPrefsDialogWidColor object. 368 Register a @ref KPrefsDialogWidColor object.
367 369
368 @param text Text of color widget. 370 @param text Text of color widget.
369 @param reference Reference to variable storing the setting. 371 @param reference Reference to variable storing the setting.
370 @param parent Parent widget. 372 @param parent Parent widget.
371 */ 373 */
372 KPrefsDialogWidColor *addWidColor(const QString &text,QColor *reference,QWidget *parent); 374 KPrefsDialogWidColor *addWidColor(const QString &text,QColor *reference,QWidget *parent);
373 /** 375 /**
374 Register a @ref KPrefsDialogWidRadios object. 376 Register a @ref KPrefsDialogWidRadios object.
375 377
376 @param text Text of radio button box widget. 378 @param text Text of radio button box widget.
377 @param reference Reference to variable storing the setting. 379 @param reference Reference to variable storing the setting.
378 @param parent Parent widget. 380 @param parent Parent widget.
379 */ 381 */
380 KPrefsDialogWidRadios *addWidRadios(const QString &text,int *reference,QWidget *parent); 382 KPrefsDialogWidRadios *addWidRadios(const QString &text,int *reference,QWidget *parent);
381 /** 383 /**
382 Register a @ref KPrefsDialogWidString object. 384 Register a @ref KPrefsDialogWidString object.
383 385
384 @param text Text of string widget. 386 @param text Text of string widget.
385 @param reference Reference to variable storing the setting. 387 @param reference Reference to variable storing the setting.
386 @param parent Parent widget. 388 @param parent Parent widget.
387 */ 389 */
388 KPrefsDialogWidString *addWidString(const QString &text,QString *reference,QWidget *parent); 390 KPrefsDialogWidString *addWidString(const QString &text,QString *reference,QWidget *parent);
389 /** 391 /**
390 Register a password @ref KPrefsDialogWidString object, with echomode set to QLineEdit::Password. 392 Register a password @ref KPrefsDialogWidString object, with echomode set to QLineEdit::Password.
391 393
392 @param text Text of string widget. 394 @param text Text of string widget.
393 @param reference Reference to variable storing the setting. 395 @param reference Reference to variable storing the setting.
394 @param parent Parent widget. 396 @param parent Parent widget.
395 */ 397 */
396 KPrefsDialogWidString *addWidPassword (const QString &text,QString *reference,QWidget *parent); 398 KPrefsDialogWidString *addWidPassword (const QString &text,QString *reference,QWidget *parent);
397 /** 399 /**
398 Register a @ref KPrefsDialogWidFont object. 400 Register a @ref KPrefsDialogWidFont object.
399 401
400 @param sampleText Sample text of font widget. 402 @param sampleText Sample text of font widget.
401 @param buttonText Button text of font widget. 403 @param buttonText Button text of font widget.
402 @param reference Reference to variable storing the setting. 404 @param reference Reference to variable storing the setting.
403 @param parent Parent widget. 405 @param parent Parent widget.
404 */ 406 */
405 KPrefsDialogWidFont *addWidFont(const QString &sampleText,const QString &buttonText, 407 KPrefsDialogWidFont *addWidFont(const QString &sampleText,const QString &buttonText,
406 QFont *reference,QWidget *parent); 408 QFont *reference,QWidget *parent);
407 409
408 public slots: 410 public slots:
409 /** Set all widgets to default values. */ 411 /** Set all widgets to default values. */
410 void setDefaults(); 412 void setDefaults();
411 413
412 /** Read preferences from config file. */ 414 /** Read preferences from config file. */
413 void readConfig(); 415 void readConfig();
414 416
415 /** Write preferences to config file. */ 417 /** Write preferences to config file. */
416 void writeConfig(); 418 void writeConfig();
417 419
418 signals: 420 signals:
419 /** Emitted when the a changed configuration has been stored. */ 421 /** Emitted when the a changed configuration has been stored. */
420 void configChanged(); 422 void configChanged();
421 423
422 protected slots: 424 protected slots:
423 /** Apply changes to preferences */ 425 /** Apply changes to preferences */
424 void slotApply(); 426 void slotApply();
425 427
426 void accept(); 428 void accept();
427 /** Accept changes to preferences and close dialog */ 429 /** Accept changes to preferences and close dialog */
428 void slotOk(); 430 void slotOk();
429 431
430 /** Set preferences to default values */ 432 /** Set preferences to default values */
431 void slotDefault(); 433 void slotDefault();
432 434
433 protected: 435 protected:
434 /** Implement this to read custom configuration widgets. */ 436 /** Implement this to read custom configuration widgets. */
435 virtual void usrReadConfig() {} 437 virtual void usrReadConfig() {}
436 /** Implement this to write custom configuration widgets. */ 438 /** Implement this to write custom configuration widgets. */
437 virtual void usrWriteConfig() {} 439 virtual void usrWriteConfig() {}
438 440
439 private: 441 private:
440 KPrefs *mPrefs; 442 KPrefs *mPrefs;
441 443
442 QPtrList<KPrefsDialogWid> mPrefsWids; 444 Q3PtrList<KPrefsDialogWid> mPrefsWids;
443}; 445};
444 446
445 447
446#include "kcmconfigs/kdepimconfigwidget.h" 448#include "kcmconfigs/kdepimconfigwidget.h"
447class KPimPrefsGlobalDialog : public KPrefsDialog 449class KPimPrefsGlobalDialog : public KPrefsDialog
448{ 450{
449 Q_OBJECT 451 Q_OBJECT
450 public: 452 public:
451 KPimPrefsGlobalDialog(QWidget *parent=0,char *name=0,bool modal=true); 453 KPimPrefsGlobalDialog(QWidget *parent=0,char *name=0,bool modal=true);
452 /** 454 /**
453 Destructor. 455 Destructor.
454 */ 456 */
455 void showTZconfig(); 457 void showTZconfig();
456 458
457 public slots: 459 public slots:
458 460
459 signals: 461 signals:
460 protected slots: 462 protected slots:
461 463
462 protected: 464 protected:
463 void usrReadConfig(); 465 void usrReadConfig();
464 virtual void usrWriteConfig() ; 466 virtual void usrWriteConfig() ;
465 467
466 private: 468 private:
467 KDEPIMConfigWidget* kdelibcfg; 469 KDEPIMConfigWidget* kdelibcfg;
468 470
469}; 471};
470 472
471#endif 473#endif