summaryrefslogtreecommitdiffstats
path: root/src/gui/rulers/LoopRuler.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-09-06 20:59:29 +0000
commit11f31c37e5fa4889d9989f10272f44845449cb7b (patch)
tree4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/rulers/LoopRuler.cpp
parent832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff)
downloadrosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.tar.gz
rosegarden-11f31c37e5fa4889d9989f10272f44845449cb7b.zip
Initial TQt conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/rosegarden@1172292 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/gui/rulers/LoopRuler.cpp')
-rw-r--r--src/gui/rulers/LoopRuler.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/gui/rulers/LoopRuler.cpp b/src/gui/rulers/LoopRuler.cpp
index bdf6c5e..0a0adb2 100644
--- a/src/gui/rulers/LoopRuler.cpp
+++ b/src/gui/rulers/LoopRuler.cpp
@@ -31,15 +31,15 @@
#include "gui/general/GUIPalette.h"
#include "gui/general/HZoomable.h"
#include "gui/general/RosegardenCanvasView.h"
-#include <qpainter.h>
-#include <qrect.h>
-#include <qsize.h>
-#include <qwidget.h>
-#include <qtooltip.h>
+#include <tqpainter.h>
+#include <tqrect.h>
+#include <tqsize.h>
+#include <tqwidget.h>
+#include <tqtooltip.h>
#include <klocale.h>
#include <kaction.h>
-#include <qpainter.h>
-#include <qpointarray.h>
+#include <tqpainter.h>
+#include <tqpointarray.h>
#include "document/RosegardenGUIDoc.h"
@@ -51,9 +51,9 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc,
int height,
double xorigin,
bool invert,
- QWidget *parent,
+ TQWidget *parent,
const char *name) :
- QWidget(parent, name),
+ TQWidget(parent, name),
m_doc(doc),
m_height(height),
m_xorigin(xorigin),
@@ -67,7 +67,7 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc,
m_grid(&m_defaultGrid),
m_loopingMode(false),
m_startLoop(0), m_endLoop(0),
- m_quickMarkerPen(QPen(GUIPalette::getColour(GUIPalette::QuickMarker), 4))
+ m_quickMarkerPen(TQPen(GUIPalette::getColour(GUIPalette::QuickMarker), 4))
{
/*
* I need to understand if this ruler is being built for the main
@@ -85,7 +85,7 @@ LoopRuler::LoopRuler(RosegardenGUIDoc *doc,
m_defaultGrid.setSnapTime(SnapGrid::NoSnap);
m_loopGrid.setSnapTime(SnapGrid::SnapToBeat);
- QToolTip::add
+ TQToolTip::add
(this, i18n("Click and drag to move the playback pointer.\nShift-click and drag to set a range for looping or editing.\nShift-click to clear the loop or range.\nDouble-click to start playback."));
}
@@ -125,30 +125,30 @@ void LoopRuler::scrollHoriz(int x)
}
}
-QSize LoopRuler::sizeHint() const
+TQSize LoopRuler::sizeHint() const
{
double width =
m_rulerScale->getBarPosition(m_rulerScale->getLastVisibleBar()) +
m_rulerScale->getBarWidth(m_rulerScale->getLastVisibleBar()) +
m_xorigin;
- QSize res(std::max(int(width), m_width), m_height);
+ TQSize res(std::max(int(width), m_width), m_height);
return res;
}
-QSize LoopRuler::minimumSizeHint() const
+TQSize LoopRuler::minimumSizeHint() const
{
double firstBarWidth = m_rulerScale->getBarWidth(0) + m_xorigin;
- QSize res = QSize(int(firstBarWidth), m_height);
+ TQSize res = TQSize(int(firstBarWidth), m_height);
return res;
}
-void LoopRuler::paintEvent(QPaintEvent* e)
+void LoopRuler::paintEvent(TQPaintEvent* e)
{
- QPainter paint(this);
+ TQPainter paint(this);
if (getHScaleFactor() != 1.0)
paint.scale(getHScaleFactor(), 1.0);
@@ -178,9 +178,9 @@ void LoopRuler::paintEvent(QPaintEvent* e)
}
}
-void LoopRuler::drawBarSections(QPainter* paint)
+void LoopRuler::drawBarSections(TQPainter* paint)
{
- QRect clipRect = paint->clipRegion().boundingRect();
+ TQRect clipRect = paint->clipRegion().boundingRect();
int firstBar = m_rulerScale->getBarForX(clipRect.x() -
m_currentXOffset -
@@ -229,7 +229,7 @@ void LoopRuler::drawBarSections(QPainter* paint)
}
void
-LoopRuler::drawLoopMarker(QPainter* paint)
+LoopRuler::drawLoopMarker(TQPainter* paint)
{
double x1 = (int)m_rulerScale->getXForTime(m_startLoop);
double x2 = (int)m_rulerScale->getXForTime(m_endLoop);
@@ -251,7 +251,7 @@ LoopRuler::drawLoopMarker(QPainter* paint)
}
void
-LoopRuler::mousePressEvent(QMouseEvent *mE)
+LoopRuler::mousePressEvent(TQMouseEvent *mE)
{
RG_DEBUG << "LoopRuler::mousePressEvent: x = " << mE->x() << endl;
@@ -278,7 +278,7 @@ LoopRuler::mousePressEvent(QMouseEvent *mE)
}
void
-LoopRuler::mouseReleaseEvent(QMouseEvent *mE)
+LoopRuler::mouseReleaseEvent(TQMouseEvent *mE)
{
if (mE->button() == LeftButton) {
if (m_loopingMode) {
@@ -313,7 +313,7 @@ LoopRuler::mouseReleaseEvent(QMouseEvent *mE)
}
void
-LoopRuler::mouseDoubleClickEvent(QMouseEvent *mE)
+LoopRuler::mouseDoubleClickEvent(TQMouseEvent *mE)
{
double x = mE->pos().x() / getHScaleFactor() - m_currentXOffset - m_xorigin;
if (x < 0)
@@ -326,7 +326,7 @@ LoopRuler::mouseDoubleClickEvent(QMouseEvent *mE)
}
void
-LoopRuler::mouseMoveEvent(QMouseEvent *mE)
+LoopRuler::mouseMoveEvent(TQMouseEvent *mE)
{
double x = mE->pos().x() / getHScaleFactor() - m_currentXOffset - m_xorigin;
if (x < 0)
@@ -351,7 +351,7 @@ void LoopRuler::slotSetLoopMarker(timeT startLoop,
m_startLoop = startLoop;
m_endLoop = endLoop;
- QPainter paint(this);
+ TQPainter paint(this);
paint.setBrush(colorGroup().foreground());
drawBarSections(&paint);
drawLoopMarker(&paint);