kutils Library API Documentation

kcmoduleinfo.h

00001 /* 00002 Copyright (c) 1999 Matthias Hoelzer-Kluepfel <hoelzer@kde.org> 00003 Copyright (c) 2000 Matthias Elter <elter@kde.org> 00004 Copyright (c) 2003 Daniel Molkentin <molkentin@kde.org> 00005 Copyright (c) 2003 Matthias Kretz <kretz@kde.org> 00006 00007 This file is part of the KDE project 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Library General Public 00011 License version 2, as published by the Free Software Foundation. 00012 00013 This library is distributed in the hope that it will be useful, 00014 but WITHOUT ANY WARRANTY; without even the implied warranty of 00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00016 Library General Public License for more details. 00017 00018 You should have received a copy of the GNU Library General Public License 00019 along with this library; see the file COPYING.LIB. If not, write to 00020 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00021 Boston, MA 02111-1307, USA. 00022 */ 00023 00024 #ifndef KCMODULEINFO_H 00025 #define KCMODULEINFO_H 00026 00027 #include <kservice.h> 00028 00029 class QPixmap; 00030 class QString; 00031 class QStringList; 00032 00048 class KUTILS_EXPORT KCModuleInfo 00049 { 00050 00051 public: 00052 00060 KCModuleInfo(const QString& desktopFile); 00061 00069 KCModuleInfo( KService::Ptr moduleInfo ); 00070 00071 00077 KCModuleInfo( const KCModuleInfo &rhs ); 00078 00084 KCModuleInfo(); 00085 00089 KCModuleInfo &operator=( const KCModuleInfo &rhs ); 00090 00097 bool operator==( const KCModuleInfo &rhs ) const; 00098 00102 bool operator!=( const KCModuleInfo &rhs ) const; 00103 00107 ~KCModuleInfo(); 00108 00112 QString fileName() const { return _fileName; }; 00113 00117 const QStringList &keywords() const { return _keywords; }; 00118 00125 QString factoryName() const; 00126 00130 QString moduleName() const { return _name; }; 00131 // changed from name() to avoid ambiguity with QObject::name() on multiple inheritance 00132 00136 KService::Ptr service() const { return _service; }; 00137 00141 QString comment() const { return _comment; }; 00142 00146 QString icon() const { return _icon; }; 00147 00151 QString docPath() const; 00152 00156 QString library() const { return _lib; }; 00157 00161 QString handle() const; 00162 00167 int weight() const; 00168 00172 bool needsRootPrivileges() const; 00173 00178 bool isHiddenByDefault() const KDE_DEPRECATED; 00179 00180 00186 bool needsTest() const; 00187 00188 00189 protected: 00190 00195 void setKeywords(const QStringList &keyword) { _keywords = keyword; }; 00196 00201 void setName(const QString &name) { _name = name; }; 00202 00207 void setComment(const QString &comment) { _comment = comment; }; 00208 00213 void setIcon(const QString &icon) { _icon = icon; }; 00214 00219 void setLibrary(const QString &lib) { _lib = lib; }; 00220 00225 void setHandle(const QString &handle) { _handle = handle; }; 00226 00233 void setWeight(int weight) { _weight = weight; }; 00234 00235 00241 void setNeedsTest( bool val ); 00242 00248 void setNeedsRootPrivileges(bool needsRootPrivileges) 00249 { _needsRootPrivileges = needsRootPrivileges; }; 00250 00254 void setIsHiddenByDefault(bool isHiddenByDefault) 00255 { _isHiddenByDefault = isHiddenByDefault; }; 00256 00261 void setDocPath(const QString &p) { _doc = p; }; 00262 00267 void loadAll(); 00268 00269 private: 00270 00274 void init(KService::Ptr s); 00275 00276 private: 00277 00278 // KDE4 These needs to be moved to KCModuleInfoPrivate 00279 QStringList _keywords; 00280 QString _name, _icon, _lib, _handle, _fileName, _doc, _comment; 00281 bool _needsRootPrivileges : 1; 00282 bool _isHiddenByDefault : 1; 00283 bool _allLoaded : 1; 00284 int _weight; 00285 00286 KService::Ptr _service; 00287 00288 class KCModuleInfoPrivate; 00289 KCModuleInfoPrivate *d; 00290 00291 }; 00292 00293 #endif // KCMODULEINFO_H 00294 00295 // vim: ts=2 sw=2 et
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