kcmoduleproxy.h00001
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
00107 KCModuleProxy( const QString& serviceName, bool withFallback = true,
00108 QWidget * parent = 0, const char * name = 0,
00109 const QStringList & args = QStringList() );
00110
00124 KCModuleProxy( const KService::Ptr& service, bool withFallback = true,
00125 QWidget * parent = 0, const char * name = 0,
00126 const QStringList & args = QStringList() );
00127
00131 ~KCModuleProxy();
00132
00137 void load();
00138
00146 void save();
00147
00151 QString quickHelp() const;
00152
00156 const KAboutData * aboutData() const;
00157
00162 int buttons() const;
00163
00169 QString rootOnlyMsg() const;
00170
00171
00172
00177 bool useRootOnlyMsg() const;
00178
00179
00180
00186 KInstance * instance() const;
00187
00188
00189
00194 bool changed() const;
00195
00206 bool rootMode() const;
00207
00216 KCModule* realModule() const;
00217
00222 const KCModuleInfo& moduleInfo() const;
00223
00230 QCString dcopName() const;
00231
00232 public slots:
00233
00240 void runAsRoot();
00241
00246 void defaults();
00247
00255 void deleteClient();
00256
00257 signals:
00258
00259
00260
00261
00262 void changed( bool state );
00263
00270 void changed( KCModuleProxy* mod );
00271
00278 void childClosed();
00279
00280
00281
00282
00283
00284
00285
00286 void quickHelpChanged();
00287
00288 protected:
00289
00294 void showEvent( QShowEvent * );
00295
00302 void init( const KCModuleInfo& info );
00303
00304
00309 void emitQuickHelpChanged();
00310
00311 private slots:
00312
00320 void callRootModule( const QCString& function );
00321
00328 void rootExited();
00329
00333 void moduleChanged( bool );
00334
00338 void moduleDestroyed();
00339
00347 void applicationRemoved( const QCString& app );
00348
00349 private:
00350
00351 class KCModuleProxyPrivate;
00352 KCModuleProxyPrivate * d;
00353 };
00354
00355 #endif // KCMODULEPROXY_H
00356
|