author | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-06-26 19:01:18 (UTC) |
commit | b9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff) | |
tree | 2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /microkde/kdeui/kguiitem.h | |
download | kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2 |
Initial revision
-rw-r--r-- | microkde/kdeui/kguiitem.h | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/microkde/kdeui/kguiitem.h b/microkde/kdeui/kguiitem.h new file mode 100644 index 0000000..0079bb4 --- a/dev/null +++ b/microkde/kdeui/kguiitem.h | |||
@@ -0,0 +1,87 @@ | |||
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., 59 Temple Place - Suite 330, | ||
17 | Boston, MA 02111-1307, USA. | ||
18 | |||
19 | Many thanks to Simon tronical Hausmann | ||
20 | */ | ||
21 | |||
22 | #ifndef __kguiitem_h__ | ||
23 | #define __kguiitem_h__ | ||
24 | |||
25 | #include <qstring.h> | ||
26 | #include <qiconset.h> | ||
27 | #include <qpixmap.h> | ||
28 | #include <qvaluelist.h> | ||
29 | //US#include <kicontheme.h> | ||
30 | #include <kglobal.h> | ||
31 | |||
32 | //US added the following files | ||
33 | #include <kiconloader.h> | ||
34 | |||
35 | class KGuiItem | ||
36 | { | ||
37 | public: | ||
38 | KGuiItem(); | ||
39 | |||
40 | KGuiItem( const QString &text, | ||
41 | const QString &iconName = QString::null, | ||
42 | const QString &toolTip = QString::null, | ||
43 | const QString &whatsThis = QString::null ); | ||
44 | |||
45 | KGuiItem( const QString &text, const QIconSet &iconSet, | ||
46 | const QString &toolTip = QString::null, | ||
47 | const QString &whatsThis = QString::null ); | ||
48 | |||
49 | KGuiItem( const KGuiItem &rhs ); | ||
50 | KGuiItem &operator=( const KGuiItem &rhs ); | ||
51 | |||
52 | ~KGuiItem(); | ||
53 | |||
54 | QString text() const; | ||
55 | QString plainText() const; | ||
56 | QIconSet iconSet( KIcon::Group, int size = 0/*US , KInstance* instance = KGlobal::instance()*/) const; | ||
57 | |||
58 | #ifndef KDE_NO_COMPAT | ||
59 | QIconSet iconSet() const { return iconSet( KIcon::Small); } | ||
60 | #endif | ||
61 | |||
62 | QString iconName() const; | ||
63 | QString toolTip() const; | ||
64 | QString whatsThis() const; | ||
65 | bool isEnabled() const; | ||
66 | bool hasIcon() const; | ||
67 | #ifndef KDE_NO_COMPAT | ||
68 | bool hasIconSet() const { return hasIcon(); } | ||
69 | #endif | ||
70 | |||
71 | void setText( const QString &text ); | ||
72 | void setIconSet( const QIconSet &iconset ); | ||
73 | void setIconName( const QString &iconName ); | ||
74 | void setToolTip( const QString &tooltip ); | ||
75 | void setWhatsThis( const QString &whatsThis ); | ||
76 | void setEnabled( bool enable ); | ||
77 | |||
78 | private: | ||
79 | class KGuiItemPrivate; | ||
80 | KGuiItemPrivate *d; | ||
81 | }; | ||
82 | |||
83 | /* vim: et sw=4 | ||
84 | */ | ||
85 | |||
86 | #endif | ||
87 | |||