diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-02 22:38:52 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-05-02 22:38:52 +0000 |
commit | 458efa7b0c935cbaafa2791021a5f8f7241aa876 (patch) | |
tree | 624583f2873febe23770bee3fa94b5c24bd59f4f /src/gui/widgets/ScrollBox.cpp | |
parent | 747037b72944ae2c02962b7c5c96e0a7f8852e38 (diff) | |
download | rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.tar.gz rosegarden-458efa7b0c935cbaafa2791021a5f8f7241aa876.zip |
Initial TQt4 port of Rosegarden
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1230242 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/widgets/ScrollBox.cpp')
-rw-r--r-- | src/gui/widgets/ScrollBox.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/gui/widgets/ScrollBox.cpp b/src/gui/widgets/ScrollBox.cpp index d129a08..66e32e2 100644 --- a/src/gui/widgets/ScrollBox.cpp +++ b/src/gui/widgets/ScrollBox.cpp @@ -43,8 +43,8 @@ namespace Rosegarden { -ScrollBox::ScrollBox(TQWidget* parent, SizeMode sizeMode, const char* name) : - TQFrame(parent, name), +ScrollBox::ScrollBox(TQWidget* tqparent, SizeMode sizeMode, const char* name) : + TQFrame(tqparent, name), m_sizeMode(sizeMode) { setFrameStyle(Panel | Sunken); @@ -53,15 +53,15 @@ ScrollBox::ScrollBox(TQWidget* parent, SizeMode sizeMode, const char* name) : void ScrollBox::mousePressEvent(TQMouseEvent* e) { m_mouse = e->pos(); - if (e->button() == RightButton) + if (e->button() == Qt::RightButton) emit button3Pressed(); - if (e->button() == MidButton) + if (e->button() == Qt::MidButton) emit button2Pressed(); } void ScrollBox::mouseMoveEvent(TQMouseEvent* e) { - if (e->state() != LeftButton) + if (e->state() != Qt::LeftButton) return ; int dx = (e->pos().x() - m_mouse.x()) * m_pagesize.width() / width(); @@ -80,7 +80,7 @@ void ScrollBox::drawContents(TQPainter* paint) TQRect c(contentsRect()); - paint->setPen(Qt::red); + paint->setPen(TQt::red); int len = m_pagesize.width(); int x = c.x() + c.width() * m_viewpos.x() / len; @@ -123,36 +123,36 @@ void ScrollBox::setPageSize(const TQSize& s) setFixedWidth(width); } - repaint(); + tqrepaint(); } void ScrollBox::setViewSize(const TQSize& s) { m_viewsize = s; - repaint(); + tqrepaint(); } void ScrollBox::setViewPos(const TQPoint& pos) { m_viewpos = pos; - repaint(); + tqrepaint(); } void ScrollBox::setViewX(int x) { m_viewpos = TQPoint(x, m_viewpos.y()); - repaint(); + tqrepaint(); } void ScrollBox::setViewY(int y) { m_viewpos = TQPoint(m_viewpos.x(), y); - repaint(); + tqrepaint(); } void ScrollBox::setThumbnail(TQPixmap img) { - setPaletteBackgroundPixmap(img.convertToImage().smoothScale(size())); + setPaletteBackgroundPixmap(TQPixmap(img.convertToImage().smoothScale(size()))); } } |