tdeui
kguiitem.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __kguiitem_h__
00023 #define __kguiitem_h__
00024
00025 #include <tqstring.h>
00026 #include <tqiconset.h>
00027 #include <tqpixmap.h>
00028 #include <tqvaluelist.h>
00029 #include <kicontheme.h>
00030 #include <tdeglobal.h>
00031
00038 class TDEUI_EXPORT KGuiItem
00039 {
00040 public:
00041 KGuiItem();
00042
00043
00044
00045
00046
00047 KGuiItem( const TQString &text,
00048 const TQString &iconName = TQString::null,
00049 const TQString &toolTip = TQString::null,
00050 const TQString &whatsThis = TQString::null );
00051
00052 KGuiItem( const TQString &text, const TQIconSet &iconSet,
00053 const TQString &toolTip = TQString::null,
00054 const TQString &whatsThis = TQString::null );
00055
00056 KGuiItem( const KGuiItem &rhs );
00057 KGuiItem &operator=( const KGuiItem &rhs );
00058
00059 ~KGuiItem();
00060
00061 TQString text() const;
00062 TQString plainText() const;
00063 #ifndef KDE_NO_COMPAT
00064 TQIconSet iconSet( TDEIcon::Group, int size = 0, TDEInstance* instance = TDEGlobal::instance()) const;
00065 TQIconSet iconSet() const { return iconSet( TDEIcon::Small ); }
00066 #else
00067 TQIconSet iconSet( TDEIcon::Group=TDEIcon::Small, int size = 0, TDEInstance* instance = TDEGlobal::instance()) const;
00068 #endif
00069
00070 TQString iconName() const;
00071 TQString toolTip() const;
00072 TQString whatsThis() const;
00073 bool isEnabled() const;
00077 bool hasIcon() const;
00078 #ifndef KDE_NO_COMPAT
00079 bool hasIconSet() const { return hasIcon(); }
00080 #endif
00081
00082 void setText( const TQString &text );
00083 void setIconSet( const TQIconSet &iconset );
00084 void setIconName( const TQString &iconName );
00085 void setToolTip( const TQString &tooltip );
00086 void setWhatsThis( const TQString &whatsThis );
00087 void setEnabled( bool enable );
00088
00089 private:
00090 class KGuiItemPrivate;
00091 KGuiItemPrivate *d;
00092 };
00093
00094
00095
00096
00097 #endif
00098