diff options
Diffstat (limited to 'src/gui/widgets/ScrollBox.cpp')
-rw-r--r-- | src/gui/widgets/ScrollBox.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/src/gui/widgets/ScrollBox.cpp b/src/gui/widgets/ScrollBox.cpp index b409209..d129a08 100644 --- a/src/gui/widgets/ScrollBox.cpp +++ b/src/gui/widgets/ScrollBox.cpp @@ -29,28 +29,28 @@ #include "ScrollBox.h" -#include <qapplication.h> -#include <qframe.h> -#include <qimage.h> -#include <qpainter.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qrect.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqapplication.h> +#include <tqframe.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqrect.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden { -ScrollBox::ScrollBox(QWidget* parent, SizeMode sizeMode, const char* name) : - QFrame(parent, name), +ScrollBox::ScrollBox(TQWidget* parent, SizeMode sizeMode, const char* name) : + TQFrame(parent, name), m_sizeMode(sizeMode) { setFrameStyle(Panel | Sunken); } -void ScrollBox::mousePressEvent(QMouseEvent* e) +void ScrollBox::mousePressEvent(TQMouseEvent* e) { m_mouse = e->pos(); if (e->button() == RightButton) @@ -59,7 +59,7 @@ void ScrollBox::mousePressEvent(QMouseEvent* e) emit button2Pressed(); } -void ScrollBox::mouseMoveEvent(QMouseEvent* e) +void ScrollBox::mouseMoveEvent(TQMouseEvent* e) { if (e->state() != LeftButton) return ; @@ -67,18 +67,18 @@ void ScrollBox::mouseMoveEvent(QMouseEvent* e) int dx = (e->pos().x() - m_mouse.x()) * m_pagesize.width() / width(); int dy = (e->pos().y() - m_mouse.y()) * m_pagesize.height() / height(); - emit valueChanged(QPoint(m_viewpos.x() + dx, m_viewpos.y() + dy)); + emit valueChanged(TQPoint(m_viewpos.x() + dx, m_viewpos.y() + dy)); emit valueChangedRelative(dx, dy); m_mouse = e->pos(); } -void ScrollBox::drawContents(QPainter* paint) +void ScrollBox::drawContents(TQPainter* paint) { if (m_pagesize.isEmpty()) return ; - QRect c(contentsRect()); + TQRect c(contentsRect()); paint->setPen(Qt::red); @@ -97,15 +97,15 @@ void ScrollBox::drawContents(QPainter* paint) paint->drawRect(x, y, w, h); } -void ScrollBox::setPageSize(const QSize& s) +void ScrollBox::setPageSize(const TQSize& s) { m_pagesize = s; setFixedWidth(100); setFixedHeight(100); - int maxWidth = int(QApplication::desktop()->width() * 0.75); - int maxHeight = int(QApplication::desktop()->height() * 0.75); + int maxWidth = int(TQApplication::desktop()->width() * 0.75); + int maxHeight = int(TQApplication::desktop()->height() * 0.75); if (m_sizeMode == FixWidth) { int height = s.height() * width() / s.width(); @@ -126,13 +126,13 @@ void ScrollBox::setPageSize(const QSize& s) repaint(); } -void ScrollBox::setViewSize(const QSize& s) +void ScrollBox::setViewSize(const TQSize& s) { m_viewsize = s; repaint(); } -void ScrollBox::setViewPos(const QPoint& pos) +void ScrollBox::setViewPos(const TQPoint& pos) { m_viewpos = pos; repaint(); @@ -140,17 +140,17 @@ void ScrollBox::setViewPos(const QPoint& pos) void ScrollBox::setViewX(int x) { - m_viewpos = QPoint(x, m_viewpos.y()); + m_viewpos = TQPoint(x, m_viewpos.y()); repaint(); } void ScrollBox::setViewY(int y) { - m_viewpos = QPoint(m_viewpos.x(), y); + m_viewpos = TQPoint(m_viewpos.x(), y); repaint(); } -void ScrollBox::setThumbnail(QPixmap img) +void ScrollBox::setThumbnail(TQPixmap img) { setPaletteBackgroundPixmap(img.convertToImage().smoothScale(size())); } |