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

kdeui

  • kdeui
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 <kglobal.h>
31 
38 class KDEUI_EXPORT KGuiItem
39 {
40 public:
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( KIcon::Group, int size = 0, KInstance* instance = KGlobal::instance()) const;
65  TQIconSet iconSet() const { return iconSet( KIcon::Small ); }
66 #else
67  TQIconSet iconSet( KIcon::Group=KIcon::Small, int size = 0, KInstance* instance = KGlobal::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 
89 private:
90  class KGuiItemPrivate;
91  KGuiItemPrivate *d;
92 };
93 
94 /* vim: et sw=4
95  */
96 
97 #endif
98 
KIcon::Small
KIcon::Group
Group
KGuiItem
An abstract class for GUI data such as ToolTip and Icon.
Definition: kguiitem.h:38
KInstance
KGlobal::instance
static KInstance * instance()

kdeui

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

kdeui

Skip menu "kdeui"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdeui by doxygen 1.8.8
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |