KSettings::AutoConfigModule

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


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

On Friday 12 September 2003 10:02 am, Benjamin Meyer wrote:
> 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.

As wheels pointed out that wouldnt' be consistent with the rest of kde, so 
that original way is fine.

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

scratch that, the default is false...  Maybe add an arg to setMainWidget() to 
track or not.  Then you could remove the two connect lines in the 
constructors and add them only if thearg is true.  Not sure what would be the 
best way

 -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/YdQ+1rZ3LTw38vIRArHvAKCO7OfZ3xAuoInd48UrmLoK+sIOPACdHnrP
Lb4S5W182sGLR+uWW83ltfM=
=FXfo
-----END PGP SIGNATURE-----





More information about the kde-core-devel mailing list