diff options
author | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-08 08:22:29 +0000 |
---|---|---|
committer | Orcan Ogetbil <oget.fedora@gmail.com> | 2010-12-08 08:22:29 +0000 |
commit | 4a1be16bbfafb8455b54336c4465da8f8bfe3ab6 (patch) | |
tree | 01cbdba041d5e864294909d834c1a189f0edb98b /muse2/muse/widgets/ttoolbutton.cpp | |
parent | f681783c513b54002aa4dfec2566f26bfc38689b (diff) |
ported many Qt3 methods to Qt4
Diffstat (limited to 'muse2/muse/widgets/ttoolbutton.cpp')
-rw-r--r-- | muse2/muse/widgets/ttoolbutton.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/muse2/muse/widgets/ttoolbutton.cpp b/muse2/muse/widgets/ttoolbutton.cpp index bf9234c6..907dfe75 100644 --- a/muse2/muse/widgets/ttoolbutton.cpp +++ b/muse2/muse/widgets/ttoolbutton.cpp @@ -5,9 +5,9 @@ // (C) Copyright 2004 Werner Schweer (ws@seh.de) //========================================================= -#include <qpainter.h> -//Added by qt3to4: +#include <QPainter> #include <QPixmap> +#include <QStyle> #include "ttoolbutton.h" #include "gconfig.h" @@ -22,8 +22,8 @@ void TransparentToolButton::drawButton(QPainter* p) int w = width(); int h = height(); QIcon::Mode mode = isEnabled() ? QIcon::Normal : QIcon::Disabled; - QIcon::State state = isOn() ? QIcon::On : QIcon::Off; - const QPixmap pm(iconSet().pixmap(QIcon::Automatic, mode, state)); + QIcon::State state = isChecked() ? QIcon::On : QIcon::Off; + const QPixmap pm(icon().pixmap(style()->pixelMetric(QStyle::PM_SmallIconSize), mode, state)); p->drawPixmap(QPoint((w - pm.width())/2, (h - pm.height())/2), pm); } |