00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
#ifndef KCMODULEPROXY_H
00022
#define KCMODULEPROXY_H
00023
00024
#include <qwidget.h>
00025
#include <qstringlist.h>
00026
00027
#include <kservice.h>
00028
#include <kdelibs_export.h>
00029
00030
class KAboutData;
00031
class KCModule;
00032
class KCModuleInfo;
00033
class KInstance;
00034
class KProcess;
00035
00067 class KUTILS_EXPORT KCModuleProxy :
public QWidget
00068 {
00069 Q_OBJECT
00070
00071
friend class KCModuleProxyRootCommunicatorImpl;
00072
00073
public:
00074
00088 KCModuleProxy(
const KCModuleInfo & info,
bool withFallback =
true,
00089
QWidget * parent = 0,
const char * name = 0,
00090
const QStringList & args =
QStringList() );
00091
00099 KCModuleProxy(
const QString& serviceName,
bool withFallback =
true,
00100
QWidget * parent = 0,
const char * name = 0,
00101
const QStringList & args =
QStringList() );
00102
00108 KCModuleProxy(
const KService::Ptr& service,
bool withFallback =
true,
00109
QWidget * parent = 0,
const char * name = 0,
00110
const QStringList & args =
QStringList() );
00111
00115 ~KCModuleProxy();
00116
00121
void load();
00122
00130
void save();
00131
00135
QString quickHelp()
const;
00136
00140
const KAboutData * aboutData()
const;
00141
00146
int buttons()
const;
00147
00153
QString rootOnlyMsg()
const;
00154
00155
00156
00161
bool useRootOnlyMsg()
const;
00162
00163
00164
00170
KInstance * instance()
const;
00171
00172
00173
00178
bool changed()
const;
00179
00190
bool rootMode()
const;
00191
00200
KCModule* realModule()
const;
00201
00206
const KCModuleInfo& moduleInfo()
const;
00207
00214
QCString dcopName()
const;
00215
00216
public slots:
00217
00224
void runAsRoot();
00225
00230
void defaults();
00231
00239
void deleteClient();
00240
00241 signals:
00242
00243
00244
00245
00246
void changed(
bool state );
00247
00254
void changed( KCModuleProxy* mod );
00255
00262
void childClosed();
00263
00264
00265
00266
00267
00268
00269
00270
void quickHelpChanged();
00271
00272
protected:
00273
00278
void showEvent(
QShowEvent * );
00279
00286
void init(
const KCModuleInfo& info );
00287
00288
00293
void emitQuickHelpChanged();
00294
00295
private slots:
00296
00304
void callRootModule(
const QCString& function );
00305
00312
void rootExited();
00313
00317
void moduleChanged(
bool );
00318
00322
void moduleDestroyed();
00323
00331
void applicationRemoved(
const QCString& app );
00332
00333
private:
00334
00335
class KCModuleProxyPrivate;
00336 KCModuleProxyPrivate * d;
00337 };
00338
00339
#endif // KCMODULEPROXY_H
00340