summaryrefslogtreecommitdiffabout
authorulf69 <ulf69>2004-08-06 20:29:00 (UTC)
committer ulf69 <ulf69>2004-08-06 20:29:00 (UTC)
commit38d84409bcca83516eb816461c8b79b4cf6cbf57 (patch) (side-by-side diff)
treef7cc928c007ed6f4bca43d7474343d78bd0f4eab
parent40ac88770c32ae78e194096e758ef3818d2fb434 (diff)
downloadkdepimpi-38d84409bcca83516eb816461c8b79b4cf6cbf57.zip
kdepimpi-38d84409bcca83516eb816461c8b79b4cf6cbf57.tar.gz
kdepimpi-38d84409bcca83516eb816461c8b79b4cf6cbf57.tar.bz2
expanded functionality of kcmultidialog to support other applications
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/kcmodule.h9
-rw-r--r--microkde/kutils/kcmultidialog.cpp13
-rw-r--r--microkde/kutils/kcmultidialog.h4
-rw-r--r--microkde/microkdeE.pro2
4 files changed, 18 insertions, 10 deletions
diff --git a/microkde/kdeui/kcmodule.h b/microkde/kdeui/kcmodule.h
index 90a87c9..bc020bc 100644
--- a/microkde/kdeui/kcmodule.h
+++ b/microkde/kdeui/kcmodule.h
@@ -28,2 +28,3 @@
class KCModulePrivate;
+class KPrefs;
//US class KInstance;
@@ -107,3 +108,3 @@ public:
*/
- virtual void load() {};
+ virtual void load(KPrefs* prefs) {};
@@ -120,3 +121,3 @@ public:
*/
- virtual void save() {};
+ virtual void save(KPrefs* prefs) {};
@@ -128,3 +129,3 @@ public:
*/
- virtual void defaults() {};
+ virtual void defaults(KPrefs* prefs) {};
@@ -138,3 +139,3 @@ public:
*/
- virtual void sysdefaults() { defaults(); };
+ virtual void sysdefaults(KPrefs* prefs) { defaults(prefs); };
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
@@ -36,2 +36,3 @@
#include "kcmultidialog.h"
+#include "kprefs.h"
//US #include "kcmultidialog.moc"
@@ -39,5 +40,5 @@
-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)
{
@@ -76,3 +77,3 @@ void KCMultiDialog::slotDefault()
{
- (*it)->defaults();
+ (*it)->defaults(mPrefs);
clientChanged(true);
@@ -90,3 +91,3 @@ qDebug("KCMultiDialog::slotApply clicked");
for (; it.current(); ++it)
- (*it)->save();
+ (*it)->save(mPrefs);
clientChanged(false);
@@ -104,3 +105,3 @@ qDebug("KCMultiDialog::slotOk clicked");
for (; it.current(); ++it)
- (*it)->save();
+ (*it)->save(mPrefs);
accept();
@@ -162,2 +163,4 @@ void KCMultiDialog::addModule(KCModule* module ) //, const QString& modulename,
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
@@ -31,2 +31,3 @@
+class KPrefs;
@@ -55,3 +56,3 @@ public:
**/
- KCMultiDialog(const QString& baseGroup = QString::fromLatin1("settings"),
+ KCMultiDialog(KPrefs* prefs, const QString& baseGroup = QString::fromLatin1("settings"),
QWidget *parent=0, const char *name=0,
@@ -140,2 +141,3 @@ private:
KJanusWidget* mMainWidget;
+ KPrefs* mPrefs;
diff --git a/microkde/microkdeE.pro b/microkde/microkdeE.pro
index b664c9a..06b288b 100644
--- a/microkde/microkdeE.pro
+++ b/microkde/microkdeE.pro
@@ -97,2 +97,3 @@ osmartpointer.h \
kdecore/kcatalogue.h \
+ kdecore/kprefs.h \
kdecore/ksharedptr.h \
@@ -140,2 +141,3 @@ oprocess.cpp \
kdecore/kmdcodec.cpp \
+ kdecore/kprefs.cpp \
kdecore/kshell.cpp \