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 
00044 class KCModuleInfo
00045 {
00046 
00047 public:
00048 
00053   KCModuleInfo(const QString& desktopFile);
00054 
00058   KCModuleInfo( KService::Ptr moduleInfo );
00059 
00060   KCModuleInfo( const KCModuleInfo &rhs );
00061   KCModuleInfo &operator=( const KCModuleInfo &rhs );
00062   bool operator==( const KCModuleInfo &rhs ) const;
00063   bool operator!=( const KCModuleInfo &rhs ) const;
00064   ~KCModuleInfo();
00065 
00069   QString fileName() const { return _fileName; };
00070 
00074   const QStringList &keywords() const { return _keywords; };
00075 
00076   
00080   QString moduleName() const { return _name; };
00081 
00085   KService::Ptr service() const { return _service; };
00086 
00090   QString comment() const { return _comment; };
00091 
00095   QString icon() const { return _icon; };
00096 
00100   QString docPath() const;
00101 
00105   QString library() const { return _lib; };
00106 
00110   QString handle() const;
00111 
00116   int weight() const;
00117 
00121   bool needsRootPrivileges() const;
00122 
00127   bool isHiddenByDefault() const KDE_DEPRECATED;
00128 
00129 protected:
00130 
00131   void setKeywords(const QStringList &k) { _keywords = k; };
00132   void setName(const QString &name) { _name = name; };
00133   void setComment(const QString &comment) { _comment = comment; };
00134   void setIcon(const QString &icon) { _icon = icon; };
00135   void setLibrary(const QString &lib) { _lib = lib; };
00136   void setHandle(const QString &handle) { _handle = handle; };
00137   void setWeight(int weight) { _weight = weight; };
00138   void setNeedsRootPrivileges(bool needsRootPrivileges)
00139   { _needsRootPrivileges = needsRootPrivileges; };
00140   void setIsHiddenByDefault(bool isHiddenByDefault)
00141   { _isHiddenByDefault = isHiddenByDefault; };
00142   void setDocPath(const QString &p) { _doc = p; };
00143   void loadAll();
00144 
00145 private:
00146   void init(KService::Ptr s);
00147 
00148 private:
00149 
00150   
00151   
00152   QStringList _keywords;
00153   QString     _name, _icon, _lib, _handle, _fileName, _doc, _comment;
00154   bool        _needsRootPrivileges : 1; 
00155   bool        _isHiddenByDefault : 1;
00156   bool        _allLoaded : 1;
00157   int         _weight;
00158 
00159   KService::Ptr _service;
00160 
00161   class KCModuleInfoPrivate;
00162   KCModuleInfoPrivate *d;
00163   
00164 };
00165 
00166 #endif // KCMODULEINFO_H
00167 
00168 
 
This file is part of the documentation for kutils Library Version 3.2.0.