summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/kcmodule.cpp
Unidiff
Diffstat (limited to 'microkde/kdeui/kcmodule.cpp') (more/less context) (show whitespace changes)
-rw-r--r--microkde/kdeui/kcmodule.cpp10
1 files changed, 9 insertions, 1 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
@@ -24,32 +24,34 @@
24//US#include <kinstance.h> 24//US#include <kinstance.h>
25#include <kglobal.h> 25#include <kglobal.h>
26#include <klocale.h> 26#include <klocale.h>
27#include <kdebug.h> 27#include <kdebug.h>
28 28
29class KCModulePrivate 29class KCModulePrivate
30{ 30{
31public: 31public:
32//US KInstance *_instance; 32//US KInstance *_instance;
33 QString _rootOnlyMsg; 33 QString _rootOnlyMsg;
34 bool _useRootOnlyMsg; 34 bool _useRootOnlyMsg;
35 bool _hasOwnInstance; 35 bool _hasOwnInstance;
36 KPrefs* _prefs;
36}; 37};
37 38
38KCModule::KCModule(QWidget *parent, const char *name, const QStringList &) 39KCModule::KCModule(KPrefs* prefs, QWidget *parent, const char *name, const QStringList &)
39 : QWidget(parent, name), _btn(Help|Default|Apply) 40 : QWidget(parent, name), _btn(Help|Default|Apply)
40{ 41{
41 kdDebug() << "KCModule " << name << endl; 42 kdDebug() << "KCModule " << name << endl;
42 d = new KCModulePrivate; 43 d = new KCModulePrivate;
43 d->_useRootOnlyMsg = true; 44 d->_useRootOnlyMsg = true;
45 d->_prefs = prefs;
44/*US 46/*US
45 d->_instance = new KInstance(name); 47 d->_instance = new KInstance(name);
46 if (name && strlen(name)) { 48 if (name && strlen(name)) {
47 d->_instance = new KInstance(name); 49 d->_instance = new KInstance(name);
48 KGlobal::locale()->insertCatalogue(name); 50 KGlobal::locale()->insertCatalogue(name);
49 } else 51 } else
50 d->_instance = new KInstance("kcmunnamed"); 52 d->_instance = new KInstance("kcmunnamed");
51*/ 53*/
52 d->_hasOwnInstance = true; 54 d->_hasOwnInstance = true;
53//US KGlobal::setActiveInstance(this->instance()); 55//US KGlobal::setActiveInstance(this->instance());
54} 56}
55 57
@@ -85,22 +87,28 @@ QString KCModule::rootOnlyMsg() const
85 return d->_rootOnlyMsg; 87 return d->_rootOnlyMsg;
86} 88}
87 89
88void KCModule::setUseRootOnlyMsg(bool on) 90void KCModule::setUseRootOnlyMsg(bool on)
89{ 91{
90 d->_useRootOnlyMsg = on; 92 d->_useRootOnlyMsg = on;
91} 93}
92 94
93bool KCModule::useRootOnlyMsg() const 95bool KCModule::useRootOnlyMsg() const
94{ 96{
95 return d->_useRootOnlyMsg; 97 return d->_useRootOnlyMsg;
96} 98}
99
100KPrefs* KCModule::getPreferences()
101{
102 return d->_prefs;
103}
104
97/*US 105/*US
98KInstance *KCModule::instance() const 106KInstance *KCModule::instance() const
99{ 107{
100 return d->_instance; 108 return d->_instance;
101} 109}
102*/ 110*/
103void KCModule::virtual_hook( int, void* ) 111void KCModule::virtual_hook( int, void* )
104{ /*BASE::virtual_hook( id, data );*/ } 112{ /*BASE::virtual_hook( id, data );*/ }
105 113
106//US #include "kcmodule.moc" 114//US #include "kcmodule.moc"