-rw-r--r-- | microkde/kutils/kcmultidialog.cpp | 13 | ||||
-rw-r--r-- | microkde/kutils/kcmultidialog.h | 20 |
2 files changed, 19 insertions, 14 deletions
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 @@ -34,12 +34,13 @@ #include <kprocess.h> #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); //connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *))); @@ -74,7 +75,7 @@ void KCMultiDialog::slotDefault() { if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex) { - (*it)->defaults(); + (*it)->defaults(mPrefs); clientChanged(true); return; } @@ -88,7 +89,7 @@ qDebug("KCMultiDialog::slotApply clicked"); QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) - (*it)->save(); + (*it)->save(mPrefs); clientChanged(false); emit applyClicked(); @@ -102,7 +103,7 @@ qDebug("KCMultiDialog::slotOk clicked"); QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) - (*it)->save(); + (*it)->save(mPrefs); accept(); emit okClicked(); @@ -160,6 +161,8 @@ 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 @@ -29,6 +29,7 @@ #include <kjanuswidget.h> #include <kcmodule.h> +class KPrefs; /** * A class that offers a @ref KDialogBase containing arbitrary KControl Modules @@ -53,7 +54,7 @@ public: * kcontrol, just keep "settings" * @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); @@ -77,9 +78,9 @@ public: //US special method for microkde. We dop noty want to load everything dynamically. void addModule(KCModule* module );//, const QString& modulename, const QString& iconname); QVBox* getNewVBoxPage(const QString & modulename) ; - - - + + + protected slots: /** * This slot is called when the user presses the "Default" Button @@ -128,17 +129,18 @@ private: QString path; bool withfallback; }; -*/ +*/ QPtrList<KCModule> modules; -/* +/* QPtrDict<LoadInfo> moduleDict; QString _docPath; -*/ +*/ QString _baseGroup; -//US +//US KJanusWidget* mMainWidget; - + KPrefs* mPrefs; + // For future use class KCMultiDialogPrivate; KCMultiDialogPrivate *d; |