kcmoduleinfo.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
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
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
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
This file is part of the documentation for kutils Library Version 3.3.1.