2 Copyright (c) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #include <kcmoduleinfo.h>
25 #include <Qt3Support/Q3Dict>
27 #include <QVBoxLayout>
31 template<class ConfigModule
> class Q3PtrList
;
37 class QX11EmbedWidget
;
41 class ConfigModule
: public QObject
, public KCModuleInfo
47 ConfigModule(const KService::Ptr
&s
);
50 bool isChanged() { return _changed
; }
51 void setChanged(bool changed
) { _changed
= changed
; }
53 bool isActive() { return _module
!= 0; }
54 ProxyWidget
*module();
55 const KAboutData
*aboutData() const;
66 void clientChanged(bool state
);
68 void rootExited(K3Process
*proc
);
73 void changed(ConfigModule
*module
);
82 QX11EmbedWidget
*_embedWidget
;
83 K3Process
*_rootProcess
;
84 QVBoxLayout
*_embedLayout
;
89 class ConfigModuleList
: public Q3PtrList
<ConfigModule
>
95 void readDesktopEntries();
96 bool readDesktopEntriesRecursive(const QString
&path
);
99 * Returns all submenus of the submenu identified by path
101 Q3PtrList
<ConfigModule
> modules(const QString
&path
);
104 * Returns all modules of the submenu identified by path
106 QStringList
submenus(const QString
&path
);
109 * Returns the path of the submenu the module is in
111 QString
findModule(ConfigModule
*module
);
118 Q3PtrList
<ConfigModule
> modules
;
119 QStringList submenus
;
122 Q3Dict
<Menu
> subMenus
;