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 #include <kdemacros.h> 00029 00030 class QPixmap; 00031 class QString; 00032 class QStringList; 00033 00049 class KCModuleInfo 00050 { 00051 00052 public: 00053 00061 KCModuleInfo(const QString& desktopFile); 00062 00068 KCModuleInfo( KService::Ptr moduleInfo ); 00069 00070 00076 KCModuleInfo( const KCModuleInfo &rhs ); 00077 00081 KCModuleInfo &operator=( const KCModuleInfo &rhs ); 00082 00089 bool operator==( const KCModuleInfo &rhs ) const; 00090 00094 bool operator!=( const KCModuleInfo &rhs ) const; 00095 00099 ~KCModuleInfo(); 00100 00104 QString fileName() const { return _fileName; }; 00105 00109 const QStringList &keywords() const { return _keywords; }; 00110 00114 QString moduleName() const { return _name; }; 00115 // changed from name() to avoid ambiguity with QObject::name() on multiple inheritance 00116 00120 KService::Ptr service() const { return _service; }; 00121 00125 QString comment() const { return _comment; }; 00126 00130 QString icon() const { return _icon; }; 00131 00135 QString docPath() const; 00136 00140 QString library() const { return _lib; }; 00141 00145 QString handle() const; 00146 00151 int weight() const; 00152 00156 bool needsRootPrivileges() const; 00157 00162 bool isHiddenByDefault() const KDE_DEPRECATED; 00163 00164 protected: 00165 00170 void setKeywords(const QStringList &keyword) { _keywords = keyword; }; 00171 00176 void setName(const QString &name) { _name = name; }; 00177 00182 void setComment(const QString &comment) { _comment = comment; }; 00183 00188 void setIcon(const QString &icon) { _icon = icon; }; 00189 00194 void setLibrary(const QString &lib) { _lib = lib; }; 00195 00200 void setHandle(const QString &handle) { _handle = handle; }; 00201 00208 void setWeight(int weight) { _weight = weight; }; 00209 00215 void setNeedsRootPrivileges(bool needsRootPrivileges) 00216 { _needsRootPrivileges = needsRootPrivileges; }; 00217 00221 void setIsHiddenByDefault(bool isHiddenByDefault) 00222 { _isHiddenByDefault = isHiddenByDefault; }; 00223 00228 void setDocPath(const QString &p) { _doc = p; }; 00229 00234 void loadAll(); 00235 00236 private: 00237 00241 void init(KService::Ptr s); 00242 00243 private: 00244 00245 // KDE4 These needs to be moved to KCModuleInfoPrivate 00246 QStringList _keywords; 00247 QString _name, _icon, _lib, _handle, _fileName, _doc, _comment; 00248 bool _needsRootPrivileges : 1; 00249 bool _isHiddenByDefault : 1; 00250 bool _allLoaded : 1; 00251 int _weight; 00252 00253 KService::Ptr _service; 00254 00255 class KCModuleInfoPrivate; 00256 KCModuleInfoPrivate *d; 00257 00258 }; 00259 00260 #endif // KCMODULEINFO_H 00261 00262 // vim: ts=2 sw=2 et
KDE Logo
This file is part of the documentation for kutils Library Version 3.3.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Wed Sep 29 09:41:34 2004 by doxygen 1.3.8 written by Dimitri van Heesch, © 1997-2003