RFC: simplification in configuration dialogs dvlpt

by way of "" <nicolas.hadacek@free.fr> hadacek at kde.org
Tue Apr 23 20:03:22 BST 2002


Hi,

as promised here is my proposition for some code simplification
for all configuration UI in KDE. The approach is similar to what KAction
achieved.

The code is based on a central class KUIConfig (a better name is welcome)
that associates an UI control (QCheckBox, KComboBox, KToggleAction and so on)
with a default value, a config entry and group, a text,...
This class does the loading, the saving, the defaulting and accordingly keeps
track of the modified state of the control.

The KUIConfigWidget and KUIConfigDialog classes are then used to manage the
collection of KUIConfig and to react to user actions. A simple example is
provided in the documentation of the KUIConfigWidget class ; you can also
check the configuration code in kmines and ksirtet that uses this scheme for
some time now.

waiting for your comments (in perticular from Simon),
Nicolas

PS:  as for the KAction layer, it is very possible in a second step to have
an XML file storing the various informations associated with a configuration
item.

--------
since the files are a bit large : check them at
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdegames/kmines/generic/gsettings.h?rev=1.14&content-type=text/vnd.viewcvs-markup
http://webcvs.kde.org/cgi-bin/cvsweb.cgi/kdegames/kmines/generic/gsettings.cpp?rev=1.14&content-type=text/vnd.viewcvs-markup






More information about the kde-core-devel mailing list