author | ulf69 <ulf69> | 2004-08-10 01:34:22 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-10 01:34:22 (UTC) |
commit | c9d570427f3d5bead7bee1301514a2d4b82836ea (patch) (unidiff) | |
tree | 8d25f388217c591b7dac1db6c26d0777e6459352 /microkde/kutils | |
parent | 4f05a9fcbb9e54184aef93883886aaf865104463 (diff) | |
download | kdepimpi-c9d570427f3d5bead7bee1301514a2d4b82836ea.zip kdepimpi-c9d570427f3d5bead7bee1301514a2d4b82836ea.tar.gz kdepimpi-c9d570427f3d5bead7bee1301514a2d4b82836ea.tar.bz2 |
enhancements to configure external apps like email and phones through a
generalized interface
-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 | |||
@@ -34,13 +34,12 @@ | |||
34 | #include <kprocess.h> | 34 | #include <kprocess.h> |
35 | 35 | ||
36 | #include "kcmultidialog.h" | 36 | #include "kcmultidialog.h" |
37 | #include "kprefs.h" | ||
38 | //US #include "kcmultidialog.moc" | 37 | //US #include "kcmultidialog.moc" |
39 | //US #include "kcmoduleloader.h" | 38 | //US #include "kcmoduleloader.h" |
40 | 39 | ||
41 | KCMultiDialog::KCMultiDialog(KPrefs* prefs, const QString& baseGroup, QWidget *parent, const char *name, bool modal) | 40 | KCMultiDialog::KCMultiDialog(const QString& baseGroup, QWidget *parent, const char *name, bool modal) |
42 | : KDialogBase(IconList, i18n("Configure"), Default |Cancel | Apply | Ok, Ok, | 41 | : KDialogBase(IconList, i18n("Configure"), Default |Cancel | Apply | Ok, Ok, |
43 | parent, name, modal, true), mPrefs(prefs), d(0L) | 42 | parent, name, modal, true), d(0L) |
44 | { | 43 | { |
45 | enableButton(Apply, false); | 44 | enableButton(Apply, false); |
46 | //connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *))); | 45 | //connect(this, SIGNAL(aboutToShowPage(QWidget *)), this, SLOT(slotAboutToShow(QWidget *))); |
@@ -75,7 +74,7 @@ void KCMultiDialog::slotDefault() | |||
75 | { | 74 | { |
76 | if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex) | 75 | if (pageIndex((QWidget *)(*it)->parent()) == curPageIndex) |
77 | { | 76 | { |
78 | (*it)->defaults(mPrefs); | 77 | (*it)->defaults(); |
79 | clientChanged(true); | 78 | clientChanged(true); |
80 | return; | 79 | return; |
81 | } | 80 | } |
@@ -89,7 +88,7 @@ qDebug("KCMultiDialog::slotApply clicked"); | |||
89 | 88 | ||
90 | QPtrListIterator<KCModule> it(modules); | 89 | QPtrListIterator<KCModule> it(modules); |
91 | for (; it.current(); ++it) | 90 | for (; it.current(); ++it) |
92 | (*it)->save(mPrefs); | 91 | (*it)->save(); |
93 | clientChanged(false); | 92 | clientChanged(false); |
94 | 93 | ||
95 | emit applyClicked(); | 94 | emit applyClicked(); |
@@ -103,7 +102,7 @@ qDebug("KCMultiDialog::slotOk clicked"); | |||
103 | 102 | ||
104 | QPtrListIterator<KCModule> it(modules); | 103 | QPtrListIterator<KCModule> it(modules); |
105 | for (; it.current(); ++it) | 104 | for (; it.current(); ++it) |
106 | (*it)->save(mPrefs); | 105 | (*it)->save(); |
107 | accept(); | 106 | accept(); |
108 | 107 | ||
109 | emit okClicked(); | 108 | emit okClicked(); |
@@ -162,7 +161,7 @@ void KCMultiDialog::addModule(KCModule* module ) //, const QString& modulename, | |||
162 | modules.append(module); | 161 | modules.append(module); |
163 | connect(module, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool))); | 162 | connect(module, SIGNAL(changed(bool)), this, SLOT(clientChanged(bool))); |
164 | //US | 163 | //US |
165 | module->load(mPrefs); | 164 | module->load(); |
166 | 165 | ||
167 | 166 | ||
168 | } | 167 | } |
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 | |||
@@ -29,8 +29,6 @@ | |||
29 | #include <kjanuswidget.h> | 29 | #include <kjanuswidget.h> |
30 | #include <kcmodule.h> | 30 | #include <kcmodule.h> |
31 | 31 | ||
32 | class KPrefs; | ||
33 | |||
34 | /** | 32 | /** |
35 | * A class that offers a @ref KDialogBase containing arbitrary KControl Modules | 33 | * A class that offers a @ref KDialogBase containing arbitrary KControl Modules |
36 | * | 34 | * |
@@ -54,7 +52,7 @@ public: | |||
54 | * kcontrol, just keep "settings" | 52 | * kcontrol, just keep "settings" |
55 | * @param modal If you pass true here, the dialog will be modal | 53 | * @param modal If you pass true here, the dialog will be modal |
56 | **/ | 54 | **/ |
57 | KCMultiDialog(KPrefs* prefs, const QString& baseGroup = QString::fromLatin1("settings"), | 55 | KCMultiDialog(const QString& baseGroup = QString::fromLatin1("settings"), |
58 | QWidget *parent=0, const char *name=0, | 56 | QWidget *parent=0, const char *name=0, |
59 | bool modal=false); | 57 | bool modal=false); |
60 | 58 | ||
@@ -139,7 +137,6 @@ private: | |||
139 | 137 | ||
140 | //US | 138 | //US |
141 | KJanusWidget* mMainWidget; | 139 | KJanusWidget* mMainWidget; |
142 | KPrefs* mPrefs; | ||
143 | 140 | ||
144 | // For future use | 141 | // For future use |
145 | class KCMultiDialogPrivate; | 142 | class KCMultiDialogPrivate; |