diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:27:15 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:27:15 +0000 |
commit | b5d38fd2e94066885d4620b0c35c48a2faa5aa44 (patch) | |
tree | 7e7e611e0e3ef23dc2efd327a7455bcf4d7c9b7f /kwin-styles/riscos/Button.cpp | |
parent | 019ebb9a949a97c898e5d563f0699a3ff49e6588 (diff) | |
download | tdeartwork-b5d38fd2e94066885d4620b0c35c48a2faa5aa44.tar.gz tdeartwork-b5d38fd2e94066885d4620b0c35c48a2faa5aa44.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1157637 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kwin-styles/riscos/Button.cpp')
-rw-r--r-- | kwin-styles/riscos/Button.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/kwin-styles/riscos/Button.cpp b/kwin-styles/riscos/Button.cpp index d4da6ecc..d126ced1 100644 --- a/kwin-styles/riscos/Button.cpp +++ b/kwin-styles/riscos/Button.cpp @@ -20,23 +20,23 @@ Boston, MA 02110-1301, USA. */ -#include <qtooltip.h> +#include <tqtooltip.h> #include "Button.h" #include "Static.h" namespace RiscOS { -Button::Button(QWidget *parent, const QString& tip, +Button::Button(TQWidget *parent, const TQString& tip, const ButtonState realizeButtons) - : QWidget(parent, "Button", 0), + : TQWidget(parent, "Button", 0), realizeButtons_(realizeButtons), lastButton_(NoButton), alignment_(Left), down_ (false), active_ (false) { - QToolTip::add(this, tip); + TQToolTip::add(this, tip); setBackgroundColor(Qt::black); setFixedSize(Static::instance()->titleHeight() - 1, @@ -65,32 +65,32 @@ Button::Alignment Button::alignment() const return alignment_; } -void Button::mousePressEvent(QMouseEvent *e) +void Button::mousePressEvent(TQMouseEvent *e) { down_ = true; lastButton_ = e->button(); repaint(); - QMouseEvent me(e->type(), e->pos(), e->globalPos(), + TQMouseEvent me(e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons_) ? LeftButton : NoButton, e->state()); - QWidget::mousePressEvent(&me); + TQWidget::mousePressEvent(&me); } -void Button::mouseReleaseEvent(QMouseEvent *e) +void Button::mouseReleaseEvent(TQMouseEvent *e) { down_ = false; lastButton_ = e->button(); repaint(); - QMouseEvent me(e->type(), e->pos(), e->globalPos(), + TQMouseEvent me(e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons_) ? LeftButton : NoButton, e->state()); - QWidget::mouseReleaseEvent(&me); + TQWidget::mouseReleaseEvent(&me); } -void Button::setPixmap(const QPixmap &p) +void Button::setPixmap(const TQPixmap &p) { - if (QPixmap::defaultDepth() <= 8) + if (TQPixmap::defaultDepth() <= 8) aPixmap_ = iPixmap_ = p; else { @@ -98,8 +98,8 @@ void Button::setPixmap(const QPixmap &p) QRgb* data = NULL; QRgb w = qRgb(255, 255, 255); - QImage aTx(p.convertToImage()); - QImage iTx(aTx.copy()); + TQImage aTx(p.convertToImage()); + TQImage iTx(aTx.copy()); const KDecorationOptions* options = KDecoration::options(); light = options->color(KDecoration::ColorButtonBg, true).light(150).rgb(); @@ -136,7 +136,7 @@ void Button::setPixmap(const QPixmap &p) repaint(); } -void Button::paintEvent(QPaintEvent *) +void Button::paintEvent(TQPaintEvent *) { bitBlt(this, alignment_ == Left ? 1 : 0, 0, &Static::instance()->buttonBase(active_, down_)); |