00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef TDECMODULEPROXY_H
00022 #define TDECMODULEPROXY_H
00023
00024 #include <tqwidget.h>
00025 #include <tqstringlist.h>
00026
00027 #include <kservice.h>
00028 #include <tdelibs_export.h>
00029
00030 class TDEAboutData;
00031 class TDECModule;
00032 class TDECModuleInfo;
00033 class TDEInstance;
00034 class TDEProcess;
00035
00068 class TDEUTILS_EXPORT TDECModuleProxy : public TQWidget
00069 {
00070 Q_OBJECT
00071
00072
00073 friend class TDECModuleProxyRootCommunicatorImpl;
00074
00075 public:
00076
00090 TDECModuleProxy( const TDECModuleInfo & info, bool withFallback = true,
00091 TQWidget * parent = 0, const char * name = 0,
00092 const TQStringList & args = TQStringList() );
00093
00109 TDECModuleProxy( const TQString& serviceName, bool withFallback = true,
00110 TQWidget * parent = 0, const char * name = 0,
00111 const TQStringList & args = TQStringList() );
00112
00126 TDECModuleProxy( const KService::Ptr& service, bool withFallback = true,
00127 TQWidget * parent = 0, const char * name = 0,
00128 const TQStringList & args = TQStringList() );
00129
00133 ~TDECModuleProxy();
00134
00139 void load();
00140
00148 void save();
00149
00153 TQString quickHelp() const;
00154
00158 const TDEAboutData * aboutData() const;
00159
00163 TQString handbookDocPath() const;
00164
00168 TQString handbookSection() const;
00169
00174 int buttons() const;
00175
00181 TQString rootOnlyMsg() const;
00182
00183
00184
00189 bool useRootOnlyMsg() const;
00190
00191
00192
00198 TDEInstance * instance() const;
00199
00200
00201
00206 bool changed() const;
00207
00218 bool rootMode() const;
00219
00228 TDECModule* realModule() const;
00229
00234 const TDECModuleInfo& moduleInfo() const;
00235
00242 TQCString dcopName() const;
00243
00244 public slots:
00245
00252 void runAsRoot();
00253
00258 void defaults();
00259
00267 void deleteClient();
00268
00269 signals:
00270
00271
00272
00273
00274 void changed( bool state );
00275
00282 void changed( TDECModuleProxy* mod );
00283
00290 void childClosed();
00291
00292
00293
00294
00295
00296
00297
00298 void quickHelpChanged();
00299
00300 protected:
00301
00306 void showEvent( TQShowEvent * );
00307
00314 void init( const TDECModuleInfo& info );
00315
00316
00321 void emitQuickHelpChanged();
00322
00323 private slots:
00324
00332 void callRootModule( const TQCString& function );
00333
00340 void rootExited();
00341
00345 void moduleChanged( bool );
00346
00350 void moduleDestroyed();
00351
00359 void applicationRemoved( const TQCString& app );
00360
00361 private:
00362
00363 class TDECModuleProxyPrivate;
00364 TDECModuleProxyPrivate * d;
00365 };
00366
00367 #endif // TDECMODULEPROXY_H
00368