author | ulf69 <ulf69> | 2004-08-10 01:34:22 (UTC) |
---|---|---|
committer | ulf69 <ulf69> | 2004-08-10 01:34:22 (UTC) |
commit | c9d570427f3d5bead7bee1301514a2d4b82836ea (patch) (side-by-side diff) | |
tree | 8d25f388217c591b7dac1db6c26d0777e6459352 /microkde/kdeui | |
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/kdeui/kcmodule.cpp | 16 | ||||
-rw-r--r-- | microkde/kdeui/kcmodule.h | 11 |
2 files changed, 18 insertions, 9 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 @@ -34,7 +34,8 @@ public: bool _useRootOnlyMsg; 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) { @@ -42,5 +43,6 @@ KCModule::KCModule(QWidget *parent, const char *name, const QStringList &) d = new KCModulePrivate; d->_useRootOnlyMsg = true; -/*US + d->_prefs = prefs; +/*US d->_instance = new KInstance(name); if (name && strlen(name)) { @@ -49,5 +51,5 @@ KCModule::KCModule(QWidget *parent, const char *name, const QStringList &) } else d->_instance = new KInstance("kcmunnamed"); -*/ +*/ d->_hasOwnInstance = true; //US KGlobal::setActiveInstance(this->instance()); @@ -72,5 +74,5 @@ KCModule::~KCModule() if (d->_hasOwnInstance) delete d->_instance; -*/ +*/ delete d; } @@ -95,4 +97,10 @@ bool KCModule::useRootOnlyMsg() const return d->_useRootOnlyMsg; } + +KPrefs* KCModule::getPreferences() +{ + return d->_prefs; +} + /*US KInstance *KCModule::instance() const 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 @@ -84,5 +84,5 @@ public: * implementation. */ - 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() ); //US KCModule(KInstance *instance, QWidget *parent=0, const QStringList &args=QStringList() ); @@ -107,5 +107,5 @@ public: * so you probably want to call this method in the constructor. */ - virtual void load(KPrefs* prefs) {}; + virtual void load() {}; /** @@ -120,5 +120,5 @@ public: * save is called when the user clicks "Apply" or "Ok". */ - virtual void save(KPrefs* prefs) {}; + virtual void save() {}; /** @@ -128,5 +128,5 @@ public: * button. It should set the display to useful values. */ - virtual void defaults(KPrefs* prefs) {}; + virtual void defaults() {}; /** @@ -138,5 +138,5 @@ public: * NOTE: The default behaviour is to call defaults(). */ - virtual void sysdefaults(KPrefs* prefs) { defaults(prefs); }; + virtual void sysdefaults() { defaults(); }; /** @@ -194,4 +194,5 @@ public: bool useRootOnlyMsg() const; + KPrefs* getPreferences(); //US KInstance *instance() const; |