author | ulf69 <ulf69> | 2004-08-06 20:29:00 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-06 20:29:00 (UTC) |
commit | 38d84409bcca83516eb816461c8b79b4cf6cbf57 (patch) (side-by-side diff) | |
tree | f7cc928c007ed6f4bca43d7474343d78bd0f4eab /microkde/kutils/kcmultidialog.cpp | |
parent | 40ac88770c32ae78e194096e758ef3818d2fb434 (diff) | |
download | kdepimpi-38d84409bcca83516eb816461c8b79b4cf6cbf57.zip kdepimpi-38d84409bcca83516eb816461c8b79b4cf6cbf57.tar.gz kdepimpi-38d84409bcca83516eb816461c8b79b4cf6cbf57.tar.bz2 |
expanded functionality of kcmultidialog to support other applications
Diffstat (limited to 'microkde/kutils/kcmultidialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | microkde/kutils/kcmultidialog.cpp | 13 |
1 files changed, 8 insertions, 5 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 @@ -31,18 +31,19 @@ #include <kmessagebox.h> //US #include <klibloader.h> #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 *))); connect( this, SIGNAL( defaultClicked() ), SLOT( slotDefault() ) ); @@ -71,13 +72,13 @@ void KCMultiDialog::slotDefault() QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) { if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex) { - (*it)->defaults(); + (*it)->defaults(mPrefs); clientChanged(true); return; } } } @@ -85,13 +86,13 @@ void KCMultiDialog::slotDefault() void KCMultiDialog::slotApply() { qDebug("KCMultiDialog::slotApply clicked"); QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) - (*it)->save(); + (*it)->save(mPrefs); clientChanged(false); emit applyClicked(); } @@ -99,13 +100,13 @@ qDebug("KCMultiDialog::slotApply clicked"); void KCMultiDialog::slotOk() { qDebug("KCMultiDialog::slotOk clicked"); QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) - (*it)->save(); + (*it)->save(mPrefs); accept(); emit okClicked(); } void KCMultiDialog::slotHelp() @@ -157,12 +158,14 @@ QVBox * KCMultiDialog::getNewVBoxPage( const QString & modulename ) //US special method for microkde. We dop noty want to load everything dynamically. void KCMultiDialog::addModule(KCModule* module ) //, const QString& modulename, const QString& iconname) { modules.append(module); connect(module, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool))); +//US + module->load(mPrefs); } void KCMultiDialog::slotAboutToShow(QWidget *page) { |