tdeutils
tdecmoduleinfo.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 TDECMODULEINFO_H
00025 #define TDECMODULEINFO_H
00026
00027 #include <kservice.h>
00028
00029 class TQPixmap;
00030 class TQString;
00031 class TQStringList;
00032
00049 class TDEUTILS_EXPORT TDECModuleInfo
00050 {
00051
00052 public:
00053
00061 TDECModuleInfo(const TQString& desktopFile);
00062
00070 TDECModuleInfo( KService::Ptr moduleInfo );
00071
00072
00078 TDECModuleInfo( const TDECModuleInfo &rhs );
00079
00085 TDECModuleInfo();
00086
00090 TDECModuleInfo &operator=( const TDECModuleInfo &rhs );
00091
00098 bool operator==( const TDECModuleInfo &rhs ) const;
00099
00103 bool operator!=( const TDECModuleInfo &rhs ) const;
00104
00108 ~TDECModuleInfo();
00109
00113 TQString fileName() const { return _fileName; }
00114
00118 const TQStringList &keywords() const { return _keywords; }
00119
00126 TQString factoryName() const;
00127
00131 TQString moduleName() const { return _name; }
00132
00133
00137 KService::Ptr service() const { return _service; }
00138
00142 TQString comment() const { return _comment; }
00143
00147 TQString icon() const { return _icon; }
00148
00152 TQString docPath() const;
00153
00157 TQString library() const { return _lib; }
00158
00162 TQString handle() const;
00163
00168 int weight() const;
00169
00173 bool needsRootPrivileges() const;
00174
00179 bool isHiddenByDefault() const KDE_DEPRECATED;
00180
00181
00187 bool needsTest() const;
00188
00189
00190 protected:
00191
00196 void setKeywords(const TQStringList &keyword) { _keywords = keyword; }
00197
00202 void setName(const TQString &name) { _name = name; }
00203
00208 void setComment(const TQString &comment) { _comment = comment; }
00209
00214 void setIcon(const TQString &icon) { _icon = icon; }
00215
00220 void setLibrary(const TQString &lib) { _lib = lib; }
00221
00226 void setHandle(const TQString &handle) { _handle = handle; }
00227
00234 void setWeight(int weight) { _weight = weight; }
00235
00236
00242 void setNeedsTest( bool val );
00243
00249 void setNeedsRootPrivileges(bool needsRootPrivileges)
00250 { _needsRootPrivileges = needsRootPrivileges; }
00251
00255 void setIsHiddenByDefault(bool isHiddenByDefault)
00256 { _isHiddenByDefault = isHiddenByDefault; }
00257
00262 void setDocPath(const TQString &p) { _doc = p; }
00263
00268 void loadAll();
00269
00270 private:
00271
00275 void init(KService::Ptr s);
00276
00277 private:
00278
00279
00280 TQStringList _keywords;
00281 TQString _name, _icon, _lib, _handle, _fileName, _doc, _comment;
00282 bool _needsRootPrivileges : 1;
00283 bool _isHiddenByDefault : 1;
00284 bool _allLoaded : 1;
00285 int _weight;
00286
00287 KService::Ptr _service;
00288
00289 class TDECModuleInfoPrivate;
00290 TDECModuleInfoPrivate *d;
00291
00292 };
00293
00294 #endif // TDECMODULEINFO_H
00295
00296