KPrefsDialog Class Reference
Base class for a preferences dialog. More...
#include <kprefsdialog.h>
Public Slots | |
void | setDefaults () |
Set all widgets to default values. | |
void | readConfig () |
Read preferences from config file. | |
void | writeConfig () |
Write preferences to config file. | |
Signals | |
void | configChanged () |
Emitted when the a changed configuration has been stored. | |
Public Member Functions | |
KPrefsDialog (KPrefs *prefs, QWidget *parent=0, char *name=0, bool modal=false) | |
Create a KPrefsDialog for a KPrefs object. | |
virtual | ~KPrefsDialog () |
Destructor. | |
void | addWid (KPrefsWid *) |
Register a custom KPrefsWid object. | |
KPrefsWidBool * | addWidBool (const QString &text, bool *reference, QWidget *parent) |
Register a KPrefsWidBool object. | |
KPrefsWidTime * | addWidTime (const QString &text, int *reference, QWidget *parent) |
Register a KPrefsWidTime object. | |
KPrefsWidColor * | addWidColor (const QString &text, QColor *reference, QWidget *parent) |
Register a KPrefsWidColor object. | |
KPrefsWidRadios * | addWidRadios (const QString &text, int *reference, QWidget *parent) |
Register a KPrefsWidRadios object. | |
KPrefsWidString * | addWidString (const QString &text, QString *reference, QWidget *parent) |
Register a KPrefsWidString object. | |
KPrefsWidString * | addWidPassword (const QString &text, QString *reference, QWidget *parent) |
Register a password KPrefsWidString object, with echomode set to QLineEdit::Password. | |
KPrefsWidFont * | addWidFont (const QString &sampleText, const QString &buttonText, QFont *reference, QWidget *parent) |
Register a KPrefsWidFont object. | |
Protected Slots | |
void | slotApply () |
Apply changes to preferences. | |
void | slotOk () |
Accept changes to preferences and close dialog. | |
void | slotDefault () |
Set preferences to default values. | |
Protected Member Functions | |
virtual void | usrReadConfig () |
Implement this to read custom configuration widgets. | |
virtual void | usrWriteConfig () |
Implement this to write custom configuration widgets. |
Detailed Description
Base class for a preferences dialog.This class provides the framework for a preferences dialog. You have to subclass it and add the code to create the actual configuration widgets and do the layout management.
KPrefsDialog provides functions to add subclasses of KPrefsWid. For these widgets the reading, writing and setting to default values is handled automatically. Custom widgets have to be handled in the functions usrReadConfig() and usrWriteConfig().
Definition at line 328 of file kprefsdialog.h.
Constructor & Destructor Documentation
|
Create a KPrefsDialog for a KPrefs object.
Definition at line 269 of file kprefsdialog.cpp. References setDefaults(). |
|
Destructor.
Definition at line 282 of file kprefsdialog.cpp. |
Member Function Documentation
|
Register a custom KPrefsWid object.
Definition at line 286 of file kprefsdialog.cpp. References QPtrList< KPrefsWid >::append(). Referenced by addWidBool(), addWidColor(), addWidFont(), addWidPassword(), addWidRadios(), addWidString(), and addWidTime(). |
|
Register a KPrefsWidBool object.
Definition at line 291 of file kprefsdialog.cpp. References addWid(). |
|
Register a KPrefsWidTime object.
Definition at line 298 of file kprefsdialog.cpp. References addWid(). |
|
Register a KPrefsWidColor object.
Definition at line 305 of file kprefsdialog.cpp. References addWid(). |
|
Register a KPrefsWidRadios object.
Definition at line 312 of file kprefsdialog.cpp. References addWid(). |
|
Register a KPrefsWidString object.
Definition at line 319 of file kprefsdialog.cpp. References addWid(). |
|
Register a password KPrefsWidString object, with echomode set to QLineEdit::Password.
Definition at line 326 of file kprefsdialog.cpp. References addWid(). |
|
Register a KPrefsWidFont object.
Definition at line 333 of file kprefsdialog.cpp. References addWid(). |
|
Set all widgets to default values.
Definition at line 341 of file kprefsdialog.cpp. References readConfig(), and KPrefs::setDefaults(). Referenced by KPrefsDialog(), and slotDefault(). |
|
Read preferences from config file.
Definition at line 348 of file kprefsdialog.cpp. References QPtrList< KPrefsWid >::first(), QPtrList< KPrefsWid >::next(), KPrefsWid::readConfig(), and usrReadConfig(). Referenced by setDefaults(). |
|
Write preferences to config file.
Definition at line 360 of file kprefsdialog.cpp. References QPtrList< KPrefsWid >::first(), QPtrList< KPrefsWid >::next(), usrWriteConfig(), KPrefs::writeConfig(), and KPrefsWid::writeConfig(). Referenced by slotApply(). |
|
Emitted when the a changed configuration has been stored.
Referenced by slotApply(). |
|
Apply changes to preferences.
Definition at line 379 of file kprefsdialog.cpp. References configChanged(), and writeConfig(). Referenced by slotOk(). |
|
Accept changes to preferences and close dialog.
Definition at line 385 of file kprefsdialog.cpp. References slotApply(). |
|
Set preferences to default values.
Definition at line 391 of file kprefsdialog.cpp. References setDefaults(). |
|
Implement this to read custom configuration widgets.
Definition at line 435 of file kprefsdialog.h. Referenced by readConfig(). |
|
Implement this to write custom configuration widgets.
Definition at line 437 of file kprefsdialog.h. Referenced by writeConfig(). |
The documentation for this class was generated from the following files: