KSettings::AutoConfigModule

Benjamin Meyer ben at meyerhome.net
Fri Sep 12 15:02:12 BST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Friday 12 September 2003 6:54 am, Olivier Goffart wrote:
> I've take some time this morning to code this small class.
>
> It's a simple way to use KAutoConfig with KCModule.
> That make the whole thing more easy than it was already to do a preference
> page.
>
> This can be used with KSettings, and i guess for KControl pages too
>
> For example, in Kopete, i see more than 6 config page that could use that.
>
> source are available here:
> http://gof.homeip.net/olivier/autoconfigmodule.cpp
> http://gof.homeip.net/olivier/autoconfigmodule.h
> (only when i am online)
>
> This class could be moved in kdelibs.
> i'm not sure about the name, it could be changed.
>
> i know it's planed features frezee, but this class is small, and so the
> risk to see bug is not important.
>
> Thanks

Excellent.  I was actually thinking of writing this last night.  Reduces the 
actual number of lines in kcm modules that use kautoconfig to one :)  Add 
this to kdelibs/kdeui to go with the rest of the KCM classes (KCM authors 
please comment)?  Rename it to KCAutoConfigModule to go witht the kcm sceme 
perhaps?  Also add the bool changed() function to call 
d->kautoconfig->hasChanged();  change KAutoConfig *autoConfig() to 
KAutoConfig *kautoconfig() sense that is the object that is being returned is 
kautoconfig.

change d->kautoconfig->retrieveSettings(true); to 
d->kautoconfig->retrieveSettings();  // true is the default value.

Otherwise it looks really good.

- -Benjamin Meyer

- -- 
Public Key: http://www.csh.rit.edu/~benjamin/public_key.asc
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE/YdHo1rZ3LTw38vIRAobxAJ4q0u/ooHtckCERQBJSLwB2ISKZjQCgrbAs
LQSQEqbzCFtkPnjPevdZM2A=
=AJ+G
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list