summaryrefslogtreecommitdiffabout
path: root/microkde/kdeui/kcmodule.cpp
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /microkde/kdeui/kcmodule.cpp
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'microkde/kdeui/kcmodule.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kdeui/kcmodule.cpp106
1 files changed, 106 insertions, 0 deletions
diff --git a/microkde/kdeui/kcmodule.cpp b/microkde/kdeui/kcmodule.cpp
new file mode 100644
index 0000000..915cd0f
--- a/dev/null
+++ b/microkde/kdeui/kcmodule.cpp
@@ -0,0 +1,106 @@
1/*
2 This file is part of the KDE libraries
3
4 Copyright (c) 2001 Michael Goffioul <goffioul@imec.be>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
20
21*/
22
23#include "kcmodule.h"
24//US#include <kinstance.h>
25#include <kglobal.h>
26#include <klocale.h>
27#include <kdebug.h>
28
29class KCModulePrivate
30{
31public:
32//US KInstance *_instance;
33 QString _rootOnlyMsg;
34 bool _useRootOnlyMsg;
35 bool _hasOwnInstance;
36};
37
38KCModule::KCModule(QWidget *parent, const char *name, const QStringList &)
39 : QWidget(parent, name), _btn(Help|Default|Apply)
40{
41 kdDebug() << "KCModule " << name << endl;
42 d = new KCModulePrivate;
43 d->_useRootOnlyMsg = true;
44/*US
45 d->_instance = new KInstance(name);
46 if (name && strlen(name)) {
47 d->_instance = new KInstance(name);
48 KGlobal::locale()->insertCatalogue(name);
49 } else
50 d->_instance = new KInstance("kcmunnamed");
51*/
52 d->_hasOwnInstance = true;
53//US KGlobal::setActiveInstance(this->instance());
54}
55
56/*US
57KCModule::KCModule(KInstance *instance, QWidget *parent, const QStringList & )
58 : QWidget(parent, instance ? instance->instanceName().data() : 0), _btn(Help|Default|Apply)
59{
60 kdDebug() << "KCModule instance " << (instance ? instance->instanceName().data() : "none") << endl;
61 d = new KCModulePrivate;
62 d->_useRootOnlyMsg = true;
63 d->_instance = instance;
64 KGlobal::locale()->insertCatalogue(instance->instanceName());
65 d->_hasOwnInstance = false;
66 KGlobal::setActiveInstance(this->instance());
67}
68*/
69KCModule::~KCModule()
70{
71/*US
72 if (d->_hasOwnInstance)
73 delete d->_instance;
74*/
75 delete d;
76}
77
78void KCModule::setRootOnlyMsg(const QString& msg)
79{
80 d->_rootOnlyMsg = msg;
81}
82
83QString KCModule::rootOnlyMsg() const
84{
85 return d->_rootOnlyMsg;
86}
87
88void KCModule::setUseRootOnlyMsg(bool on)
89{
90 d->_useRootOnlyMsg = on;
91}
92
93bool KCModule::useRootOnlyMsg() const
94{
95 return d->_useRootOnlyMsg;
96}
97/*US
98KInstance *KCModule::instance() const
99{
100 return d->_instance;
101}
102*/
103void KCModule::virtual_hook( int, void* )
104{ /*BASE::virtual_hook( id, data );*/ }
105
106//US #include "kcmodule.moc"