kutils Library API Documentation

kplugininfo.h

00001 /* This file is part of the KDE project 00002 Copyright (C) 2003 Matthias Kretz <kretz@kde.org> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License version 2 as published by the Free Software Foundation. 00007 00008 This library is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00011 Library General Public License for more details. 00012 00013 You should have received a copy of the GNU Library General Public License 00014 along with this library; see the file COPYING.LIB. If not, write to 00015 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00016 Boston, MA 02111-1307, USA. 00017 00018 */ 00019 00020 #ifndef KPLUGININFO_H 00021 #define KPLUGININFO_H 00022 00023 #include <qstring.h> 00024 #include <qmap.h> 00025 #include <qstringlist.h> 00026 #include <qvaluelist.h> 00027 #include <kservice.h> 00028 00029 class KConfigGroup; 00030 00040 class KUTILS_EXPORT KPluginInfo 00041 { 00042 public: 00043 typedef QValueList<KPluginInfo*> List; 00044 00078 KPluginInfo( const QString & filename, const char* resource = 0 ); 00079 00106 KPluginInfo( const KService::Ptr service ); 00107 00108 //X /** 00109 //X * Create an empty hidden plugin. 00110 //X * @internal 00111 //X */ 00112 //X KPluginInfo(); 00113 00114 virtual ~KPluginInfo(); 00115 00121 static KPluginInfo::List fromServices( const KService::List & services, KConfig * config = 0, const QString & group = QString::null ); 00122 00129 static KPluginInfo::List fromFiles( const QStringList & files, KConfig * config = 0, const QString & group = QString::null ); 00130 00136 static KPluginInfo::List fromKPartsInstanceName( const QString &, KConfig * config = 0, const QString & group = QString::null ); 00137 00141 bool isHidden() const; 00142 00151 virtual void setPluginEnabled( bool enabled ); 00152 00161 virtual bool isPluginEnabled() const; 00162 00168 bool isPluginEnabledByDefault() const; 00169 00177 QVariant property( const QString & key ) const; 00178 00186 QVariant operator[]( const QString & key ) const; 00187 00191 const QString & name() const; 00192 00196 const QString & comment() const; 00197 00201 const QString & icon() const; 00202 00206 const QString & specfile() const; 00207 00211 const QString & author() const; 00212 00216 const QString & email() const; 00217 00221 const QString & category() const; 00222 00227 const QString & pluginName() const; 00228 00232 const QString & version() const; 00233 00237 const QString & website() const; 00238 00239 00243 const QString & license() const; 00244 00249 const QStringList & dependencies() const; 00250 00260 KService::Ptr service() const; 00261 00266 const QValueList<KService::Ptr> & kcmServices() const; 00267 00273 void setConfig( KConfig * config, const QString & group ); 00274 00279 KConfig * config() const; 00280 00285 const QString & configgroup() const; 00286 00293 virtual void save( KConfigGroup * config = 0 ); 00294 00301 virtual void load( KConfigGroup * config = 0 ); 00302 00306 virtual void defaults(); 00307 00308 private: 00309 KPluginInfo( const KPluginInfo & ); 00310 const KPluginInfo & operator=( const KPluginInfo & ); 00311 00312 class KPluginInfoPrivate; 00313 KPluginInfoPrivate * d; 00314 }; 00315 00316 // vim: sw=4 sts=4 et tw=80 00317 #endif // KPLUGININFO_H
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 Tue Apr 12 23:24:50 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003