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/kcmodule.cpp | |
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 |
1 files changed, 12 insertions, 4 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 @@ -4,103 +4,111 @@ Copyright (c) 2001 Michael Goffioul <goffioul@imec.be> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "kcmodule.h" //US#include <kinstance.h> #include <kglobal.h> #include <klocale.h> #include <kdebug.h> class KCModulePrivate { public: //US KInstance *_instance; QString _rootOnlyMsg; 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) { kdDebug() << "KCModule " << name << endl; d = new KCModulePrivate; d->_useRootOnlyMsg = true; -/*US + d->_prefs = prefs; +/*US d->_instance = new KInstance(name); if (name && strlen(name)) { d->_instance = new KInstance(name); KGlobal::locale()->insertCatalogue(name); } else d->_instance = new KInstance("kcmunnamed"); -*/ +*/ d->_hasOwnInstance = true; //US KGlobal::setActiveInstance(this->instance()); } /*US KCModule::KCModule(KInstance *instance, QWidget *parent, const QStringList & ) : QWidget(parent, instance ? instance->instanceName().data() : 0), _btn(Help|Default|Apply) { kdDebug() << "KCModule instance " << (instance ? instance->instanceName().data() : "none") << endl; d = new KCModulePrivate; d->_useRootOnlyMsg = true; d->_instance = instance; KGlobal::locale()->insertCatalogue(instance->instanceName()); d->_hasOwnInstance = false; KGlobal::setActiveInstance(this->instance()); } */ KCModule::~KCModule() { /*US if (d->_hasOwnInstance) delete d->_instance; -*/ +*/ delete d; } void KCModule::setRootOnlyMsg(const QString& msg) { d->_rootOnlyMsg = msg; } QString KCModule::rootOnlyMsg() const { return d->_rootOnlyMsg; } void KCModule::setUseRootOnlyMsg(bool on) { d->_useRootOnlyMsg = on; } bool KCModule::useRootOnlyMsg() const { return d->_useRootOnlyMsg; } + +KPrefs* KCModule::getPreferences() +{ + return d->_prefs; +} + /*US KInstance *KCModule::instance() const { return d->_instance; } */ void KCModule::virtual_hook( int, void* ) { /*BASE::virtual_hook( id, data );*/ } //US #include "kcmodule.moc" |