kutils Library API Documentation

kcmoduleproxy.h

00001 /* This file is part of the KDE project 00002 Copyright (C) 2003 Matthias Kretz <kretz@kde.org> 00003 Copyright (C) 2004 Frans Englich <frans.englich@telia.com> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License version 2 as published by the Free Software Foundation. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 Boston, MA 02111-1307, USA. 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 //KDE4 remove. There's a limit for convenience functions, 00155 // this one's available via moduleInfo()-> and realModule()-> 00156 00161 bool useRootOnlyMsg() const; 00162 //KDE4 remove. There's a limit for convenience functions, 00163 // this one's available via moduleInfo()-> and realModule()-> 00164 00170 KInstance * instance() const; 00171 //KDE4 remove. There's a limit for convenience functions, 00172 // this one's available via realModule() 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 * This signal is emitted when the contained module is changed. 00245 */ 00246 void changed( bool state ); 00247 00254 void changed( KCModuleProxy* mod ); 00255 00262 void childClosed(); 00263 00264 /* 00265 * This signal is relayed from the encapsulated module, and 00266 * is equivalent to the module's own quickHelpChanged() signal. 00267 * 00268 * @since 3.4 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 // vim: sw=4 ts=4 noet
KDE Logo
This file is part of the documentation for kutils Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 14 00:32:59 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003