class KConfigDialogManager


Table of contents
Modules
kdeui Classes
All Classes
Module kdeui
Namespace global
Class KConfigDialogManager
Inherits QObject

Provides a means of automatically retrieving, saving and resetting KConfigSkeleton based settings in a dialog.

The KConfigDialogManager class provides a means of automatically retrieving, saving and resetting basic settings. It also can emit signals when settings have been changed (settings were saved) or modified (the user changes a checkbox from on to off).

The names of the widgets to be managed have to correspond to the names of the configuration entries in the KConfigSkeleton object plus an additional "kcfg_" prefix. For example a widget named "kcfg_MyOption" would be associated to the configuration entry "MyOption".

New widgets can be added to the map using the static functions propertyMap() and changedMap(). Note that you can't just add any class. The class must have a matching Q_PROPERTY(...) macro defined, and a signal which emitted when the property changed. Note: by default, the property which defined as "USER true" is used.

For example (note that KColorButton is already added and it doesn't need to manually added):

kcolorbutton.h defines the following property:

Q_PROPERTY( QColor color READ color WRITE setColor USER true )
and signal:
void changed( const QColor &newColor );

To add KColorButton the following code would be inserted in the main:

KConfigDialogManager.changedMap()->insert("KColorButton", SIGNAL(changed(const QColor &)));

Author Benjamin C Meyer Author Waldo Bastian



methods