-rw-r--r-- | microkde/kutils/kcmultidialog.cpp | 13 | ||||
-rw-r--r-- | microkde/kutils/kcmultidialog.h | 5 |
2 files changed, 7 insertions, 11 deletions
diff --git a/microkde/kutils/kcmultidialog.cpp b/microkde/kutils/kcmultidialog.cpp index c2378fb..6c82e4f 100644 --- a/microkde/kutils/kcmultidialog.cpp +++ b/microkde/kutils/kcmultidialog.cpp @@ -31,19 +31,18 @@ #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(KPrefs* prefs, const QString& baseGroup, QWidget *parent, const char *name, bool modal) +KCMultiDialog::KCMultiDialog(const QString& baseGroup, QWidget *parent, const char *name, bool modal) : KDialogBase(IconList, i18n("Configure"), Default |Cancel | Apply | Ok, Ok, - parent, name, modal, true), mPrefs(prefs), d(0L) + parent, name, modal, true), d(0L) { enableButton(Apply, false); //connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *))); connect( this, SIGNAL( defaultClicked() ), SLOT( slotDefault() ) ); @@ -72,13 +71,13 @@ void KCMultiDialog::slotDefault() QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) { if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex) { - (*it)->defaults(mPrefs); + (*it)->defaults(); clientChanged(true); return; } } } @@ -86,13 +85,13 @@ void KCMultiDialog::slotDefault() void KCMultiDialog::slotApply() { qDebug("KCMultiDialog::slotApply clicked"); QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) - (*it)->save(mPrefs); + (*it)->save(); clientChanged(false); emit applyClicked(); } @@ -100,13 +99,13 @@ qDebug("KCMultiDialog::slotApply clicked"); void KCMultiDialog::slotOk() { qDebug("KCMultiDialog::slotOk clicked"); QPtrListIterator<KCModule> it(modules); for (; it.current(); ++it) - (*it)->save(mPrefs); + (*it)->save(); accept(); emit okClicked(); } void KCMultiDialog::slotHelp() @@ -159,13 +158,13 @@ QVBox * KCMultiDialog::getNewVBoxPage( const QString & modulename ) 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); + module->load(); } void KCMultiDialog::slotAboutToShow(QWidget *page) { diff --git a/microkde/kutils/kcmultidialog.h b/microkde/kutils/kcmultidialog.h index a42555f..1aa66b2 100644 --- a/microkde/kutils/kcmultidialog.h +++ b/microkde/kutils/kcmultidialog.h @@ -26,14 +26,12 @@ #include <qptrdict.h> #include <kdialogbase.h> #include <kjanuswidget.h> #include <kcmodule.h> -class KPrefs; - /** * A class that offers a @ref KDialogBase containing arbitrary KControl Modules * * @short A method that offers a @ref KDialogBase containing arbitrary * KControl Modules. * @@ -51,13 +49,13 @@ public: * @param parent The parent Widget * @param name The widget name * @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(KPrefs* prefs, const QString& baseGroup = QString::fromLatin1("settings"), + KCMultiDialog(const QString& baseGroup = QString::fromLatin1("settings"), QWidget *parent=0, const char *name=0, bool modal=false); /** * Destructor **/ @@ -136,13 +134,12 @@ private: QString _docPath; */ QString _baseGroup; //US KJanusWidget* mMainWidget; - KPrefs* mPrefs; // For future use class KCMultiDialogPrivate; KCMultiDialogPrivate *d; }; |