KDEUI
Go to the documentation of this file.
30 class KGuiItem::KGuiItemPrivate
39 KGuiItemPrivate(
const KGuiItemPrivate &rhs )
44 KGuiItemPrivate &
operator=(
const KGuiItemPrivate &rhs )
48 m_iconName = rhs.m_iconName;
49 m_toolTip = rhs.m_toolTip;
50 m_whatsThis = rhs.m_whatsThis;
51 m_statusText = rhs.m_statusText;
52 m_enabled = rhs.m_enabled;
53 m_hasIcon = rhs.m_hasIcon;
70 d =
new KGuiItemPrivate;
74 const QString &toolTip,
const QString &
whatsThis )
76 d =
new KGuiItemPrivate;
84 const QString &toolTip,
const QString &
whatsThis )
86 d =
new KGuiItemPrivate;
107 d =
new KGuiItemPrivate( *rhs.d );
125 const int len = d->m_text.length();
133 int resultLength = 0;
134 stripped.resize(len);
136 const QChar* data = d->m_text.unicode();
137 for (
int pos = 0; pos < len; ++pos )
139 if ( data[ pos ] !=
'&' )
140 stripped[ resultLength++ ] = data[ pos ];
141 else if ( pos + 1 < len && data[ pos + 1 ] ==
'&' )
142 stripped[ resultLength++ ] = data[ pos++ ];
145 stripped.truncate(resultLength);
154 if (!d->m_iconName.isEmpty()) {
164 #ifndef KDE_NO_DEPRECATED
168 if( !d->m_iconName.isEmpty()) {
181 return d->m_iconName;
191 return d->m_whatsThis;
212 d->m_iconName.clear();
213 d->m_hasIcon = !
icon.isNull();
235 d->m_enabled = enabled;
A wrapper around QIcon that provides KDE icon features.
QString whatsThis() const
static KIconLoader * global()
Returns the global icon loader initialized with the global KComponentData.
KAction * whatsThis(const QObject *recvr, const char *slot, QObject *parent)
Trigger the What's This cursor.
QString plainText() const
void setIcon(const KIcon &iconset)
void setToolTip(const QString &tooltip)
void setEnabled(bool enable)
void setWhatsThis(const QString &whatsThis)
QIcon iconSet(KIconLoader::Group=KIconLoader::Small, int size=0) const
void setText(const QString &text)
const KComponentData & mainComponent()
QIcon loadIconSet(const QString &name, KIconLoader::Group group, int size=0, bool canReturnNull=false)
Creates an icon set, that will do on-demand loading of the icon.
Group
The group of the icon.
void setIconName(const QString &iconName)
KGuiItem & operator=(const KGuiItem &rhs)
An abstract class for GUI data such as ToolTip and Icon.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 27 2020 00:00:00 by
doxygen 1.8.20 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.