-rw-r--r-- | microkde/kdeui/kguiitem.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/microkde/kdeui/kguiitem.cpp b/microkde/kdeui/kguiitem.cpp index 828c5e6..c91ffb7 100644 --- a/microkde/kdeui/kguiitem.cpp +++ b/microkde/kdeui/kguiitem.cpp @@ -15,17 +15,17 @@ You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <qregexp.h> #include <qstring.h> -#include <qiconset.h> +#include <qicon.h> #include <qpixmap.h> #include <assert.h> //US #include <kiconloader.h> #include <kdebug.h> #include "kguiitem.h" @@ -57,17 +57,17 @@ public: return *this; } QString m_text; QString m_toolTip; QString m_whatsThis; QString m_statusText; QString m_iconName; - QIconSet m_iconSet; + QIcon m_iconSet; bool m_hasIcon : 1; bool m_enabled : 1; }; KGuiItem::KGuiItem() { d = new KGuiItemPrivate; } @@ -77,17 +77,17 @@ KGuiItem::KGuiItem( const QString &text, const QString &iconName, { d = new KGuiItemPrivate; d->m_text = text; d->m_toolTip = toolTip; d->m_whatsThis = whatsThis; setIconName( iconName ); } -KGuiItem::KGuiItem( const QString &text, const QIconSet &iconSet, +KGuiItem::KGuiItem( const QString &text, const QIcon &iconSet, const QString &toolTip, const QString &whatsThis ) { d = new KGuiItemPrivate; d->m_text = text; d->m_toolTip = toolTip; d->m_whatsThis = whatsThis; setIconSet( iconSet ); } @@ -119,17 +119,17 @@ QString KGuiItem::text() const { } QString KGuiItem::plainText() const { QString stripped( d->m_text ); stripped.replace( QRegExp( "&(?!&)" ), QString::null ); return stripped; } -QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instance */ ) const +QIcon KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instance */ ) const { if( d->m_hasIcon ) { if( !d->m_iconName.isEmpty()) { // some caching here would(?) come handy //US return instance->iconLoader()->loadIconSet( d->m_iconName, group, size ); return KGlobal::iconLoader()->loadIconSet( d->m_iconName); @@ -143,17 +143,17 @@ QIconSet KGuiItem::iconSet( KIcon::Group group, int size /*US, KInstance* instan // return set; } else { return d->m_iconSet; } } else - return QIconSet(); + return QIcon(); } QString KGuiItem::iconName() const { return d->m_iconName; } QString KGuiItem::toolTip() const { @@ -172,27 +172,27 @@ bool KGuiItem::hasIcon() const { return d->m_hasIcon; } void KGuiItem::setText( const QString &text ) { d->m_text=text; } -void KGuiItem::setIconSet( const QIconSet &iconset ) +void KGuiItem::setIconSet( const QIcon &iconset ) { d->m_iconSet = iconset; d->m_iconName = QString::null; d->m_hasIcon = !iconset.isNull(); } void KGuiItem::setIconName( const QString &iconName ) { d->m_iconName = iconName; - d->m_iconSet = QIconSet(); + d->m_iconSet = QIcon(); d->m_hasIcon = !iconName.isEmpty(); } void KGuiItem::setToolTip( const QString &toolTip) { d->m_toolTip = toolTip; } void KGuiItem::setWhatsThis( const QString &whatsThis ) { d->m_whatsThis = whatsThis; |