KConfig XT / kconfig_compiler

Stefan Nikolaus stefan.nikolaus at stuco.uni-oldenburg.de
Mon Nov 29 21:09:51 GMT 2004


Am Mon, 29 Nov 2004 17:50:25 +0100 hat Stefan Nikolaus  
<stefan.nikolaus at stuco.uni-oldenburg.de> geschrieben:
> What about defining default values for the parameters passed to the  
> configuration object. Some of the member functions already define  
> default group names.
> For each member function that takes a variable group name, we define a  
> parameter and a corresponding group in the .kcfg file.
>
> For example:
>
> <kcfgfile arg="true">
>    <parameter name="ConfigGroup1">
>      <default>KMainWindow</default>
>    </parameter>
>    <parameter name="ConfigGroup2">
>      <default>MainToolbar</default>
>    </parameter>
> </kcfgfile>
>
> <group name="$(ConfigGroup1)">
>    ... <!-- e.g. entries handled by  
> KMainWindow::saveMainWindowSettings(...) -->
> </group>
> <group name="$(ConfigGroup2)">
>    ... <!-- e.g. entries handled by KToolbar::saveSettings(...) -->
> </group>
>
> If no parameter is passed to the configuration object, it works on the  
> default group. If we want to let it work on a special group, we pass the  
> corresponding parameter. In order to set the second parameter, for  
> example, without affecting the first, QString:null can be interpreted as  
> default value. That should be possible. The advantage is exactly one  
> configuration object. The disadvantage is that several parameters may  
> have to be passed. It may become confusing which parameter affects which  
> group.

I thought about something like this...

Of course the XML schema has to be adjusted.

Regards,
Stefan


-- 
Stefan Nikolaus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kcc_pd.patch
Type: application/octet-stream
Size: 1985 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041129/2b0a34da/attachment.obj>


More information about the kde-core-devel mailing list