1 | /* This file is part of the KDE project |
2 | Copyright (C) 2007 Matthias Kretz <kretz@kde.org> |
3 | |
4 | This library is free software; you can redistribute it and/or |
5 | modify it under the terms of the GNU Library General Public |
6 | License version 2 as published by the Free Software Foundation. |
7 | |
8 | This library is distributed in the hope that it will be useful, |
9 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
11 | Library General Public License for more details. |
12 | |
13 | You should have received a copy of the GNU Library General Public License |
14 | along with this library; see the file COPYING.LIB. If not, write to |
15 | the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
16 | Boston, MA 02110-1301, USA. |
17 | |
18 | */ |
19 | |
20 | #ifndef KCMUTILS_KCMODULEPROXY_P_H |
21 | #define KCMUTILS_KCMODULEPROXY_P_H |
22 | |
23 | #include "kcmoduleinfo.h" |
24 | #include "kcmoduleproxy.h" |
25 | #include <QtGui/QLabel> |
26 | class QVBoxLayout; |
27 | |
28 | class KCModuleProxyPrivate |
29 | { |
30 | Q_DECLARE_PUBLIC(KCModuleProxy) |
31 | protected: |
32 | KCModuleProxyPrivate(KCModuleProxy *_parent, const KCModuleInfo &info, const QStringList &_args) |
33 | : args(_args), kcm(0), topLayout(0), rootInfo(0), modInfo(info), |
34 | changed(false), bogusOccupier(false), parent(_parent) |
35 | { |
36 | } |
37 | |
38 | ~KCModuleProxyPrivate() |
39 | { |
40 | delete rootInfo; // Delete before embedWidget! |
41 | delete kcm; |
42 | } |
43 | |
44 | void loadModule(); |
45 | |
46 | /** |
47 | * Makes sure the proper variables is set and signals are emitted. |
48 | */ |
49 | void _k_moduleChanged(bool); |
50 | |
51 | /** |
52 | * Zeroes d->kcm |
53 | */ |
54 | void _k_moduleDestroyed(); |
55 | |
56 | /** |
57 | * Gets called by DCOP when an application closes. |
58 | * Is used to (try to) reload a KCM which previously |
59 | * was loaded. |
60 | */ |
61 | void _k_ownerChanged(const QString &service, const QString &oldOwner, const QString &newOwner); |
62 | |
63 | QStringList args; |
64 | KCModule *kcm; |
65 | QVBoxLayout *topLayout; /* Contains QScrollView view, and root stuff */ |
66 | QLabel *rootInfo; |
67 | QString dbusService; |
68 | QString dbusPath; |
69 | KCModuleInfo modInfo; |
70 | bool changed; |
71 | bool bogusOccupier; |
72 | KCModuleProxy *parent; |
73 | KCModuleProxy *q_ptr; |
74 | }; |
75 | |
76 | #endif // KCMUTILS_KCMODULEPROXY_P_H |
77 | // vim: sw=4 sts=4 et tw=100 |
78 | |