diff options
Diffstat (limited to 'src/gui/editors/matrix/MatrixPainter.cpp')
-rw-r--r-- | src/gui/editors/matrix/MatrixPainter.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/gui/editors/matrix/MatrixPainter.cpp b/src/gui/editors/matrix/MatrixPainter.cpp index be63bd7..11bbc0b 100644 --- a/src/gui/editors/matrix/MatrixPainter.cpp +++ b/src/gui/editors/matrix/MatrixPainter.cpp @@ -44,9 +44,9 @@ #include "MatrixView.h" #include <kaction.h> #include <kglobal.h> -#include <qiconset.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqpoint.h> +#include <tqstring.h> #include "misc/Debug.h" @@ -58,32 +58,32 @@ MatrixPainter::MatrixPainter(MatrixView* parent) m_currentElement(0), m_currentStaff(0) { - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/select.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Select Tool"), icon, 0, this, - SLOT(slotSelectSelected()), actionCollection(), + TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); new KAction(i18n("Switch to Move Tool"), "move", 0, this, - SLOT(slotMoveSelected()), actionCollection(), + TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); pixmap.load(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(i18n("Switch to Resize Tool"), icon, 0, this, - SLOT(slotResizeSelected()), actionCollection(), + TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); createMenu("matrixpainter.rc"); } -MatrixPainter::MatrixPainter(QString name, MatrixView* parent) +MatrixPainter::MatrixPainter(TQString name, MatrixView* parent) : MatrixTool(name, parent), m_currentElement(0), m_currentStaff(0) @@ -99,13 +99,13 @@ void MatrixPainter::handleEventRemoved(Event *event) void MatrixPainter::handleLeftButtonPress(timeT time, int pitch, int staffNo, - QMouseEvent *e, + TQMouseEvent *e, ViewElement *element) { MATRIX_DEBUG << "MatrixPainter::handleLeftButtonPress : pitch = " << pitch << ", time : " << time << endl; - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); m_currentStaff = m_mParentView->getStaff(staffNo); @@ -159,7 +159,7 @@ void MatrixPainter::handleLeftButtonPress(timeT time, int MatrixPainter::handleMouseMove(timeT time, int pitch, - QMouseEvent *e) + TQMouseEvent *e) { // sanity check if (!m_currentElement) @@ -175,7 +175,7 @@ int MatrixPainter::handleMouseMove(timeT time, // to the left and we want a more particular policy if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); time = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); if (time >= m_currentElement->getViewAbsoluteTime()) { time = getSnapGrid().snapX(p.x(), SnapGrid::SnapRight); @@ -226,7 +226,7 @@ int MatrixPainter::handleMouseMove(timeT time, void MatrixPainter::handleMouseRelease(timeT endTime, int, - QMouseEvent *e) + TQMouseEvent *e) { // This can happen in case of screen/window capture - // we only get a mouse release, the window snapshot tool @@ -238,7 +238,7 @@ void MatrixPainter::handleMouseRelease(timeT endTime, // to the left and we want a more particular policy if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); endTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); if (endTime >= m_currentElement->getViewAbsoluteTime()) { endTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapRight); @@ -320,8 +320,8 @@ void MatrixPainter::handleMouseRelease(timeT endTime, void MatrixPainter::ready() { - connect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); m_mParentView->setCanvasCursor(Qt::crossCursor); @@ -330,8 +330,8 @@ void MatrixPainter::ready() void MatrixPainter::stow() { - disconnect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); + disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); } void MatrixPainter::slotMatrixScrolled(int newX, int newY) @@ -339,14 +339,14 @@ void MatrixPainter::slotMatrixScrolled(int newX, int newY) if (!m_currentElement) return ; - QPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), + TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), m_parentView->getCanvasView()->contentsY()); - QPoint offset = newP1 - oldP1; + TQPoint offset = newP1 - oldP1; offset = m_mParentView->inverseMapPoint(offset); - QPoint p(m_currentElement->getCanvasX() + m_currentElement->getWidth(), m_currentElement->getCanvasY()); + TQPoint p(m_currentElement->getCanvasX() + m_currentElement->getWidth(), m_currentElement->getCanvasY()); p += offset; timeT newTime = getSnapGrid().snapX(p.x()); @@ -364,7 +364,7 @@ void MatrixPainter::setBasicContextHelp() } } -const QString MatrixPainter::ToolName = "painter"; +const TQString MatrixPainter::ToolName = "painter"; } #include "MatrixPainter.moc" |