summaryrefslogtreecommitdiffabout
path: root/libkdepim/kprefsdialog.h
Unidiff
Diffstat (limited to 'libkdepim/kprefsdialog.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/kprefsdialog.h70
1 files changed, 35 insertions, 35 deletions
diff --git a/libkdepim/kprefsdialog.h b/libkdepim/kprefsdialog.h
index dceab01..ad13b78 100644
--- a/libkdepim/kprefsdialog.h
+++ b/libkdepim/kprefsdialog.h
@@ -43,13 +43,13 @@ class QButtonGroup;
43 @author Cornelius Schumacher 43 @author Cornelius Schumacher
44 @see KPrefsDialog 44 @see KPrefsDialog
45 45
46 This class provides the interface for the preferences widgets used by 46 This class provides the interface for the preferences widgets used by
47 KPrefsDialog. 47 KPrefsDialog.
48*/ 48*/
49class KPrefsWid 49class KPrefsDialogWid
50{ 50{
51 public: 51 public:
52 /** 52 /**
53 This function is called to read value of the setting from the 53 This function is called to read value of the setting from the
54 stored configuration and display it in the widget. 54 stored configuration and display it in the widget.
55 */ 55 */
@@ -64,23 +64,23 @@ class KPrefsWid
64/** 64/**
65 @short Widget for bool settings in @ref KPrefsDialog. 65 @short Widget for bool settings in @ref KPrefsDialog.
66 66
67 This class provides a widget for configuring bool values. It is meant to be 67 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. 68 used by KPrefsDialog. The user is responsible for the layout management.
69*/ 69*/
70class KPrefsWidBool : public KPrefsWid 70class KPrefsDialogWidBool : public KPrefsDialogWid
71{ 71{
72 public: 72 public:
73 /** 73 /**
74 Create a bool widget consisting of a QCheckbox. 74 Create a bool widget consisting of a QCheckbox.
75 75
76 @param text Text of QCheckBox. 76 @param text Text of QCheckBox.
77 @param reference Pointer to variable read and written by this widget. 77 @param reference Pointer to variable read and written by this widget.
78 @param parent Parent widget. 78 @param parent Parent widget.
79 */ 79 */
80 KPrefsWidBool(const QString &text,bool *reference,QWidget *parent); 80 KPrefsDialogWidBool(const QString &text,bool *reference,QWidget *parent);
81 81
82 /** 82 /**
83 Return the QCheckbox used by this widget. 83 Return the QCheckbox used by this widget.
84 */ 84 */
85 QCheckBox *checkBox(); 85 QCheckBox *checkBox();
86 86
@@ -96,23 +96,23 @@ class KPrefsWidBool : public KPrefsWid
96/** 96/**
97 @short Widget for time settings in @ref KPrefsDialog. 97 @short Widget for time settings in @ref KPrefsDialog.
98 98
99 This class provides a widget for configuring time values. It is meant to be 99 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. 100 used by KPrefsDialog. The user is responsible for the layout management.
101*/ 101*/
102class KPrefsWidTime : public KPrefsWid 102class KPrefsDialogWidTime : public KPrefsDialogWid
103{ 103{
104 public: 104 public:
105 /** 105 /**
106 Create a time widget consisting of a label and a spinbox. 106 Create a time widget consisting of a label and a spinbox.
107 107
108 @param text Text of Label. 108 @param text Text of Label.
109 @param reference Pointer to variable read and written by this widget. 109 @param reference Pointer to variable read and written by this widget.
110 @param parent Parent widget. 110 @param parent Parent widget.
111 */ 111 */
112 KPrefsWidTime(const QString &text,int *reference,QWidget *parent); 112 KPrefsDialogWidTime(const QString &text,int *reference,QWidget *parent);
113 113
114 /** 114 /**
115 Return QLabel used by this widget. 115 Return QLabel used by this widget.
116 */ 116 */
117 QLabel *label(); 117 QLabel *label();
118 /** 118 /**
@@ -133,29 +133,29 @@ class KPrefsWidTime : public KPrefsWid
133/** 133/**
134 @short Widget for color settings in @ref KPrefsDialog. 134 @short Widget for color settings in @ref KPrefsDialog.
135 135
136 This class provides a widget for configuring color values. It is meant to be 136 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. 137 used by KPrefsDialog. The user is responsible for the layout management.
138*/ 138*/
139class KPrefsWidColor : public QObject, public KPrefsWid 139class KPrefsDialogWidColor : public QObject, public KPrefsDialogWid
140{ 140{
141 Q_OBJECT 141 Q_OBJECT
142 public: 142 public:
143 /** 143 /**
144 Create a color widget consisting of a test field and a button for opening 144 Create a color widget consisting of a test field and a button for opening
145 a color dialog. 145 a color dialog.
146 146
147 @param text Text of button. 147 @param text Text of button.
148 @param reference Pointer to variable read and written by this widget. 148 @param reference Pointer to variable read and written by this widget.
149 @param parent Parent widget. 149 @param parent Parent widget.
150 */ 150 */
151 KPrefsWidColor(const QString &text,QColor *reference,QWidget *parent); 151 KPrefsDialogWidColor(const QString &text,QColor *reference,QWidget *parent);
152 /** 152 /**
153 Destruct color setting widget. 153 Destruct color setting widget.
154 */ 154 */
155 ~KPrefsWidColor(); 155 ~KPrefsDialogWidColor();
156 156
157 /** 157 /**
158 Return QLabel for the button 158 Return QLabel for the button
159 */ 159 */
160 QLabel *label(); 160 QLabel *label();
161 /** 161 /**
@@ -176,30 +176,30 @@ class KPrefsWidColor : public QObject, public KPrefsWid
176/** 176/**
177 @short Widget for font settings in @ref KPrefsDialog. 177 @short Widget for font settings in @ref KPrefsDialog.
178 178
179 This class provides a widget for configuring font values. It is meant to be 179 This class provides a widget for configuring font values. It is meant to be
180 used by KPrefsDialog. The user is responsible for the layout management. 180 used by KPrefsDialog. The user is responsible for the layout management.
181*/ 181*/
182class KPrefsWidFont : public QObject, public KPrefsWid 182class KPrefsDialogWidFont : public QObject, public KPrefsDialogWid
183{ 183{
184 Q_OBJECT 184 Q_OBJECT
185 public: 185 public:
186 /** 186 /**
187 Create a font widget consisting of a test field and a button for opening 187 Create a font widget consisting of a test field and a button for opening
188 a font dialog. 188 a font dialog.
189 189
190 @param label Text of label. 190 @param label Text of label.
191 @param reference Pointer to variable read and written by this widget. 191 @param reference Pointer to variable read and written by this widget.
192 @param parent Parent widget. 192 @param parent Parent widget.
193 */ 193 */
194 KPrefsWidFont(const QString &sampleText,const QString &labelText, 194 KPrefsDialogWidFont(const QString &sampleText,const QString &labelText,
195 QFont *reference,QWidget *parent); 195 QFont *reference,QWidget *parent);
196 /** 196 /**
197 Destruct font setting widget. 197 Destruct font setting widget.
198 */ 198 */
199 ~KPrefsWidFont(); 199 ~KPrefsDialogWidFont();
200 200
201 /** 201 /**
202 Return label. 202 Return label.
203 */ 203 */
204 QLabel *label(); 204 QLabel *label();
205 /** 205 /**
@@ -232,25 +232,25 @@ class KPrefsWidFont : public QObject, public KPrefsWid
232 This class provides a widget for configuring selections. It is meant to be 232 This class provides a widget for configuring selections. It is meant to be
233 used by KPrefsDialog. The user is responsible for the layout management. The 233 used by KPrefsDialog. The user is responsible for the layout management. The
234 setting is interpreted as an int value, corresponding to the position of the 234 setting is interpreted as an int value, corresponding to the position of the
235 radio button. The position of the button is defined by the sequence of @ref 235 radio button. The position of the button is defined by the sequence of @ref
236 addRadio() calls, starting with 0. 236 addRadio() calls, starting with 0.
237*/ 237*/
238class KPrefsWidRadios : public KPrefsWid 238class KPrefsDialogWidRadios : public KPrefsDialogWid
239{ 239{
240 public: 240 public:
241 /** 241 /**
242 Create a widget for selection of an option. It consists of a box with 242 Create a widget for selection of an option. It consists of a box with
243 several radio buttons. 243 several radio buttons.
244 244
245 @param text Text of main box. 245 @param text Text of main box.
246 @param reference Pointer to variable read and written by this widget. 246 @param reference Pointer to variable read and written by this widget.
247 @param parent Parent widget. 247 @param parent Parent widget.
248 */ 248 */
249 KPrefsWidRadios(const QString &text,int *reference,QWidget *parent); 249 KPrefsDialogWidRadios(const QString &text,int *reference,QWidget *parent);
250 virtual ~KPrefsWidRadios(); 250 virtual ~KPrefsDialogWidRadios();
251 251
252 /** 252 /**
253 Add a radio button. 253 Add a radio button.
254 254
255 @param text Text of the button. 255 @param text Text of the button.
256 */ 256 */
@@ -274,27 +274,27 @@ class KPrefsWidRadios : public KPrefsWid
274/** 274/**
275 @short Widget for string settings in @ref KPrefsDialog. 275 @short Widget for string settings in @ref KPrefsDialog.
276 276
277 This class provides a widget for configuring string values. It is meant to be 277 This class provides a widget for configuring string values. It is meant to be
278 used by KPrefsDialog. The user is responsible for the layout management. 278 used by KPrefsDialog. The user is responsible for the layout management.
279*/ 279*/
280class KPrefsWidString : public KPrefsWid 280class KPrefsDialogWidString : public KPrefsDialogWid
281{ 281{
282 public: 282 public:
283 /** 283 /**
284 Create a string widget consisting of a test label and a line edit. 284 Create a string widget consisting of a test label and a line edit.
285 285
286 @param text Text of label. 286 @param text Text of label.
287 @param reference Pointer to variable read and written by this widget. 287 @param reference Pointer to variable read and written by this widget.
288 @param parent Parent widget. 288 @param parent Parent widget.
289 */ 289 */
290 KPrefsWidString(const QString &text,QString *reference,QWidget *parent,QLineEdit::EchoMode echomode=QLineEdit::Normal); 290 KPrefsDialogWidString(const QString &text,QString *reference,QWidget *parent,QLineEdit::EchoMode echomode=QLineEdit::Normal);
291 /** 291 /**
292 Destructor. 292 Destructor.
293 */ 293 */
294 virtual ~KPrefsWidString(); 294 virtual ~KPrefsDialogWidString();
295 295
296 /** 296 /**
297 Return label used by this widget. 297 Return label used by this widget.
298 */ 298 */
299 QLabel *label(); 299 QLabel *label();
300 /** 300 /**
@@ -317,13 +317,13 @@ class KPrefsWidString : public KPrefsWid
317 @short Base class for a preferences dialog. 317 @short Base class for a preferences dialog.
318 318
319 This class provides the framework for a preferences dialog. You have to 319 This class provides the framework for a preferences dialog. You have to
320 subclass it and add the code to create the actual configuration widgets and 320 subclass it and add the code to create the actual configuration widgets and
321 do the layout management. 321 do the layout management.
322 322
323 KPrefsDialog provides functions to add subclasses of @ref KPrefsWid. For 323 KPrefsDialog provides functions to add subclasses of @ref KPrefsDialogWid. For
324 these widgets the reading, writing and setting to default values is handled 324 these widgets the reading, writing and setting to default values is handled
325 automatically. Custom widgets have to be handled in the functions @ref 325 automatically. Custom widgets have to be handled in the functions @ref
326 usrReadConfig() and @ref usrWriteConfig(). 326 usrReadConfig() and @ref usrWriteConfig().
327*/ 327*/
328class KPrefsDialog : public KDialogBase 328class KPrefsDialog : public KDialogBase
329{ 329{
@@ -341,72 +341,72 @@ class KPrefsDialog : public KDialogBase
341 /** 341 /**
342 Destructor. 342 Destructor.
343 */ 343 */
344 virtual ~KPrefsDialog(); 344 virtual ~KPrefsDialog();
345 345
346 /** 346 /**
347 Register a custom KPrefsWid object. 347 Register a custom KPrefsDialogWid object.
348 */ 348 */
349 void addWid(KPrefsWid *); 349 void addWid(KPrefsDialogWid *);
350 /** 350 /**
351 Register a @ref KPrefsWidBool object. 351 Register a @ref KPrefsDialogWidBool object.
352 352
353 @param text Text of bool widget. 353 @param text Text of bool widget.
354 @param reference Reference to variable storing the setting. 354 @param reference Reference to variable storing the setting.
355 @param parent Parent widget. 355 @param parent Parent widget.
356 */ 356 */
357 KPrefsWidBool *addWidBool(const QString &text,bool *reference,QWidget *parent); 357 KPrefsDialogWidBool *addWidBool(const QString &text,bool *reference,QWidget *parent);
358 /** 358 /**
359 Register a @ref KPrefsWidTime object. 359 Register a @ref KPrefsDialogWidTime object.
360 360
361 @param text Text of time widget. 361 @param text Text of time widget.
362 @param reference Reference to variable storing the setting. 362 @param reference Reference to variable storing the setting.
363 @param parent Parent widget. 363 @param parent Parent widget.
364 */ 364 */
365 KPrefsWidTime *addWidTime(const QString &text,int *reference,QWidget *parent); 365 KPrefsDialogWidTime *addWidTime(const QString &text,int *reference,QWidget *parent);
366 /** 366 /**
367 Register a @ref KPrefsWidColor object. 367 Register a @ref KPrefsDialogWidColor object.
368 368
369 @param text Text of color widget. 369 @param text Text of color widget.
370 @param reference Reference to variable storing the setting. 370 @param reference Reference to variable storing the setting.
371 @param parent Parent widget. 371 @param parent Parent widget.
372 */ 372 */
373 KPrefsWidColor *addWidColor(const QString &text,QColor *reference,QWidget *parent); 373 KPrefsDialogWidColor *addWidColor(const QString &text,QColor *reference,QWidget *parent);
374 /** 374 /**
375 Register a @ref KPrefsWidRadios object. 375 Register a @ref KPrefsDialogWidRadios object.
376 376
377 @param text Text of radio button box widget. 377 @param text Text of radio button box widget.
378 @param reference Reference to variable storing the setting. 378 @param reference Reference to variable storing the setting.
379 @param parent Parent widget. 379 @param parent Parent widget.
380 */ 380 */
381 KPrefsWidRadios *addWidRadios(const QString &text,int *reference,QWidget *parent); 381 KPrefsDialogWidRadios *addWidRadios(const QString &text,int *reference,QWidget *parent);
382 /** 382 /**
383 Register a @ref KPrefsWidString object. 383 Register a @ref KPrefsDialogWidString object.
384 384
385 @param text Text of string widget. 385 @param text Text of string widget.
386 @param reference Reference to variable storing the setting. 386 @param reference Reference to variable storing the setting.
387 @param parent Parent widget. 387 @param parent Parent widget.
388 */ 388 */
389 KPrefsWidString *addWidString(const QString &text,QString *reference,QWidget *parent); 389 KPrefsDialogWidString *addWidString(const QString &text,QString *reference,QWidget *parent);
390 /** 390 /**
391 Register a password @ref KPrefsWidString object, with echomode set to QLineEdit::Password. 391 Register a password @ref KPrefsDialogWidString object, with echomode set to QLineEdit::Password.
392 392
393 @param text Text of string widget. 393 @param text Text of string widget.
394 @param reference Reference to variable storing the setting. 394 @param reference Reference to variable storing the setting.
395 @param parent Parent widget. 395 @param parent Parent widget.
396 */ 396 */
397 KPrefsWidString *addWidPassword (const QString &text,QString *reference,QWidget *parent); 397 KPrefsDialogWidString *addWidPassword (const QString &text,QString *reference,QWidget *parent);
398 /** 398 /**
399 Register a @ref KPrefsWidFont object. 399 Register a @ref KPrefsDialogWidFont object.
400 400
401 @param sampleText Sample text of font widget. 401 @param sampleText Sample text of font widget.
402 @param buttonText Button text of font widget. 402 @param buttonText Button text of font widget.
403 @param reference Reference to variable storing the setting. 403 @param reference Reference to variable storing the setting.
404 @param parent Parent widget. 404 @param parent Parent widget.
405 */ 405 */
406 KPrefsWidFont *addWidFont(const QString &sampleText,const QString &buttonText, 406 KPrefsDialogWidFont *addWidFont(const QString &sampleText,const QString &buttonText,
407 QFont *reference,QWidget *parent); 407 QFont *reference,QWidget *parent);
408 408
409 public slots: 409 public slots:
410 /** Set all widgets to default values. */ 410 /** Set all widgets to default values. */
411 void setDefaults(); 411 void setDefaults();
412 412
@@ -437,10 +437,10 @@ class KPrefsDialog : public KDialogBase
437 /** Implement this to write custom configuration widgets. */ 437 /** Implement this to write custom configuration widgets. */
438 virtual void usrWriteConfig() {} 438 virtual void usrWriteConfig() {}
439 439
440 private: 440 private:
441 KPrefs *mPrefs; 441 KPrefs *mPrefs;
442 442
443 QPtrList<KPrefsWid> mPrefsWids; 443 QPtrList<KPrefsDialogWid> mPrefsWids;
444}; 444};
445 445
446#endif 446#endif