kcmoduleproxy.h
/* This file is part of the KDE project
Copyright (C) 2003 Matthias Kretz <kretz@kde.org>
Copyright (C) 2004 Frans Englich <frans.englich@telia.com>
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 KCMODULEPROXY_H
#define KCMODULEPROXY_H
#include <qwidget.h>
#include <qstringlist.h>
#include <kservice.h>
#include <kdelibs_export.h>
class KAboutData;
class KCModule;
class KCModuleInfo;
class KInstance;
class KProcess;
class KUTILS_EXPORT KCModuleProxy : public QWidget
{
Q_OBJECT
friend class KCModuleProxyRootCommunicatorImpl;
public:
KCModuleProxy( const KCModuleInfo & info, bool withFallback = true,
QWidget * parent = 0, const char * name = 0,
const QStringList & args = QStringList() );
KCModuleProxy( const QString& serviceName, bool withFallback = true,
QWidget * parent = 0, const char * name = 0,
const QStringList & args = QStringList() );
KCModuleProxy( const KService::Ptr& service, bool withFallback = true,
QWidget * parent = 0, const char * name = 0,
const QStringList & args = QStringList() );
~KCModuleProxy();
void load();
void save();
QString quickHelp() const;
const KAboutData * aboutData() const;
int buttons() const;
QString rootOnlyMsg() const;
//KDE4 remove. There's a limit for convenience functions,
// this one's available via moduleInfo()-> and realModule()->
bool useRootOnlyMsg() const;
//KDE4 remove. There's a limit for convenience functions,
// this one's available via moduleInfo()-> and realModule()->
KInstance * instance() const;
//KDE4 remove. There's a limit for convenience functions,
// this one's available via realModule()
bool changed() const;
bool rootMode() const;
KCModule* realModule() const;
const KCModuleInfo& moduleInfo() const;
QCString dcopName() const;
public slots:
void runAsRoot();
void defaults();
void deleteClient();
signals:
/*
* This signal is emitted when the contained module is changed.
*/
void changed( bool state );
void changed( KCModuleProxy* mod );
void childClosed();
/*
* This signal is relayed from the encapsulated module, and
* is equivalent to the module's own quickHelpChanged() signal.
*
* @since 3.4
*/
void quickHelpChanged();
protected:
void showEvent( QShowEvent * );
void init( const KCModuleInfo& info );
void emitQuickHelpChanged();
private slots:
void callRootModule( const QCString& function );
void rootExited();
void moduleChanged( bool );
void moduleDestroyed();
void applicationRemoved( const QCString& app );
private:
class KCModuleProxyPrivate;
KCModuleProxyPrivate * d;
};
#endif // KCMODULEPROXY_H
// vim: sw=4 ts=4 noet
KProcess
KInstance
KAboutData
KCModuleInfo
A class that provides information about a KCModule.
Definition: kcmoduleinfo.h:49
KCModuleProxy
Encapsulates a KCModule for embedding.
Definition: kcmoduleproxy.h:68
KCModule

KDE Home | KDE Accessibility Home | Description of Access Keys