Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / kinfocenter / modules.h
blob0ce6c162d2fc49b182d76626e428558882d04973
1 /*
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.
20 #ifndef MODULES_H
21 #define MODULES_H
23 #include <QObject>
24 #include <QVBoxLayout>
26 #include <kcmoduleinfo.h>
27 #include <kiconloader.h>
29 class QStringList;
30 class KAboutData;
31 class KCModule;
32 class ProxyWidget;
33 class QX11EmbedWidget;
34 class QVBoxLayout;
35 class KVBox;
37 class ConfigModule : public QObject, public KCModuleInfo {
38 Q_OBJECT
40 public:
42 ConfigModule(const KService::Ptr &s);
43 ~ConfigModule();
45 bool isActive() {
46 return _module != 0;
48 ProxyWidget *module();
49 const KAboutData *aboutData() const;
51 QPixmap realIcon(KIconLoader::StdSizes size);
53 public slots:
55 void deleteClient();
57 private:
59 ProxyWidget *_module;
60 QVBoxLayout *_embedLayout;
61 KVBox *_embedFrame;
65 class ConfigModuleList : public QList<ConfigModule*> {
66 public:
68 ConfigModuleList();
70 bool readDesktopEntries();
74 #endif