-rw-r--r-- | microkde/kdeui/kcmodule.h | 9 | ||||
-rw-r--r-- | microkde/kutils/kcmultidialog.cpp | 13 | ||||
-rw-r--r-- | microkde/kutils/kcmultidialog.h | 20 | ||||
-rw-r--r-- | microkde/microkdeE.pro | 2 |
4 files changed, 26 insertions, 18 deletions
diff --git a/microkde/kdeui/kcmodule.h b/microkde/kdeui/kcmodule.h index 90a87c9..bc020bc 100644 --- a/microkde/kdeui/kcmodule.h +++ b/microkde/kdeui/kcmodule.h @@ -27,4 +27,5 @@ //USclass KAboutData; class KCModulePrivate; +class KPrefs; //US class KInstance; @@ -106,5 +107,5 @@ public: * so you probably want to call this method in the constructor. */ - virtual void load() {}; + virtual void load(KPrefs* prefs) {}; /** @@ -119,5 +120,5 @@ public: * save is called when the user clicks "Apply" or "Ok". */ - virtual void save() {}; + virtual void save(KPrefs* prefs) {}; /** @@ -127,5 +128,5 @@ public: * button. It should set the display to useful values. */ - virtual void defaults() {}; + virtual void defaults(KPrefs* prefs) {}; /** @@ -137,5 +138,5 @@ public: * NOTE: The default behaviour is to call defaults(). */ - virtual void sysdefaults() { defaults(); }; + virtual void sysdefaults(KPrefs* prefs) { defaults(prefs); }; /** diff --git a/microkde/kutils/kcmultidialog.cpp b/microkde/kutils/kcmultidialog.cpp index 13be2ce..c2378fb 100644 --- a/microkde/kutils/kcmultidialog.cpp +++ b/microkde/kutils/kcmultidialog.cpp @@ -35,10 +35,11 @@ #include "kcmultidialog.h" +#include "kprefs.h" //US #include "kcmultidialog.moc" //US #include "kcmoduleloader.h" -KCMultiDialog::KCMultiDialog(const QString& baseGroup, QWidget *parent, const char *name, bool modal) +KCMultiDialog::KCMultiDialog(KPrefs* prefs, const QString& baseGroup, QWidget *parent, const char *name, bool modal) : KDialogBase(IconList, i18n("Configure"), Default |Cancel | Apply | Ok, Ok, - parent, name, modal, true), d(0L) + parent, name, modal, true), mPrefs(prefs), d(0L) { enableButton(Apply, false); @@ -75,5 +76,5 @@ void KCMultiDialog::slotDefault() if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex) { - (*it)->defaults(); + (*it)->defaults(mPrefs); clientChanged(true); return; @@ -89,5 +90,5 @@ qDebug("KCMultiDialog::slotApply clicked"); QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) - (*it)->save(); + (*it)->save(mPrefs); clientChanged(false); @@ -103,5 +104,5 @@ qDebug("KCMultiDialog::slotOk clicked"); QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) - (*it)->save(); + (*it)->save(mPrefs); accept(); @@ -161,4 +162,6 @@ void KCMultiDialog::addModule(KCModule* module ) //, const QString& modulename, modules.append(module); connect(module, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool))); +//US + module->load(mPrefs); diff --git a/microkde/kutils/kcmultidialog.h b/microkde/kutils/kcmultidialog.h index 63d5d42..a42555f 100644 --- a/microkde/kutils/kcmultidialog.h +++ b/microkde/kutils/kcmultidialog.h @@ -30,4 +30,5 @@ #include <kcmodule.h> +class KPrefs; /** @@ -54,5 +55,5 @@ public: * @param modal If you pass true here, the dialog will be modal **/ - KCMultiDialog(const QString& baseGroup = QString::fromLatin1("settings"), + KCMultiDialog(KPrefs* prefs, const QString& baseGroup = QString::fromLatin1("settings"), QWidget *parent=0, const char *name=0, bool modal=false); @@ -78,7 +79,7 @@ public: void addModule(KCModule* module );//, const QString& modulename, const QString& iconname); QVBox* getNewVBoxPage(const QString & modulename) ; - - - + + + protected slots: /** @@ -129,15 +130,16 @@ private: bool withfallback; }; -*/ +*/ QPtrList<KCModule> modules; -/* +/* QPtrDict<LoadInfo> moduleDict; QString _docPath; -*/ +*/ QString _baseGroup; -//US +//US KJanusWidget* mMainWidget; - + KPrefs* mPrefs; + // For future use class KCMultiDialogPrivate; diff --git a/microkde/microkdeE.pro b/microkde/microkdeE.pro index b664c9a..06b288b 100644 --- a/microkde/microkdeE.pro +++ b/microkde/microkdeE.pro @@ -96,4 +96,5 @@ osmartpointer.h \ kdecore/klibloader.h \ kdecore/kcatalogue.h \ + kdecore/kprefs.h \ kdecore/ksharedptr.h \ kdecore/kshell.h \ @@ -139,4 +140,5 @@ oprocess.cpp \ kdecore/klocale.cpp \ kdecore/kmdcodec.cpp \ + kdecore/kprefs.cpp \ kdecore/kshell.cpp \ kdecore/kstandarddirs.cpp \ |