KUtils
kcmoduleproxy.h
Go to the documentation of this file.
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., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 00019 */ 00020 00021 #ifndef KCMUTILS_KCMODULEPROXY_H 00022 #define KCMUTILS_KCMODULEPROXY_H 00023 00024 #include <QtGui/QImage> 00025 #include <QtCore/QStringList> 00026 00027 #include <kcmodule.h> 00028 #include <kservice.h> 00029 #include <kcmutils_export.h> 00030 00031 class KAboutData; 00032 class KCModuleInfo; 00033 class KComponentData; 00034 class KCModuleProxyPrivate; 00035 00067 class KCMUTILS_EXPORT KCModuleProxy : public QWidget 00068 { 00069 Q_DECLARE_PRIVATE(KCModuleProxy) 00070 Q_OBJECT 00071 public: 00080 explicit KCModuleProxy( const KCModuleInfo& info, QWidget* parent = 0, 00081 const QStringList& args = QStringList() ); 00082 00093 explicit KCModuleProxy( const QString& serviceName, QWidget* parent = 0, 00094 const QStringList& args = QStringList() ); 00095 00104 explicit KCModuleProxy( const KService::Ptr& service, QWidget* parent = 0, 00105 const QStringList& args = QStringList() ); 00106 00110 ~KCModuleProxy(); 00111 00116 void load(); 00117 00125 void save(); 00126 00130 QString quickHelp() const; 00131 00135 const KAboutData * aboutData() const; 00136 00141 KCModule::Buttons buttons() const; 00142 00148 QString rootOnlyMessage() const; 00149 //KDE4 remove. There's a limit for convenience functions, 00150 // this one's available via realModule()-> 00151 00156 bool useRootOnlyMessage() const; 00157 //KDE4 remove. There's a limit for convenience functions, 00158 // this one's available via realModule()-> 00159 00165 KComponentData componentData() const; 00166 //KDE4 remove. There's a limit for convenience functions, 00167 // this one's available via realModule() 00168 00173 bool changed() const; 00174 00183 KCModule* realModule() const; 00184 00189 KCModuleInfo moduleInfo() const; 00190 00194 QString dbusService() const; 00198 QString dbusPath() const; 00202 QSize minimumSizeHint() const; 00203 00204 public Q_SLOTS: 00205 00210 void defaults(); 00211 00217 void deleteClient(); 00218 00219 Q_SIGNALS: 00220 00221 /* 00222 * This signal is emitted when the contained module is changed. 00223 */ 00224 void changed( bool state ); 00225 00230 void changed( KCModuleProxy* mod ); 00231 00236 void childClosed(); 00237 00238 /* 00239 * This signal is relayed from the encapsulated module, and 00240 * is equivalent to the module's own quickHelpChanged() signal. 00241 */ 00242 void quickHelpChanged(); 00243 00244 protected: 00245 00250 void showEvent( QShowEvent * ); 00251 00252 protected: 00253 KCModuleProxyPrivate *const d_ptr; 00254 00255 private: 00256 Q_PRIVATE_SLOT(d_func(), void _k_moduleChanged(bool)) 00257 Q_PRIVATE_SLOT(d_func(), void _k_moduleDestroyed()) 00258 Q_PRIVATE_SLOT(d_func(), void _k_ownerChanged(const QString &service, const QString &oldOwner, const QString &newOwner)) 00259 }; 00260 00261 #endif // KUTILS_KCMODULEPROXY_H 00262 // vim: ts=4
KDE 4.6 API Reference