diff options
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()))); } } |