-rw-r--r-- | microkde/kutils/kcmultidialog.cpp | 13 | ||||
-rw-r--r-- | microkde/kutils/kcmultidialog.h | 4 |
2 files changed, 11 insertions, 6 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 @@ -33,14 +33,15 @@ #include <krun.h> #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 *))); @@ -73,9 +74,9 @@ void KCMultiDialog::slotDefault() for (; it.current(); ++it) { if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex) { - (*it)->defaults(); + (*it)->defaults(mPrefs); clientChanged(true); return; } } @@ -87,9 +88,9 @@ void KCMultiDialog::slotApply() qDebug("KCMultiDialog::slotApply clicked"); QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) - (*it)->save(); + (*it)->save(mPrefs); clientChanged(false); emit applyClicked(); @@ -101,9 +102,9 @@ void KCMultiDialog::slotOk() qDebug("KCMultiDialog::slotOk clicked"); QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) - (*it)->save(); + (*it)->save(mPrefs); accept(); emit okClicked(); } @@ -159,8 +160,10 @@ 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 @@ -28,8 +28,9 @@ #include <kdialogbase.h> #include <kjanuswidget.h> #include <kcmodule.h> +class KPrefs; /** * A class that offers a @ref KDialogBase containing arbitrary KControl Modules * @@ -52,9 +53,9 @@ public: * @param baseGroup The baseGroup, if you want to call a module out of * 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); /** @@ -137,8 +138,9 @@ private: QString _baseGroup; //US KJanusWidget* mMainWidget; + KPrefs* mPrefs; // For future use class KCMultiDialogPrivate; KCMultiDialogPrivate *d; |