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 __appletinfo_h__
00025 #define __appletinfo_h__
00026
00027 #include <tqmap.h>
00028 #include <tqptrlist.h>
00029 #include <tqstring.h>
00030 #include <tqvaluevector.h>
00031
00032 #include <kdemacros.h>
00033
00034 class KDE_EXPORT AppletInfo
00035 {
00036 public:
00037 typedef TQValueVector<AppletInfo> List;
00038 typedef TQMap<TQObject*, AppletInfo*> Dict;
00039
00040 enum AppletType { Undefined = 0,
00041 Applet = 1,
00042 BuiltinButton = 2,
00043 SpecialButton = 4,
00044 Extension = 8,
00045 Button = BuiltinButton | SpecialButton };
00046
00047 AppletInfo(const TQString& desktopFile = TQString::null,
00048 const TQString& configFile = TQString::null,
00049 const AppletType type = Undefined);
00050
00051 TQString name() const { return m_name; }
00052 TQString comment() const { return m_comment; }
00053 TQString icon() const { return m_icon; }
00054
00055 AppletType type() const { return m_type; }
00056
00057 TQString library() const { return m_lib; }
00058 TQString desktopFile() const { return m_desktopFile; }
00059 TQString configFile() const { return m_configFile; }
00060
00061 bool isUniqueApplet() const { return m_unique; }
00062 bool isHidden() const { return m_hidden; }
00063
00064 void setConfigFile(TQString cf) { m_configFile = cf; }
00065
00066 bool operator<(const AppletInfo& rhs) const;
00067 bool operator>(const AppletInfo& rhs) const;
00068 bool operator<=(const AppletInfo& rhs) const;
00069 bool operator!=(const AppletInfo& rhs) const;
00070
00071 void setType(AppletType type) { m_type = type; }
00072
00073 protected:
00074 void setName(TQString name) { m_name = name; }
00075 void setComment(TQString comment) { m_comment = comment; }
00076 void setIcon(TQString icon) { m_icon = icon; }
00077 void setLibrary(TQString lib) { m_lib = lib; }
00078 void setIsUnique(bool u) { m_unique = u; }
00079
00080 private:
00081 TQString m_name;
00082 TQString m_comment;
00083 TQString m_icon;
00084 TQString m_lib;
00085 TQString m_desktopFile;
00086 TQString m_configFile;
00087 AppletType m_type;
00088 bool m_unique;
00089 bool m_hidden;
00090 };
00091
00092 #endif