• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdeui
 

tdeui

  • tdeui
kguiitem.h
1/* This file is part of the KDE libraries
2 Copyright (C) 2001 Holger Freyther (freyher@yahoo.com)
3 based on ideas from Martijn and Simon
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18
19 Many thanks to Simon tronical Hausmann
20*/
21
22#ifndef __kguiitem_h__
23#define __kguiitem_h__
24
25#include <tqstring.h>
26#include <tqiconset.h>
27#include <tqpixmap.h>
28#include <tqvaluelist.h>
29#include <kicontheme.h>
30#include <tdeglobal.h>
31
38class TDEUI_EXPORT KGuiItem
39{
40public:
41 KGuiItem();
42
43 // ### This should probably be explicit in KDE 4; it's easy to get
44 // subtle bugs otherwise - the icon name, tooltip and whatsthis text
45 // get changed behind your back if you do 'setButtonFoo( "Bar" );'
46 // It gives the wrong impression that you just change the text.
47 KGuiItem( const TQString &text,
48 const TQString &iconName = TQString::null,
49 const TQString &toolTip = TQString::null,
50 const TQString &whatsThis = TQString::null );
51
52 KGuiItem( const TQString &text, const TQIconSet &iconSet,
53 const TQString &toolTip = TQString::null,
54 const TQString &whatsThis = TQString::null );
55
56 KGuiItem( const KGuiItem &rhs );
57 KGuiItem &operator=( const KGuiItem &rhs );
58
59 ~KGuiItem();
60
61 TQString text() const;
62 TQString plainText() const;
63#ifndef KDE_NO_COMPAT
64 TQIconSet iconSet( TDEIcon::Group, int size = 0, TDEInstance* instance = TDEGlobal::instance()) const;
65 TQIconSet iconSet() const { return iconSet( TDEIcon::Small ); }
66#else
67 TQIconSet iconSet( TDEIcon::Group=TDEIcon::Small, int size = 0, TDEInstance* instance = TDEGlobal::instance()) const;
68#endif
69
70 TQString iconName() const;
71 TQString toolTip() const;
72 TQString whatsThis() const;
73 bool isEnabled() const;
77 bool hasIcon() const;
78#ifndef KDE_NO_COMPAT
79 bool hasIconSet() const { return hasIcon(); }
80#endif
81
82 void setText( const TQString &text );
83 void setIconSet( const TQIconSet &iconset );
84 void setIconName( const TQString &iconName );
85 void setToolTip( const TQString &tooltip );
86 void setWhatsThis( const TQString &whatsThis );
87 void setEnabled( bool enable );
88
89private:
90 class KGuiItemPrivate;
91 KGuiItemPrivate *d;
92};
93#endif
KGuiItem
An abstract class for GUI data such as ToolTip and Icon.
Definition: kguiitem.h:39
TDEGlobal::instance
static TDEInstance * instance()
TDEIcon::Group
Group
TDEIcon::Small
Small
TDEInstance

tdeui

Skip menu "tdeui"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdeui

Skip menu "tdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdeui by doxygen 1.9.4
This website is maintained by Timothy Pearson.