kdelibs/kutils/kcmoduleproxy_p.h

77 lines
2.2 KiB
C
Raw Permalink Normal View History

2014-11-13 01:04:59 +02:00
/* This file is part of the KDE project
Copyright (C) 2007 Matthias Kretz <kretz@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License version 2 as published by the Free Software Foundation.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef KCMUTILS_KCMODULEPROXY_P_H
#define KCMUTILS_KCMODULEPROXY_P_H
#include "kcmoduleinfo.h"
#include "kcmoduleproxy.h"
#include <QtGui/QLabel>
#include <QVBoxLayout>
2014-11-13 01:04:59 +02:00
class KCModuleProxyPrivate
{
Q_DECLARE_PUBLIC(KCModuleProxy)
protected:
KCModuleProxyPrivate(KCModuleProxy *_parent, const KCModuleInfo &info, const QStringList &_args)
: args(_args), kcm(0), topLayout(0), rootInfo(0), modInfo(info),
changed(false), bogusOccupier(false), parent(_parent)
{
}
2014-11-13 01:04:59 +02:00
~KCModuleProxyPrivate()
{
delete rootInfo; // Delete before embedWidget!
delete kcm;
}
2014-11-13 01:04:59 +02:00
void loadModule();
2014-11-13 01:04:59 +02:00
/**
* Makes sure the proper variables is set and signals are emitted.
*/
void _k_moduleChanged(bool);
2014-11-13 01:04:59 +02:00
/**
* Zeroes d->kcm
*/
void _k_moduleDestroyed();
2014-11-13 01:04:59 +02:00
/**
* Gets called by DCOP when an application closes.
* Is used to (try to) reload a KCM which previously
* was loaded.
*/
void _k_ownerChanged(const QString &service, const QString &oldOwner, const QString &newOwner);
2014-11-13 01:04:59 +02:00
QStringList args;
KCModule *kcm;
QVBoxLayout *topLayout; /* Contains QScrollView view, and root stuff */
QLabel *rootInfo;
QString dbusService;
QString dbusPath;
KCModuleInfo modInfo;
bool changed;
bool bogusOccupier;
KCModuleProxy *parent;
KCModuleProxy *q_ptr;
2014-11-13 01:04:59 +02:00
};
#endif // KCMUTILS_KCMODULEPROXY_P_H