summaryrefslogtreecommitdiffabout
path: root/microkde
Side-by-side diff
Diffstat (limited to 'microkde') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/kcmodule.cpp16
-rw-r--r--microkde/kdeui/kcmodule.h11
-rw-r--r--microkde/kutils/kcmultidialog.cpp13
-rw-r--r--microkde/kutils/kcmultidialog.h5
4 files changed, 25 insertions, 20 deletions
diff --git a/microkde/kdeui/kcmodule.cpp b/microkde/kdeui/kcmodule.cpp
index 915cd0f..f646db3 100644
--- a/microkde/kdeui/kcmodule.cpp
+++ b/microkde/kdeui/kcmodule.cpp
@@ -35,5 +35,6 @@ public:
bool _hasOwnInstance;
+ KPrefs* _prefs;
};
-KCModule::KCModule(QWidget *parent, const char *name, const QStringList &)
+KCModule::KCModule(KPrefs* prefs, QWidget *parent, const char *name, const QStringList &)
: QWidget(parent, name), _btn(Help|Default|Apply)
@@ -43,3 +44,4 @@ KCModule::KCModule(QWidget *parent, const char *name, const QStringList &)
d->_useRootOnlyMsg = true;
-/*US
+ d->_prefs = prefs;
+/*US
d->_instance = new KInstance(name);
@@ -50,3 +52,3 @@ KCModule::KCModule(QWidget *parent, const char *name, const QStringList &)
d->_instance = new KInstance("kcmunnamed");
-*/
+*/
d->_hasOwnInstance = true;
@@ -73,3 +75,3 @@ KCModule::~KCModule()
delete d->_instance;
-*/
+*/
delete d;
@@ -96,2 +98,8 @@ bool KCModule::useRootOnlyMsg() const
}
+
+KPrefs* KCModule::getPreferences()
+{
+ return d->_prefs;
+}
+
/*US
diff --git a/microkde/kdeui/kcmodule.h b/microkde/kdeui/kcmodule.h
index bc020bc..874958c 100644
--- a/microkde/kdeui/kcmodule.h
+++ b/microkde/kdeui/kcmodule.h
@@ -85,3 +85,3 @@ public:
*/
- KCModule(QWidget *parent=0, const char *name=0, const QStringList &args=QStringList() );
+ KCModule(KPrefs* prefs, QWidget *parent=0, const char *name=0, const QStringList &args=QStringList() );
@@ -108,3 +108,3 @@ public:
*/
- virtual void load(KPrefs* prefs) {};
+ virtual void load() {};
@@ -121,3 +121,3 @@ public:
*/
- virtual void save(KPrefs* prefs) {};
+ virtual void save() {};
@@ -129,3 +129,3 @@ public:
*/
- virtual void defaults(KPrefs* prefs) {};
+ virtual void defaults() {};
@@ -139,3 +139,3 @@ public:
*/
- virtual void sysdefaults(KPrefs* prefs) { defaults(prefs); };
+ virtual void sysdefaults() { defaults(); };
@@ -195,2 +195,3 @@ public:
+ KPrefs* getPreferences();
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
@@ -36,3 +36,2 @@
#include "kcmultidialog.h"
-#include "kprefs.h"
//US #include "kcmultidialog.moc"
@@ -40,5 +39,5 @@
-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)
{
@@ -77,3 +76,3 @@ void KCMultiDialog::slotDefault()
{
- (*it)->defaults(mPrefs);
+ (*it)->defaults();
clientChanged(true);
@@ -91,3 +90,3 @@ qDebug("KCMultiDialog::slotApply clicked");
for (; it.current(); ++it)
- (*it)->save(mPrefs);
+ (*it)->save();
clientChanged(false);
@@ -105,3 +104,3 @@ qDebug("KCMultiDialog::slotOk clicked");
for (; it.current(); ++it)
- (*it)->save(mPrefs);
+ (*it)->save();
accept();
@@ -164,3 +163,3 @@ void KCMultiDialog::addModule(KCModule* module ) //, const QString& modulename,
//US
- module->load(mPrefs);
+ module->load();
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
@@ -31,4 +31,2 @@
-class KPrefs;
-
/**
@@ -56,3 +54,3 @@ public:
**/
- KCMultiDialog(KPrefs* prefs, const QString& baseGroup = QString::fromLatin1("settings"),
+ KCMultiDialog(const QString& baseGroup = QString::fromLatin1("settings"),
QWidget *parent=0, const char *name=0,
@@ -141,3 +139,2 @@ private:
KJanusWidget* mMainWidget;
- KPrefs* mPrefs;