summaryrefslogtreecommitdiffstats
path: root/src/gui/editors/segment/segmentcanvas/SegmentPencil.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/editors/segment/segmentcanvas/SegmentPencil.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/editors/segment/segmentcanvas/SegmentPencil.cpp')
-rw-r--r--src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp
index 68ca020..60a74f4 100644
--- a/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp
+++ b/src/gui/editors/segment/segmentcanvas/SegmentPencil.cpp
@@ -42,11 +42,11 @@
#include "SegmentTool.h"
#include <kcommand.h>
#include <klocale.h>
-#include <qcursor.h>
-#include <qevent.h>
-#include <qpoint.h>
-#include <qrect.h>
-#include <qstring.h>
+#include <tqcursor.h>
+#include <tqevent.h>
+#include <tqpoint.h>
+#include <tqrect.h>
+#include <tqstring.h>
namespace Rosegarden
@@ -65,26 +65,26 @@ SegmentPencil::SegmentPencil(CompositionView *c, RosegardenGUIDoc *d)
void SegmentPencil::ready()
{
m_canvas->viewport()->setCursor(Qt::ibeamCursor);
- connect(m_canvas, SIGNAL(contentsMoving (int, int)),
- this, SLOT(slotCanvasScrolled(int, int)));
- setContextHelpFor(QPoint(0, 0));
+ connect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
+ this, TQT_SLOT(slotCanvasScrolled(int, int)));
+ setContextHelpFor(TQPoint(0, 0));
}
void SegmentPencil::stow()
{
- disconnect(m_canvas, SIGNAL(contentsMoving (int, int)),
- this, SLOT(slotCanvasScrolled(int, int)));
+ disconnect(m_canvas, TQT_SIGNAL(contentsMoving (int, int)),
+ this, TQT_SLOT(slotCanvasScrolled(int, int)));
}
void SegmentPencil::slotCanvasScrolled(int newX, int newY)
{
- QMouseEvent tmpEvent(QEvent::MouseMove,
- m_canvas->viewport()->mapFromGlobal(QCursor::pos()) + QPoint(newX, newY),
+ TQMouseEvent tmpEvent(TQEvent::MouseMove,
+ m_canvas->viewport()->mapFromGlobal(TQCursor::pos()) + TQPoint(newX, newY),
Qt::NoButton, Qt::NoButton);
handleMouseMove(&tmpEvent);
}
-void SegmentPencil::handleMouseButtonPress(QMouseEvent *e)
+void SegmentPencil::handleMouseButtonPress(TQMouseEvent *e)
{
if (e->button() == RightButton)
return;
@@ -134,7 +134,7 @@ void SegmentPencil::handleMouseButtonPress(QMouseEvent *e)
.getMaxContemporaneousSegmentsOnTrack(trackId);
if (multiple < 1) multiple = 1;
- QRect tmpRect;
+ TQRect tmpRect;
tmpRect.setX(int(nearbyint(m_canvas->grid().getRulerScale()->getXForTime(time))));
tmpRect.setY(m_canvas->grid().getYBinCoordinate(trackPosition) + 1);
tmpRect.setHeight(m_canvas->grid().getYSnap() * multiple - 2);
@@ -151,7 +151,7 @@ void SegmentPencil::handleMouseButtonPress(QMouseEvent *e)
m_canvas->updateContents(tmpRect);
}
-void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e)
+void SegmentPencil::handleMouseButtonRelease(TQMouseEvent* e)
{
if (e->button() == RightButton)
return ;
@@ -160,7 +160,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e)
if (m_newRect) {
- QRect tmpRect = m_canvas->getTmpRect();
+ TQRect tmpRect = m_canvas->getTmpRect();
int trackPosition = m_canvas->grid().getYBin(tmpRect.y());
Track *track = m_doc->getComposition().getTrackByPosition(trackPosition);
@@ -205,7 +205,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e)
m_canvas->getModel()->clearSelected();
m_canvas->getModel()->setSelected(item);
m_canvas->getModel()->signalSelection();
- m_canvas->setTmpRect(QRect());
+ m_canvas->setTmpRect(TQRect());
m_canvas->slotUpdateSegmentsDrawBuffer();
} else {
@@ -214,7 +214,7 @@ void SegmentPencil::handleMouseButtonRelease(QMouseEvent* e)
}
}
-int SegmentPencil::handleMouseMove(QMouseEvent *e)
+int SegmentPencil::handleMouseMove(TQMouseEvent *e)
{
if (!m_newRect) {
setContextHelpFor(e->pos());
@@ -227,8 +227,8 @@ int SegmentPencil::handleMouseMove(QMouseEvent *e)
clearContextHelp();
}
- QRect tmpRect = m_canvas->getTmpRect();
- QRect oldTmpRect = tmpRect;
+ TQRect tmpRect = m_canvas->getTmpRect();
+ TQRect oldTmpRect = tmpRect;
m_canvas->setSnapGrain(false);
@@ -271,7 +271,7 @@ int SegmentPencil::handleMouseMove(QMouseEvent *e)
return RosegardenCanvasView::FollowHorizontal;
}
-void SegmentPencil::setContextHelpFor(QPoint p)
+void SegmentPencil::setContextHelpFor(TQPoint p)
{
int trackPosition = m_canvas->grid().getYBin(p.y());
@@ -289,7 +289,7 @@ void SegmentPencil::setContextHelpFor(QPoint p)
setContextHelp(i18n("Click and drag to draw an empty segment. Control+Alt click and drag to draw in overlap mode."));
}
-const QString SegmentPencil::ToolName = "segmentpencil";
+const TQString SegmentPencil::ToolName = "segmentpencil";
}
#include "SegmentPencil.moc"