diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-06 20:59:29 +0000 |
commit | 11f31c37e5fa4889d9989f10272f44845449cb7b (patch) | |
tree | 4383da04a76c497950d957fc6120b0fd0d9082c2 /src/gui/editors/matrix | |
parent | 832eb69d571e8e518db45d0c0e6fbc0f00690209 (diff) | |
download | rosegarden-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/matrix')
30 files changed, 633 insertions, 633 deletions
diff --git a/src/gui/editors/matrix/MatrixCanvasView.cpp b/src/gui/editors/matrix/MatrixCanvasView.cpp index c92b4aa..f97ceaf 100644 --- a/src/gui/editors/matrix/MatrixCanvasView.cpp +++ b/src/gui/editors/matrix/MatrixCanvasView.cpp @@ -32,9 +32,9 @@ #include "MatrixStaff.h" #include "QCanvasMatrixRectangle.h" #include "QCanvasMatrixDiamond.h" -#include <qcanvas.h> -#include <qpoint.h> -#include <qwidget.h> +#include <tqcanvas.h> +#include <tqpoint.h> +#include <tqwidget.h> #include "misc/Debug.h" @@ -45,7 +45,7 @@ namespace Rosegarden MatrixCanvasView::MatrixCanvasView(MatrixStaff& staff, SnapGrid *snapGrid, bool drumMode, - QCanvas *viewing, QWidget *parent, + TQCanvas *viewing, TQWidget *parent, const char *name, WFlags f) : RosegardenCanvasView(viewing, parent, name, f), m_staff(staff), @@ -65,9 +65,9 @@ MatrixCanvasView::MatrixCanvasView(MatrixStaff& staff, MatrixCanvasView::~MatrixCanvasView() {} -void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) +void MatrixCanvasView::contentsMousePressEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); updateGridSnap(e); @@ -95,14 +95,14 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) // std::cerr << "MatrixCanvasView::contentsMousePressEvent() at pitch " // << evPitch << ", time " << evTime << std::endl; - QCanvasItemList itemList = canvas()->collisions(p); - QCanvasItemList::Iterator it; + TQCanvasItemList itemList = canvas()->collisions(p); + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; - QCanvasItem* activeItem = 0; + TQCanvasItem* activeItem = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *mRect = 0; @@ -117,9 +117,9 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) // std::cerr << "MatrixCanvasView: point is " << p.x() << "," << p.y()<< std::endl; - QRect rect = mRect->rect(); + TQRect rect = mRect->rect(); if (dynamic_cast<QCanvasMatrixDiamond*>(mRect)) { - rect = QRect(rect.x() - rect.height()/2, + rect = TQRect(rect.x() - rect.height()/2, rect.y(), rect.width(), rect.height()); @@ -127,7 +127,7 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) // std::cerr << "MatrixCanvasView: adjusted rect " << rect.x() << "," << rect.y() << " (" << rect.width() << "x" << rect.height() << ")" << std::endl; - // QCanvas::collisions() can be a bit optimistic and report + // TQCanvas::collisions() can be a bit optimistic and report // items which are close to the point but not actually under it. // So a little sanity check helps. if (!rect.contains(p, true)) continue; @@ -154,9 +154,9 @@ void MatrixCanvasView::contentsMousePressEvent(QMouseEvent* e) m_ignoreClick = true; } -void MatrixCanvasView::contentsMouseMoveEvent(QMouseEvent* e) +void MatrixCanvasView::contentsMouseMoveEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); /* if (m_snapGrid->getSnapTime(double(p.x()))) m_lastSnap = m_snapGrid->getSnapTime(double(p.x())); @@ -188,13 +188,13 @@ void MatrixCanvasView::contentsMouseMoveEvent(QMouseEvent* e) m_previousEvTime = evTime; } - QCanvasItemList itemList = canvas()->collisions(p); + TQCanvasItemList itemList = canvas()->collisions(p); MatrixElement* mel = 0; - for (QCanvasItemList::iterator it = itemList.begin(); + for (TQCanvasItemList::iterator it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *mRect = 0; if ((mRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) { @@ -223,9 +223,9 @@ void MatrixCanvasView::contentsMouseMoveEvent(QMouseEvent* e) } -void MatrixCanvasView::contentsMouseDoubleClickEvent (QMouseEvent* e) +void MatrixCanvasView::contentsMouseDoubleClickEvent (TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); if (!m_staff.containsCanvasCoords(p.x(), p.y())) { m_ignoreClick = true; @@ -235,9 +235,9 @@ void MatrixCanvasView::contentsMouseDoubleClickEvent (QMouseEvent* e) contentsMousePressEvent(e); } -void MatrixCanvasView::contentsMouseReleaseEvent(QMouseEvent* e) +void MatrixCanvasView::contentsMouseReleaseEvent(TQMouseEvent* e) { - QPoint p = inverseMapPoint(e->pos()); + TQPoint p = inverseMapPoint(e->pos()); if (m_ignoreClick) { m_ignoreClick = false; @@ -261,12 +261,12 @@ void MatrixCanvasView::contentsMouseReleaseEvent(QMouseEvent* e) m_mouseWasPressed = false; } -void MatrixCanvasView::slotExternalWheelEvent(QWheelEvent* e) +void MatrixCanvasView::slotExternalWheelEvent(TQWheelEvent* e) { wheelEvent(e); } -void MatrixCanvasView::updateGridSnap(QMouseEvent *e) +void MatrixCanvasView::updateGridSnap(TQMouseEvent *e) { Qt::ButtonState bs = e->state(); @@ -288,12 +288,12 @@ void MatrixCanvasView::updateGridSnap(QMouseEvent *e) } } -void MatrixCanvasView::enterEvent(QEvent *e) +void MatrixCanvasView::enterEvent(TQEvent *e) { emit mouseEntered(); } -void MatrixCanvasView::leaveEvent(QEvent *e) +void MatrixCanvasView::leaveEvent(TQEvent *e) { emit mouseLeft(); } diff --git a/src/gui/editors/matrix/MatrixCanvasView.h b/src/gui/editors/matrix/MatrixCanvasView.h index 2ec4c7e..694856e 100644 --- a/src/gui/editors/matrix/MatrixCanvasView.h +++ b/src/gui/editors/matrix/MatrixCanvasView.h @@ -30,11 +30,11 @@ #include "base/Event.h" -class QWidget; -class QWheelEvent; -class QMouseEvent; -class QCanvasItem; -class QCanvas; +class TQWidget; +class TQWheelEvent; +class TQMouseEvent; +class TQCanvasItem; +class TQCanvas; namespace Rosegarden @@ -53,8 +53,8 @@ public: MatrixCanvasView(MatrixStaff&, SnapGrid *, bool drumMode, - QCanvas *viewing, - QWidget *parent=0, const char *name=0, WFlags f=0); + TQCanvas *viewing, + TQWidget *parent=0, const char *name=0, WFlags f=0); ~MatrixCanvasView(); @@ -64,12 +64,12 @@ public: signals: /** - * Emitted when the user clicks on a QCanvasItem which is active + * Emitted when the user clicks on a TQCanvasItem which is active * * @see QCanvasItem#setActive */ - void activeItemPressed(QMouseEvent*, - QCanvasItem* item); + void activeItemPressed(TQMouseEvent*, + TQCanvasItem* item); /** * Emitted when the mouse cursor moves to a different height @@ -88,33 +88,33 @@ signals: void hoveredOverAbsoluteTimeChanged(unsigned int time); void mousePressed(timeT time, int pitch, - QMouseEvent*, MatrixElement*); + TQMouseEvent*, MatrixElement*); - void mouseMoved(timeT time, int pitch, QMouseEvent*); + void mouseMoved(timeT time, int pitch, TQMouseEvent*); - void mouseReleased(timeT time, int pitch, QMouseEvent*); + void mouseReleased(timeT time, int pitch, TQMouseEvent*); void mouseEntered(); void mouseLeft(); public slots: - void slotExternalWheelEvent(QWheelEvent*); + void slotExternalWheelEvent(TQWheelEvent*); protected: /** * Callback for a mouse button press event in the canvas */ - virtual void contentsMousePressEvent(QMouseEvent*); + virtual void contentsMousePressEvent(TQMouseEvent*); /** * Callback for a mouse move event in the canvas */ - virtual void contentsMouseMoveEvent(QMouseEvent*); + virtual void contentsMouseMoveEvent(TQMouseEvent*); /** * Callback for a mouse button release event in the canvas */ - virtual void contentsMouseReleaseEvent(QMouseEvent*); + virtual void contentsMouseReleaseEvent(TQMouseEvent*); /** * Callback for a mouse double-click event in the canvas @@ -122,10 +122,10 @@ protected: * NOTE: a double click event is always preceded by a mouse press * event */ - virtual void contentsMouseDoubleClickEvent(QMouseEvent*); + virtual void contentsMouseDoubleClickEvent(TQMouseEvent*); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); /** * Update the value of snap grid according to the button's state @@ -136,7 +136,7 @@ protected: * @see #setSmoothModifier * @see #getSmoothModifier */ - void updateGridSnap(QMouseEvent *e); + void updateGridSnap(TQMouseEvent *e); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/matrix/MatrixElement.cpp b/src/gui/editors/matrix/MatrixElement.cpp index 1101284..c706c87 100644 --- a/src/gui/editors/matrix/MatrixElement.cpp +++ b/src/gui/editors/matrix/MatrixElement.cpp @@ -32,9 +32,9 @@ #include "gui/general/GUIPalette.h" #include "QCanvasMatrixDiamond.h" #include "QCanvasMatrixRectangle.h" -#include <qbrush.h> -#include <qcanvas.h> -#include <qcolor.h> +#include <tqbrush.h> +#include <tqcanvas.h> +#include <tqcolor.h> namespace Rosegarden @@ -62,7 +62,7 @@ MatrixElement::~MatrixElement() removeOverlapRectangles(); } -void MatrixElement::setCanvas(QCanvas* c) +void MatrixElement::setCanvas(TQCanvas* c) { if (!m_canvasRect->canvas()) { @@ -86,10 +86,10 @@ void MatrixElement::drawOverlapRectangles() { if (m_overlapRectangles) removeOverlapRectangles(); - QRect elRect = m_canvasRect->rect(); + TQRect elRect = m_canvasRect->rect(); QCanvasItemList itemList = m_canvasRect->canvas()->collisions(elRect); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; @@ -101,14 +101,14 @@ void MatrixElement::drawOverlapRectangles() // Element does'nt collide with itself if (mRect == m_canvasRect) continue; - QRect rect = mRect->rect() & elRect; + TQRect rect = mRect->rect() & elRect; if (!rect.isEmpty()) { if (!m_overlapRectangles) { m_overlapRectangles = new OverlapRectangles(); } - QCanvasRectangle * - overlap = new QCanvasRectangle(rect, m_canvasRect->canvas()); + TQCanvasRectangle * + overlap = new TQCanvasRectangle(rect, m_canvasRect->canvas()); overlap->setBrush(GUIPalette::getColour(GUIPalette::MatrixOverlapBlock)); overlap->setZ(getCanvasZ() + 1); overlap->show(); @@ -118,11 +118,11 @@ void MatrixElement::drawOverlapRectangles() } } -void MatrixElement::redrawOverlaps(QRect rect) +void MatrixElement::redrawOverlaps(TQRect rect) { QCanvasItemList itemList = m_canvasRect->canvas()->collisions(rect); - QCanvasItemList::Iterator it; + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { @@ -147,7 +147,7 @@ void MatrixElement::removeOverlapRectangles() m_overlapRectangles = NULL; } -bool MatrixElement::getVisibleRectangle(QRect &rectangle) +bool MatrixElement::getVisibleRectangle(TQRect &rectangle) { if (m_canvasRect && m_canvasRect->isVisible()) { rectangle = m_canvasRect->rect(); diff --git a/src/gui/editors/matrix/MatrixElement.h b/src/gui/editors/matrix/MatrixElement.h index d330991..921297c 100644 --- a/src/gui/editors/matrix/MatrixElement.h +++ b/src/gui/editors/matrix/MatrixElement.h @@ -27,11 +27,11 @@ #define _RG_MATRIXELEMENT_H_ #include "base/ViewElement.h" -#include <qbrush.h> -#include <qcanvas.h> +#include <tqbrush.h> +#include <tqcanvas.h> #include "QCanvasMatrixRectangle.h" -class QColor; +class TQColor; namespace Rosegarden @@ -42,7 +42,7 @@ class Event; class MatrixElement : public ViewElement { - typedef std::vector <QCanvasRectangle *> OverlapRectangles; + typedef std::vector <TQCanvasRectangle *> OverlapRectangles; public: @@ -50,7 +50,7 @@ public: virtual ~MatrixElement(); - void setCanvas(QCanvas* c); + void setCanvas(TQCanvas* c); /** * Returns the actual x coordinate of the element on the canvas @@ -94,8 +94,8 @@ public: /* * Set the colour of the element */ - void setColour(const QColor &colour) - { m_canvasRect->setBrush(QBrush(colour)); } + void setColour(const TQColor &colour) + { m_canvasRect->setBrush(TQBrush(colour)); } /** * Draws overlap rectangles (if any) @@ -112,12 +112,12 @@ public: * If element rectangle is currently visible gets its size and returns true. * Returns false if element rectangle is undefined or not visible. */ - bool getVisibleRectangle(QRect &rectangle); + bool getVisibleRectangle(TQRect &rectangle); /** * Redraw overlap rectangles of all matrix elements colliding with rect */ - void redrawOverlaps(QRect rect); + void redrawOverlaps(TQRect rect); protected: diff --git a/src/gui/editors/matrix/MatrixEraser.cpp b/src/gui/editors/matrix/MatrixEraser.cpp index 6c2373e..226c4a8 100644 --- a/src/gui/editors/matrix/MatrixEraser.cpp +++ b/src/gui/editors/matrix/MatrixEraser.cpp @@ -36,8 +36,8 @@ #include "MatrixView.h" #include <kaction.h> #include <kglobal.h> -#include <qiconset.h> -#include <qstring.h> +#include <tqiconset.h> +#include <tqstring.h> namespace Rosegarden @@ -47,26 +47,26 @@ MatrixEraser::MatrixEraser(MatrixView* parent) : MatrixTool("MatrixEraser", parent), 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 Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); 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("matrixeraser.rc"); @@ -75,7 +75,7 @@ MatrixEraser::MatrixEraser(MatrixView* parent) void MatrixEraser::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent*, + TQMouseEvent*, ViewElement* el) { MATRIX_DEBUG << "MatrixEraser::handleLeftButtonPress : el = " @@ -105,6 +105,6 @@ void MatrixEraser::setBasicContextHelp() setContextHelp(i18n("Click on a note to delete it")); } -const QString MatrixEraser::ToolName = "eraser"; +const TQString MatrixEraser::ToolName = "eraser"; } diff --git a/src/gui/editors/matrix/MatrixEraser.h b/src/gui/editors/matrix/MatrixEraser.h index 4e3d65f..a79d70d 100644 --- a/src/gui/editors/matrix/MatrixEraser.h +++ b/src/gui/editors/matrix/MatrixEraser.h @@ -27,9 +27,9 @@ #define _RG_MATRIXERASER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -49,10 +49,10 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); - static const QString ToolName; + static const TQString ToolName; virtual void ready(); diff --git a/src/gui/editors/matrix/MatrixMover.cpp b/src/gui/editors/matrix/MatrixMover.cpp index d725f16..adf558d 100644 --- a/src/gui/editors/matrix/MatrixMover.cpp +++ b/src/gui/editors/matrix/MatrixMover.cpp @@ -45,9 +45,9 @@ #include "MatrixVLayout.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" @@ -60,26 +60,26 @@ MatrixMover::MatrixMover(MatrixView* parent) : m_currentStaff(0), m_lastPlayedPitch(-1) { - 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 Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); new KAction(i18n("Switch to Erase Tool"), "eraser", 0, this, - SLOT(slotEraseSelected()), actionCollection(), + TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); 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("matrixmover.rc"); @@ -95,7 +95,7 @@ void MatrixMover::handleEventRemoved(Event *event) void MatrixMover::handleLeftButtonPress(timeT time, int pitch, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement* el) { MATRIX_DEBUG << "MatrixMover::handleLeftButtonPress() : time = " << time << ", el = " << el << endl; @@ -177,7 +177,7 @@ void MatrixMover::handleLeftButtonPress(timeT time, } timeT -MatrixMover::getDragTime(QMouseEvent *e, timeT candidate) +MatrixMover::getDragTime(TQMouseEvent *e, timeT candidate) { int x = m_mParentView->inverseMapPoint(e->pos()).x(); int xdiff = x - m_clickX; @@ -201,7 +201,7 @@ MatrixMover::getDragTime(QMouseEvent *e, timeT candidate) int MatrixMover::handleMouseMove(timeT newTime, int newPitch, - QMouseEvent *e) + TQMouseEvent *e) { MATRIX_DEBUG << "MatrixMover::handleMouseMove() time = " << newTime << endl; @@ -280,7 +280,7 @@ int MatrixMover::handleMouseMove(timeT newTime, void MatrixMover::handleMouseRelease(timeT newTime, int newPitch, - QMouseEvent *e) + TQMouseEvent *e) { MATRIX_DEBUG << "MatrixMover::handleMouseRelease() - newPitch = " << newPitch << endl; @@ -322,7 +322,7 @@ void MatrixMover::handleMouseRelease(timeT newTime, m_lastPlayedPitch = newPitch; } - QString commandLabel; + TQString commandLabel; if (m_quickCopy) { if (selection->getAddedEvents() < 2) { commandLabel = i18n("Copy and Move Event"); @@ -420,20 +420,20 @@ void MatrixMover::handleMouseRelease(timeT newTime, void MatrixMover::ready() { - connect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); - connect(this, SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - m_mParentView, SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + connect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); + connect(this, TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), + m_mParentView, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); m_mParentView->setCanvasCursor(Qt::sizeAllCursor); setBasicContextHelp(); } void MatrixMover::stow() { - disconnect(m_parentView->getCanvasView(), SIGNAL(contentsMoving (int, int)), - this, SLOT(slotMatrixScrolled(int, int))); - disconnect(this, SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - m_mParentView, SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + disconnect(m_parentView->getCanvasView(), TQT_SIGNAL(contentsMoving (int, int)), + this, TQT_SLOT(slotMatrixScrolled(int, int))); + disconnect(this, TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), + m_mParentView, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); } void MatrixMover::slotMatrixScrolled(int newX, int newY) @@ -441,14 +441,14 @@ void MatrixMover::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->getCanvasY()); + TQPoint p(m_currentElement->getCanvasX(), m_currentElement->getCanvasY()); p += offset; timeT newTime = getSnapGrid().snapX(p.x()); @@ -475,7 +475,7 @@ void MatrixMover::setBasicContextHelp(bool ctrlPressed) } } -const QString MatrixMover::ToolName = "mover"; +const TQString MatrixMover::ToolName = "mover"; } #include "MatrixMover.moc" diff --git a/src/gui/editors/matrix/MatrixMover.h b/src/gui/editors/matrix/MatrixMover.h index ac95c5f..258b465 100644 --- a/src/gui/editors/matrix/MatrixMover.h +++ b/src/gui/editors/matrix/MatrixMover.h @@ -27,11 +27,11 @@ #define _RG_MATRIXMOVER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -54,7 +54,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); /** @@ -62,16 +62,16 @@ public: */ virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); /** * Actually insert the new element */ virtual void handleMouseRelease(timeT, int height, - QMouseEvent*); + TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; /** * Respond to an event being deleted -- it may be the one the tool @@ -93,7 +93,7 @@ protected: void setBasicContextHelp(bool ctrlPressed = false); - timeT getDragTime(QMouseEvent *e, timeT candidate); + timeT getDragTime(TQMouseEvent *e, timeT candidate); MatrixElement* m_currentElement; MatrixStaff* m_currentStaff; 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" diff --git a/src/gui/editors/matrix/MatrixPainter.h b/src/gui/editors/matrix/MatrixPainter.h index 570243a..e04cda9 100644 --- a/src/gui/editors/matrix/MatrixPainter.h +++ b/src/gui/editors/matrix/MatrixPainter.h @@ -27,11 +27,11 @@ #define _RG_MATRIXPAINTER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -55,7 +55,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); /** @@ -63,16 +63,16 @@ public: */ virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); /** * Actually insert the new element */ virtual void handleMouseRelease(timeT, int height, - QMouseEvent*); + TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; /** * Respond to an event being deleted -- it may be the one the tool @@ -89,7 +89,7 @@ protected slots: protected: MatrixPainter(MatrixView*); - MatrixPainter(QString name, MatrixView*); + MatrixPainter(TQString name, MatrixView*); void setBasicContextHelp(); diff --git a/src/gui/editors/matrix/MatrixParameterBox.cpp b/src/gui/editors/matrix/MatrixParameterBox.cpp index c330b94..75228c3 100644 --- a/src/gui/editors/matrix/MatrixParameterBox.cpp +++ b/src/gui/editors/matrix/MatrixParameterBox.cpp @@ -31,19 +31,19 @@ #include "document/RosegardenGUIDoc.h" #include "gui/editors/parameters/InstrumentParameterBox.h" #include <kcombobox.h> -#include <qfont.h> -#include <qfontmetrics.h> -#include <qframe.h> -#include <qlayout.h> -#include <qwidget.h> +#include <tqfont.h> +#include <tqfontmetrics.h> +#include <tqframe.h> +#include <tqlayout.h> +#include <tqwidget.h> namespace Rosegarden { MatrixParameterBox::MatrixParameterBox(RosegardenGUIDoc *doc, - QWidget *parent, const char* name): - QFrame(parent, name), + TQWidget *parent, const char* name): + TQFrame(parent, name), m_quantizations(BasicQuantizer::getStandardQuantizations()), m_doc(doc) { @@ -57,19 +57,19 @@ MatrixParameterBox::~MatrixParameterBox() void MatrixParameterBox::initBox() { - QFont boldFont; + TQFont boldFont; boldFont.setPointSize(int(boldFont.pointSize() * 9.5 / 10.0 + 0.5)); boldFont.setBold(true); - QFont plainFont; + TQFont plainFont; plainFont.setPointSize(plainFont.pointSize() * 9 / 10); - QFont font = plainFont; + TQFont font = plainFont; - QFontMetrics fontMetrics(font); + TQFontMetrics fontMetrics(font); // magic numbers: 13 is the height of the menu pixmaps, 10 is just 10 //int comboHeight = std::max(fontMetrics.height(), 13) + 10; - QGridLayout *gridLayout = new QGridLayout(this, 20, 3, 8, 1); + TQGridLayout *gridLayout = new TQGridLayout(this, 20, 3, 8, 1); m_instrumentParameterBox = new InstrumentParameterBox(m_doc, this); gridLayout->addMultiCellWidget(m_instrumentParameterBox, 0, 7, 0, 2); diff --git a/src/gui/editors/matrix/MatrixParameterBox.h b/src/gui/editors/matrix/MatrixParameterBox.h index d8d4a4d..036571b 100644 --- a/src/gui/editors/matrix/MatrixParameterBox.h +++ b/src/gui/editors/matrix/MatrixParameterBox.h @@ -26,12 +26,12 @@ #ifndef _RG_MATRIXPARAMETERBOX_H_ #define _RG_MATRIXPARAMETERBOX_H_ -#include <qframe.h> +#include <tqframe.h> #include <vector> #include "base/Event.h" -class QWidget; +class TQWidget; class KComboBox; @@ -49,7 +49,7 @@ class MatrixParameterBox : public QFrame Q_OBJECT public: - MatrixParameterBox(RosegardenGUIDoc *doc=0, QWidget *parent=0, const char* name=0); + MatrixParameterBox(RosegardenGUIDoc *doc=0, TQWidget *parent=0, const char* name=0); ~MatrixParameterBox(); void initBox(); diff --git a/src/gui/editors/matrix/MatrixResizer.cpp b/src/gui/editors/matrix/MatrixResizer.cpp index 2fab5e8..fce4306 100644 --- a/src/gui/editors/matrix/MatrixResizer.cpp +++ b/src/gui/editors/matrix/MatrixResizer.cpp @@ -42,9 +42,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" @@ -56,24 +56,24 @@ MatrixResizer::MatrixResizer(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 Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); 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"); createMenu("matrixresizer.rc"); @@ -89,7 +89,7 @@ void MatrixResizer::handleEventRemoved(Event *event) void MatrixResizer::handleLeftButtonPress(timeT, int, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement* el) { MATRIX_DEBUG << "MatrixResizer::handleLeftButtonPress() : el = " @@ -130,7 +130,7 @@ void MatrixResizer::handleLeftButtonPress(timeT, int MatrixResizer::handleMouseMove(timeT newTime, int, - QMouseEvent *e) + TQMouseEvent *e) { setBasicContextHelp(); @@ -148,7 +148,7 @@ int MatrixResizer::handleMouseMove(timeT newTime, // the closest direction instead if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); newTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); } @@ -192,7 +192,7 @@ int MatrixResizer::handleMouseMove(timeT newTime, void MatrixResizer::handleMouseRelease(timeT newTime, int, - QMouseEvent *e) + TQMouseEvent *e) { if (!m_currentElement || !m_currentStaff) return ; @@ -202,7 +202,7 @@ void MatrixResizer::handleMouseRelease(timeT newTime, // closest direction instead if (e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); newTime = getSnapGrid().snapX(p.x(), SnapGrid::SnapEither); } @@ -215,7 +215,7 @@ void MatrixResizer::handleMouseRelease(timeT newTime, if (selection->getAddedEvents() == 0) return ; else { - QString commandLabel = i18n("Resize Event"); + TQString commandLabel = i18n("Resize Event"); if (selection->getAddedEvents() > 1) commandLabel = i18n("Resize Events"); @@ -289,24 +289,24 @@ void MatrixResizer::handleMouseRelease(timeT newTime, void MatrixResizer::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::sizeHorCursor); setBasicContextHelp(); } void MatrixResizer::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 MatrixResizer::slotMatrixScrolled(int newX, int newY) { - QPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), + TQPoint newP1(newX, newY), oldP1(m_parentView->getCanvasView()->contentsX(), m_parentView->getCanvasView()->contentsY()); - QPoint p(newX, newY); + TQPoint p(newX, newY); if (newP1.x() > oldP1.x()) { p.setX(newX + m_parentView->getCanvasView()->visibleWidth()); @@ -327,7 +327,7 @@ void MatrixResizer::setBasicContextHelp() } } -const QString MatrixResizer::ToolName = "resizer"; +const TQString MatrixResizer::ToolName = "resizer"; } #include "MatrixResizer.moc" diff --git a/src/gui/editors/matrix/MatrixResizer.h b/src/gui/editors/matrix/MatrixResizer.h index e623cac..f851fba 100644 --- a/src/gui/editors/matrix/MatrixResizer.h +++ b/src/gui/editors/matrix/MatrixResizer.h @@ -27,11 +27,11 @@ #define _RG_MATRIXRESIZER_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; +class TQMouseEvent; namespace Rosegarden @@ -54,7 +54,7 @@ public: virtual void handleLeftButtonPress(timeT, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement*); /** @@ -62,16 +62,16 @@ public: */ virtual int handleMouseMove(timeT, int height, - QMouseEvent*); + TQMouseEvent*); /** * Actually insert the new element */ virtual void handleMouseRelease(timeT, int height, - QMouseEvent*); + TQMouseEvent*); - static const QString ToolName; + static const TQString ToolName; /** * Respond to an event being deleted -- it may be the one the tool diff --git a/src/gui/editors/matrix/MatrixSelector.cpp b/src/gui/editors/matrix/MatrixSelector.cpp index fbb9689..ef553a5 100644 --- a/src/gui/editors/matrix/MatrixSelector.cpp +++ b/src/gui/editors/matrix/MatrixSelector.cpp @@ -50,10 +50,10 @@ #include <kglobal.h> #include <kapplication.h> #include <kconfig.h> -#include <qdialog.h> -#include <qiconset.h> -#include <qpoint.h> -#include <qstring.h> +#include <tqdialog.h> +#include <tqiconset.h> +#include <tqpoint.h> +#include <tqstring.h> #include "misc/Debug.h" @@ -71,27 +71,27 @@ MatrixSelector::MatrixSelector(MatrixView* view) m_matrixView(view), m_selectionToMerge(0) { - connect(m_parentView, SIGNAL(usedSelection()), - this, SLOT(slotHideSelection())); + connect(m_parentView, TQT_SIGNAL(usedSelection()), + this, TQT_SLOT(slotHideSelection())); new KAction(i18n("Switch to Draw Tool"), "pencil", 0, this, - SLOT(slotDrawSelected()), actionCollection(), + TQT_SLOT(slotDrawSelected()), actionCollection(), "draw"); 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"); - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); - QIconSet icon = QIconSet(pixmap); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); + TQIconSet icon = TQIconSet(pixmap); new KAction(i18n("Switch to Resize Tool"), icon, 0, this, - SLOT(slotResizeSelected()), actionCollection(), + TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); createMenu("matrixselector.rc"); @@ -114,7 +114,7 @@ void MatrixSelector::slotClickTimeout() void MatrixSelector::handleLeftButtonPress(timeT time, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { MATRIX_DEBUG << "MatrixSelector::handleMousePress" << endl; @@ -125,7 +125,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, return ; } - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); m_currentStaff = m_mParentView->getStaff(staffNo); @@ -220,7 +220,7 @@ void MatrixSelector::handleLeftButtonPress(timeT time, void MatrixSelector::handleMidButtonPress(timeT time, int height, int staffNo, - QMouseEvent* e, + TQMouseEvent* e, ViewElement *element) { m_clickedElement = 0; // should be used for left-button clicks only @@ -240,7 +240,7 @@ void MatrixSelector::handleMidButtonPress(timeT time, void MatrixSelector::handleMouseDoubleClick(timeT , int , int staffNo, - QMouseEvent *ev, + TQMouseEvent *ev, ViewElement *element) { /* @@ -272,7 +272,7 @@ void MatrixSelector::handleMouseDoubleClick(timeT , EventEditDialog dialog(m_mParentView, *m_clickedElement->event(), true); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -287,7 +287,7 @@ void MatrixSelector::handleMouseDoubleClick(timeT , SimpleEventEditDialog dialog(m_mParentView, m_mParentView->getDocument(), *m_clickedElement->event(), false); - if (dialog.exec() == QDialog::Accepted && + if (dialog.exec() == TQDialog::Accepted && dialog.isModified()) { EventEditCommand *command = new EventEditCommand @@ -307,7 +307,7 @@ void MatrixSelector::handleMouseDoubleClick(timeT , else { - QRect rect = staff->getBarExtents(ev->x(), ev->y()); + TQRect rect = staff->getBarExtents(ev->x(), ev->y()); m_selectionRect->setX(rect.x() + 2); m_selectionRect->setY(rect.y()); @@ -317,15 +317,15 @@ void MatrixSelector::handleMouseDoubleClick(timeT , m_updateRect = false; m_justSelectedBar = true; - QTimer::singleShot(QApplication::doubleClickInterval(), this, - SLOT(slotClickTimeout())); + TQTimer::singleShot(TQApplication::doubleClickInterval(), this, + TQT_SLOT(slotClickTimeout())); } */ } void MatrixSelector::handleMouseTripleClick(timeT t, int height, int staffNo, - QMouseEvent *ev, + TQMouseEvent *ev, ViewElement *element) { if (!m_justSelectedBar) @@ -355,9 +355,9 @@ void MatrixSelector::handleMouseTripleClick(timeT t, } int MatrixSelector::handleMouseMove(timeT time, int height, - QMouseEvent *e) + TQMouseEvent *e) { - QPoint p = m_mParentView->inverseMapPoint(e->pos()); + TQPoint p = m_mParentView->inverseMapPoint(e->pos()); if (m_dispatchTool) { return m_dispatchTool->handleMouseMove(time, height, e); @@ -399,7 +399,7 @@ int MatrixSelector::handleMouseMove(timeT time, int height, return RosegardenCanvasView::FollowHorizontal | RosegardenCanvasView::FollowVertical; } -void MatrixSelector::handleMouseRelease(timeT time, int height, QMouseEvent *e) +void MatrixSelector::handleMouseRelease(timeT time, int height, TQMouseEvent *e) { MATRIX_DEBUG << "MatrixSelector::handleMouseRelease" << endl; @@ -439,16 +439,16 @@ void MatrixSelector::handleMouseRelease(timeT time, int height, QMouseEvent *e) void MatrixSelector::ready() { if (m_mParentView) { - m_selectionRect = new QCanvasRectangle(m_mParentView->canvas()); + m_selectionRect = new TQCanvasRectangle(m_mParentView->canvas()); m_selectionRect->hide(); - m_selectionRect->setPen(QPen(GUIPalette::getColour(GUIPalette::SelectionRectangle), 2)); + m_selectionRect->setPen(TQPen(GUIPalette::getColour(GUIPalette::SelectionRectangle), 2)); m_mParentView->setCanvasCursor(Qt::arrowCursor); //m_mParentView->setPositionTracking(false); } - 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))); setContextHelp(i18n("Click and drag to select; middle-click and drag to draw new note")); } @@ -461,8 +461,8 @@ void MatrixSelector::stow() m_mParentView->canvas()->update(); } - 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))); } @@ -527,13 +527,13 @@ EventSelection* MatrixSelector::getSelection() // get the selections // - QCanvasItemList l = m_selectionRect->collisions(true); + TQCanvasItemList l = m_selectionRect->collisions(true); if (l.count()) { - for (QCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) + for (TQCanvasItemList::Iterator it=l.begin(); it!=l.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *matrixRect = 0; if ((matrixRect = dynamic_cast<QCanvasMatrixRectangle*>(item))) @@ -552,7 +552,7 @@ EventSelection* MatrixSelector::getSelection() } } -void MatrixSelector::setContextHelpFor(QPoint p, bool ctrlPressed) +void MatrixSelector::setContextHelpFor(TQPoint p, bool ctrlPressed) { kapp->config()->setGroup(GeneralOptionsConfigGroup); if (!kapp->config()->readBoolEntry("toolcontexthelp", true)) return; @@ -561,14 +561,14 @@ void MatrixSelector::setContextHelpFor(QPoint p, bool ctrlPressed) // same logic as in MatrixCanvasView::contentsMousePressEvent - QCanvasItemList itemList = m_mParentView->canvas()->collisions(p); - QCanvasItemList::Iterator it; + TQCanvasItemList itemList = m_mParentView->canvas()->collisions(p); + TQCanvasItemList::Iterator it; MatrixElement* mel = 0; - QCanvasItem* activeItem = 0; + TQCanvasItem* activeItem = 0; for (it = itemList.begin(); it != itemList.end(); ++it) { - QCanvasItem *item = *it; + TQCanvasItem *item = *it; QCanvasMatrixRectangle *mRect = 0; if (item->active()) { @@ -623,7 +623,7 @@ void MatrixSelector::setContextHelpFor(QPoint p, bool ctrlPressed) } } -const QString MatrixSelector::ToolName = "selector"; +const TQString MatrixSelector::ToolName = "selector"; } #include "MatrixSelector.moc" diff --git a/src/gui/editors/matrix/MatrixSelector.h b/src/gui/editors/matrix/MatrixSelector.h index a1d1ca4..caa9e4f 100644 --- a/src/gui/editors/matrix/MatrixSelector.h +++ b/src/gui/editors/matrix/MatrixSelector.h @@ -27,12 +27,12 @@ #define _RG_MATRIXSELECTOR_H_ #include "MatrixTool.h" -#include <qstring.h> +#include <tqstring.h> #include "base/Event.h" -class QMouseEvent; -class QCanvasRectangle; +class TQMouseEvent; +class TQCanvasRectangle; namespace Rosegarden @@ -58,22 +58,22 @@ public: virtual void handleLeftButtonPress(timeT time, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement *element); virtual void handleMidButtonPress(timeT time, int height, int staffNo, - QMouseEvent *event, + TQMouseEvent *event, ViewElement *element); virtual int handleMouseMove(timeT time, int height, - QMouseEvent *event); + TQMouseEvent *event); virtual void handleMouseRelease(timeT, int height, - QMouseEvent *event); + TQMouseEvent *event); /** * Double-click: edit an event or make a whole-bar selection @@ -81,7 +81,7 @@ public: virtual void handleMouseDoubleClick(timeT time, int height, int staffNo, - QMouseEvent* event, + TQMouseEvent* event, ViewElement *element); /** @@ -90,7 +90,7 @@ public: virtual void handleMouseTripleClick(timeT time, int height, int staffNo, - QMouseEvent* event, + TQMouseEvent* event, ViewElement *element); @@ -122,7 +122,7 @@ public: */ virtual void handleEventRemoved(Event *event); - static const QString ToolName; + static const TQString ToolName; public slots: /** @@ -146,13 +146,13 @@ signals: protected: MatrixSelector(MatrixView*); - void setContextHelpFor(QPoint p, bool ctrlPressed = false); + void setContextHelpFor(TQPoint p, bool ctrlPressed = false); void setViewCurrentSelection(); //--------------- Data members --------------------------------- - QCanvasRectangle* m_selectionRect; + TQCanvasRectangle* m_selectionRect; bool m_updateRect; int m_clickedStaff; diff --git a/src/gui/editors/matrix/MatrixStaff.cpp b/src/gui/editors/matrix/MatrixStaff.cpp index b6be79f..55491d0 100644 --- a/src/gui/editors/matrix/MatrixStaff.cpp +++ b/src/gui/editors/matrix/MatrixStaff.cpp @@ -46,13 +46,13 @@ #include "MatrixElement.h" #include "MatrixView.h" #include "MatrixVLayout.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { -MatrixStaff::MatrixStaff(QCanvas *canvas, +MatrixStaff::MatrixStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, @@ -144,7 +144,7 @@ void MatrixStaff::positionElement(ViewElement* vel) // Memorize initial rectangle position. May be some overlap rectangles // belonging to other notes are here and should be refreshed after // current element is moved. - QRect initialRect; + TQRect initialRect; bool rectWasVisible; if (! m_view->isDrumMode()) rectWasVisible = el->getVisibleRectangle(initialRect); diff --git a/src/gui/editors/matrix/MatrixStaff.h b/src/gui/editors/matrix/MatrixStaff.h index cd0a9dc..24b9e57 100644 --- a/src/gui/editors/matrix/MatrixStaff.h +++ b/src/gui/editors/matrix/MatrixStaff.h @@ -31,7 +31,7 @@ #include "base/Event.h" -class QCanvas; +class TQCanvas; namespace Rosegarden @@ -49,7 +49,7 @@ class Event; class MatrixStaff : public LinedStaff { public: - MatrixStaff(QCanvas *canvas, + MatrixStaff(TQCanvas *canvas, Segment *segment, SnapGrid *snapGrid, int id, diff --git a/src/gui/editors/matrix/MatrixTool.cpp b/src/gui/editors/matrix/MatrixTool.cpp index b036559..a478aa3 100644 --- a/src/gui/editors/matrix/MatrixTool.cpp +++ b/src/gui/editors/matrix/MatrixTool.cpp @@ -28,13 +28,13 @@ #include "gui/general/EditTool.h" #include "MatrixView.h" #include <kaction.h> -#include <qstring.h> +#include <tqstring.h> namespace Rosegarden { -MatrixTool::MatrixTool(const QString& menuName, MatrixView* parent) +MatrixTool::MatrixTool(const TQString& menuName, MatrixView* parent) : EditTool(menuName, parent), m_mParentView(parent) {} diff --git a/src/gui/editors/matrix/MatrixTool.h b/src/gui/editors/matrix/MatrixTool.h index 5127f57..9972176 100644 --- a/src/gui/editors/matrix/MatrixTool.h +++ b/src/gui/editors/matrix/MatrixTool.h @@ -29,7 +29,7 @@ #include "gui/general/EditTool.h" -class QString; +class TQString; namespace Rosegarden @@ -61,7 +61,7 @@ protected slots: const SnapGrid &getSnapGrid() const; protected: - MatrixTool(const QString& menuName, MatrixView*); + MatrixTool(const TQString& menuName, MatrixView*); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/matrix/MatrixToolBox.cpp b/src/gui/editors/matrix/MatrixToolBox.cpp index 466cfea..dab9632 100644 --- a/src/gui/editors/matrix/MatrixToolBox.cpp +++ b/src/gui/editors/matrix/MatrixToolBox.cpp @@ -34,7 +34,7 @@ #include "MatrixMover.h" #include "MatrixResizer.h" -#include <qstring.h> +#include <tqstring.h> #include <kmessagebox.h> namespace Rosegarden @@ -45,11 +45,11 @@ MatrixToolBox::MatrixToolBox(MatrixView* parent) m_mParentView(parent) {} -EditTool* MatrixToolBox::createTool(const QString& toolName) +EditTool* MatrixToolBox::createTool(const TQString& toolName) { MatrixTool* tool = 0; - QString toolNamelc = toolName.lower(); + TQString toolNamelc = toolName.lower(); if (toolNamelc == MatrixPainter::ToolName) @@ -72,7 +72,7 @@ EditTool* MatrixToolBox::createTool(const QString& toolName) tool = new MatrixResizer(m_mParentView); else { - KMessageBox::error(0, QString("MatrixToolBox::createTool : unrecognised toolname %1 (%2)") + KMessageBox::error(0, TQString("MatrixToolBox::createTool : unrecognised toolname %1 (%2)") .arg(toolName).arg(toolNamelc)); return 0; } diff --git a/src/gui/editors/matrix/MatrixToolBox.h b/src/gui/editors/matrix/MatrixToolBox.h index 3bf0818..4f28c57 100644 --- a/src/gui/editors/matrix/MatrixToolBox.h +++ b/src/gui/editors/matrix/MatrixToolBox.h @@ -28,7 +28,7 @@ #include "gui/general/EditToolBox.h" -class QString; +class TQString; namespace Rosegarden @@ -47,7 +47,7 @@ public: protected: - virtual EditTool* createTool(const QString& toolName); + virtual EditTool* createTool(const TQString& toolName); //--------------- Data members --------------------------------- diff --git a/src/gui/editors/matrix/MatrixView.cpp b/src/gui/editors/matrix/MatrixView.cpp index 38abe20..66c1b0d 100644 --- a/src/gui/editors/matrix/MatrixView.cpp +++ b/src/gui/editors/matrix/MatrixView.cpp @@ -113,20 +113,20 @@ #include <kstatusbar.h> #include <ktoolbar.h> #include <kxmlguiclient.h> -#include <qcanvas.h> -#include <qcursor.h> -#include <qdialog.h> -#include <qlayout.h> -#include <qiconset.h> -#include <qlabel.h> -#include <qpixmap.h> -#include <qpoint.h> -#include <qscrollview.h> -#include <qsize.h> -#include <qslider.h> -#include <qstring.h> -#include <qwidget.h> -#include <qwmatrix.h> +#include <tqcanvas.h> +#include <tqcursor.h> +#include <tqdialog.h> +#include <tqlayout.h> +#include <tqiconset.h> +#include <tqlabel.h> +#include <tqpixmap.h> +#include <tqpoint.h> +#include <tqscrollview.h> +#include <tqsize.h> +#include <tqslider.h> +#include <tqstring.h> +#include <tqwidget.h> +#include <tqwmatrix.h> namespace Rosegarden @@ -137,7 +137,7 @@ static double xorigin = 0.0; MatrixView::MatrixView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, + TQWidget *parent, bool drumMode) : EditView(doc, segments, 3, parent, "matrixview"), m_hlayout(&doc->getComposition()), @@ -166,8 +166,8 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, { RG_DEBUG << "MatrixView ctor: drumMode " << drumMode << "\n"; - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/toolbar"); - QPixmap matrixPixmap(pixmapDir + "/matrix.xpm"); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/toolbar"); + TQPixmap matrixPixmap(pixmapDir + "/matrix.xpm"); m_dockLeft = createDockWidget("params dock", matrixPixmap, 0L, i18n("Instrument Parameters")); @@ -175,14 +175,14 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, KDockWidget::DockLeft, // dock site 20); // relation target/this (in percent) - connect(m_dockLeft, SIGNAL(iMBeingClosed()), - this, SLOT(slotParametersClosed())); - connect(m_dockLeft, SIGNAL(hasUndocked()), - this, SLOT(slotParametersClosed())); + connect(m_dockLeft, TQT_SIGNAL(iMBeingClosed()), + this, TQT_SLOT(slotParametersClosed())); + connect(m_dockLeft, TQT_SIGNAL(hasUndocked()), + this, TQT_SLOT(slotParametersClosed())); // Apparently, hasUndocked() is emitted when the dock widget's // 'close' button on the dock handle is clicked. - connect(m_mainDockWidget, SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), - this, SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); + connect(m_mainDockWidget, TQT_SIGNAL(docking(KDockWidget*, KDockWidget::DockPosition)), + this, TQT_SLOT(slotParametersDockedBack(KDockWidget*, KDockWidget::DockPosition))); Composition &comp = doc->getComposition(); @@ -190,20 +190,20 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, initStatusBar(); - connect(m_toolBox, SIGNAL(showContextHelp(const QString &)), - this, SLOT(slotToolHelpChanged(const QString &))); + connect(m_toolBox, TQT_SIGNAL(showContextHelp(const TQString &)), + this, TQT_SLOT(slotToolHelpChanged(const TQString &))); - QCanvas *tCanvas = new QCanvas(this); + TQCanvas *tCanvas = new TQCanvas(this); m_config->setGroup(MatrixViewConfigGroup); if (m_config->readBoolEntry("backgroundtextures-1.6-plus", true)) { - QPixmap background; - QString pixmapDir = + TQPixmap background; + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); // We now use a lined background for the non-percussion matrix, // suggested and supplied by Alessandro Preziosi - QString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm"; - if (background.load(QString("%1/misc/%2"). + TQString backgroundPixmap = isDrumMode() ? "bg-paper-white.xpm" : "bg-matrix-lines.xpm"; + if (background.load(TQString("%1/misc/%2"). arg(pixmapDir, backgroundPixmap))) { tCanvas->setBackgroundPixmap(background); } @@ -255,7 +255,7 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, m_pianoView = new QDeferScrollView(getCentralWidget()); - QWidget* vport = m_pianoView->viewport(); + TQWidget* vport = m_pianoView->viewport(); if (isDrumMode() && mapping && !m_localMapping->getMap().empty()) { @@ -266,8 +266,8 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, m_pitchRuler = new PianoKeyboard(vport); } - m_pianoView->setVScrollBarMode(QScrollView::AlwaysOff); - m_pianoView->setHScrollBarMode(QScrollView::AlwaysOff); + m_pianoView->setVScrollBarMode(TQScrollView::AlwaysOff); + m_pianoView->setHScrollBarMode(TQScrollView::AlwaysOff); m_pianoView->addChild(m_pitchRuler); m_pianoView->setFixedWidth(m_pianoView->contentsWidth()); @@ -278,33 +278,33 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, RosegardenGUIApp *app = RosegardenGUIApp::self(); connect(app, - SIGNAL(pluginSelected(InstrumentId, int, int)), + TQT_SIGNAL(pluginSelected(InstrumentId, int, int)), m_parameterBox, - SLOT(slotPluginSelected(InstrumentId, int, int))); + TQT_SLOT(slotPluginSelected(InstrumentId, int, int))); connect(app, - SIGNAL(pluginBypassed(InstrumentId, int, bool)), + TQT_SIGNAL(pluginBypassed(InstrumentId, int, bool)), m_parameterBox, - SLOT(slotPluginBypassed(InstrumentId, int, bool))); + TQT_SLOT(slotPluginBypassed(InstrumentId, int, bool))); connect(app, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), m_parameterBox, - SLOT(slotInstrumentParametersChanged(InstrumentId))); + TQT_SLOT(slotInstrumentParametersChanged(InstrumentId))); connect(m_parameterBox, - SIGNAL(instrumentParametersChanged(InstrumentId)), + TQT_SIGNAL(instrumentParametersChanged(InstrumentId)), app, - SIGNAL(instrumentParametersChanged(InstrumentId))); + TQT_SIGNAL(instrumentParametersChanged(InstrumentId))); connect(m_parameterBox, - SIGNAL(selectPlugin(QWidget *, InstrumentId, int)), + TQT_SIGNAL(selectPlugin(TQWidget *, InstrumentId, int)), app, - SLOT(slotShowPluginDialog(QWidget *, InstrumentId, int))); + TQT_SLOT(slotShowPluginDialog(TQWidget *, InstrumentId, int))); connect(m_parameterBox, - SIGNAL(showPluginGUI(InstrumentId, int)), + TQT_SIGNAL(showPluginGUI(InstrumentId, int)), app, - SLOT(slotShowPluginGUI(InstrumentId, int))); + TQT_SLOT(slotShowPluginGUI(InstrumentId, int))); connect(parent, // RosegardenGUIView - SIGNAL(checkTrackAssignments()), + TQT_SIGNAL(checkTrackAssignments()), this, - SLOT(slotCheckTrackAssignments())); + TQT_SLOT(slotCheckTrackAssignments())); // Assign the instrument // @@ -312,9 +312,9 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, if (m_drumMode) { connect(m_parameterBox, - SIGNAL(instrumentPercussionSetChanged(Instrument *)), + TQT_SIGNAL(instrumentPercussionSetChanged(Instrument *)), this, - SLOT(slotPercussionSetChanged(Instrument *))); + TQT_SLOT(slotPercussionSetChanged(Instrument *))); } // Set the snap grid from the stored size in the segment @@ -352,83 +352,83 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, // Connect vertical scrollbars between matrix and piano // - connect(m_canvasView->verticalScrollBar(), SIGNAL(valueChanged(int)), - this, SLOT(slotVerticalScrollPianoKeyboard(int))); + connect(m_canvasView->verticalScrollBar(), TQT_SIGNAL(valueChanged(int)), + this, TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); - connect(m_canvasView->verticalScrollBar(), SIGNAL(sliderMoved(int)), - this, SLOT(slotVerticalScrollPianoKeyboard(int))); + connect(m_canvasView->verticalScrollBar(), TQT_SIGNAL(sliderMoved(int)), + this, TQT_SLOT(slotVerticalScrollPianoKeyboard(int))); - connect(m_canvasView, SIGNAL(zoomIn()), this, SLOT(slotZoomIn())); - connect(m_canvasView, SIGNAL(zoomOut()), this, SLOT(slotZoomOut())); + connect(m_canvasView, TQT_SIGNAL(zoomIn()), this, TQT_SLOT(slotZoomIn())); + connect(m_canvasView, TQT_SIGNAL(zoomOut()), this, TQT_SLOT(slotZoomOut())); - connect(m_pianoView, SIGNAL(gotWheelEvent(QWheelEvent*)), - m_canvasView, SLOT(slotExternalWheelEvent(QWheelEvent*))); + connect(m_pianoView, TQT_SIGNAL(gotWheelEvent(TQWheelEvent*)), + m_canvasView, TQT_SLOT(slotExternalWheelEvent(TQWheelEvent*))); // ensure the piano keyb keeps the right margins when the user toggles // the canvas view rulers // - connect(m_canvasView, SIGNAL(bottomWidgetHeightChanged(int)), - this, SLOT(slotCanvasBottomWidgetHeightChanged(int))); + connect(m_canvasView, TQT_SIGNAL(bottomWidgetHeightChanged(int)), + this, TQT_SLOT(slotCanvasBottomWidgetHeightChanged(int))); - connect(m_canvasView, SIGNAL(mouseEntered()), - this, SLOT(slotMouseEnteredCanvasView())); + connect(m_canvasView, TQT_SIGNAL(mouseEntered()), + this, TQT_SLOT(slotMouseEnteredCanvasView())); - connect(m_canvasView, SIGNAL(mouseLeft()), - this, SLOT(slotMouseLeftCanvasView())); + connect(m_canvasView, TQT_SIGNAL(mouseLeft()), + this, TQT_SLOT(slotMouseLeftCanvasView())); /* - QObject::connect - (getCanvasView(), SIGNAL(activeItemPressed(QMouseEvent*, QCanvasItem*)), - this, SLOT (activeItemPressed(QMouseEvent*, QCanvasItem*))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(activeItemPressed(TQMouseEvent*, TQCanvasItem*)), + this, TQT_SLOT (activeItemPressed(TQMouseEvent*, TQCanvasItem*))); */ - QObject::connect + TQObject::connect (getCanvasView(), - SIGNAL(mousePressed(timeT, - int, QMouseEvent*, MatrixElement*)), + TQT_SIGNAL(mousePressed(timeT, + int, TQMouseEvent*, MatrixElement*)), this, - SLOT(slotMousePressed(timeT, - int, QMouseEvent*, MatrixElement*))); + TQT_SLOT(slotMousePressed(timeT, + int, TQMouseEvent*, MatrixElement*))); - QObject::connect + TQObject::connect (getCanvasView(), - SIGNAL(mouseMoved(timeT, int, QMouseEvent*)), + TQT_SIGNAL(mouseMoved(timeT, int, TQMouseEvent*)), this, - SLOT(slotMouseMoved(timeT, int, QMouseEvent*))); + TQT_SLOT(slotMouseMoved(timeT, int, TQMouseEvent*))); - QObject::connect + TQObject::connect (getCanvasView(), - SIGNAL(mouseReleased(timeT, int, QMouseEvent*)), + TQT_SIGNAL(mouseReleased(timeT, int, TQMouseEvent*)), this, - SLOT(slotMouseReleased(timeT, int, QMouseEvent*))); + TQT_SLOT(slotMouseReleased(timeT, int, TQMouseEvent*))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), - this, SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverNoteChanged(int, bool, timeT)), + this, TQT_SLOT(slotHoveredOverNoteChanged(int, bool, timeT))); - QObject::connect - (m_pitchRuler, SIGNAL(hoveredOverKeyChanged(unsigned int)), - this, SLOT (slotHoveredOverKeyChanged(unsigned int))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(hoveredOverKeyChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); - QObject::connect - (m_pitchRuler, SIGNAL(keyPressed(unsigned int, bool)), - this, SLOT (slotKeyPressed(unsigned int, bool))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(keyPressed(unsigned int, bool)), + this, TQT_SLOT (slotKeyPressed(unsigned int, bool))); - QObject::connect - (m_pitchRuler, SIGNAL(keySelected(unsigned int, bool)), - this, SLOT (slotKeySelected(unsigned int, bool))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(keySelected(unsigned int, bool)), + this, TQT_SLOT (slotKeySelected(unsigned int, bool))); - QObject::connect - (m_pitchRuler, SIGNAL(keyReleased(unsigned int, bool)), - this, SLOT (slotKeyReleased(unsigned int, bool))); + TQObject::connect + (m_pitchRuler, TQT_SIGNAL(keyReleased(unsigned int, bool)), + this, TQT_SLOT (slotKeyReleased(unsigned int, bool))); - QObject::connect - (getCanvasView(), SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), - this, SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); + TQObject::connect + (getCanvasView(), TQT_SIGNAL(hoveredOverAbsoluteTimeChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverAbsoluteTimeChanged(unsigned int))); - QObject::connect - (doc, SIGNAL(pointerPositionChanged(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + TQObject::connect + (doc, TQT_SIGNAL(pointerPositionChanged(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); MATRIX_DEBUG << "MatrixView : applying layout\n"; @@ -463,34 +463,34 @@ MatrixView::MatrixView(RosegardenGUIDoc *doc, // Disconnect the default connections for this signal from the // top ruler, and connect our own instead - QObject::disconnect + TQObject::disconnect (topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), 0, 0); + TQT_SIGNAL(setPointerPosition(timeT)), 0, 0); - QObject::connect + TQObject::connect (topStandardRuler->getLoopRuler(), - SIGNAL(setPointerPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(setPointerPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); - QObject::connect + TQObject::connect (topStandardRuler, - SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetInsertCursorPosition(timeT))); + TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetInsertCursorPosition(timeT))); topStandardRuler->getLoopRuler()->setBackgroundColor (GUIPalette::getColour(GUIPalette::InsertCursorRuler)); - connect(topStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(topStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); + connect(topStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(topStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); - connect(bottomStandardRuler->getLoopRuler(), SIGNAL(startMouseMove(int)), - m_canvasView, SLOT(startAutoScroll(int))); - connect(bottomStandardRuler->getLoopRuler(), SIGNAL(stopMouseMove()), - m_canvasView, SLOT(stopAutoScroll())); - connect(m_bottomStandardRuler, SIGNAL(dragPointerToPosition(timeT)), - this, SLOT(slotSetPointerPosition(timeT))); + connect(bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(startMouseMove(int)), + m_canvasView, TQT_SLOT(startAutoScroll(int))); + connect(bottomStandardRuler->getLoopRuler(), TQT_SIGNAL(stopMouseMove()), + m_canvasView, TQT_SLOT(stopAutoScroll())); + connect(m_bottomStandardRuler, TQT_SIGNAL(dragPointerToPosition(timeT)), + this, TQT_SLOT(slotSetPointerPosition(timeT))); // Force height for the moment // @@ -568,9 +568,9 @@ MatrixView::~MatrixView() // This looks silly but the reason is that on destruction of the // MatrixCanvasView, setCanvas() is called (this is in - // ~QCanvasView so we can't do anything about it). This calls - // QCanvasView::updateContentsSize(), which in turn updates the - // view's scrollbars, hence calling QScrollBar::setValue(), and + // ~TQCanvasView so we can't do anything about it). This calls + // TQCanvasView::updateContentsSize(), which in turn updates the + // view's scrollbars, hence calling TQScrollBar::setValue(), and // sending the QSCrollbar::valueChanged() signal. But we have a // slot connected to that signal // (MatrixView::slotVerticalScrollPianoKeyboard), which scrolls @@ -635,224 +635,224 @@ void MatrixView::setupActions() // KRadioAction* toolAction = 0; - QString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - QIconSet icon(QPixmap(pixmapDir + "/toolbar/select.xpm")); + TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); + TQIconSet icon(TQPixmap(pixmapDir + "/toolbar/select.xpm")); toolAction = new KRadioAction(i18n("&Select and Edit"), icon, Key_F2, - this, SLOT(slotSelectSelected()), + this, TQT_SLOT(slotSelectSelected()), actionCollection(), "select"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Draw"), "pencil", Key_F3, - this, SLOT(slotPaintSelected()), + this, TQT_SLOT(slotPaintSelected()), actionCollection(), "draw"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Erase"), "eraser", Key_F4, - this, SLOT(slotEraseSelected()), + this, TQT_SLOT(slotEraseSelected()), actionCollection(), "erase"); toolAction->setExclusiveGroup("tools"); toolAction = new KRadioAction(i18n("&Move"), "move", Key_F5, - this, SLOT(slotMoveSelected()), + this, TQT_SLOT(slotMoveSelected()), actionCollection(), "move"); toolAction->setExclusiveGroup("tools"); - QCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); - icon = QIconSet(pixmap); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/resize.xpm"); + icon = TQIconSet(pixmap); toolAction = new KRadioAction(i18n("Resi&ze"), icon, Key_F6, - this, SLOT(slotResizeSelected()), + this, TQT_SLOT(slotResizeSelected()), actionCollection(), "resize"); toolAction->setExclusiveGroup("tools"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("chord"))); (new KToggleAction(i18n("C&hord Insert Mode"), icon, Key_H, - this, SLOT(slotUpdateInsertModeStatus()), + this, TQT_SLOT(slotUpdateInsertModeStatus()), actionCollection(), "chord_mode"))-> setChecked(false); pixmap.load(pixmapDir + "/toolbar/step_by_step.xpm"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KToggleAction(i18n("Ste&p Recording"), icon, 0, this, - SLOT(slotToggleStepByStep()), actionCollection(), + TQT_SLOT(slotToggleStepByStep()), actionCollection(), "toggle_step_by_step"); pixmap.load(pixmapDir + "/toolbar/quantize.png"); - icon = QIconSet(pixmap); + icon = TQIconSet(pixmap); new KAction(EventQuantizeCommand::getGlobalName(), icon, Key_Equal, this, - SLOT(slotTransformsQuantize()), actionCollection(), + TQT_SLOT(slotTransformsQuantize()), actionCollection(), "quantize"); new KAction(i18n("Repeat Last Quantize"), Key_Plus, this, - SLOT(slotTransformsRepeatQuantize()), actionCollection(), + TQT_SLOT(slotTransformsRepeatQuantize()), actionCollection(), "repeat_quantize"); new KAction(CollapseNotesCommand::getGlobalName(), Key_Equal + CTRL, this, - SLOT(slotTransformsCollapseNotes()), actionCollection(), + TQT_SLOT(slotTransformsCollapseNotes()), actionCollection(), "collapse_notes"); new KAction(i18n("&Legato"), Key_Minus, this, - SLOT(slotTransformsLegato()), actionCollection(), + TQT_SLOT(slotTransformsLegato()), actionCollection(), "legatoize"); new KAction(ChangeVelocityCommand::getGlobalName(10), 0, Key_Up + SHIFT, this, - SLOT(slotVelocityUp()), actionCollection(), + TQT_SLOT(slotVelocityUp()), actionCollection(), "velocity_up"); new KAction(ChangeVelocityCommand::getGlobalName( -10), 0, Key_Down + SHIFT, this, - SLOT(slotVelocityDown()), actionCollection(), + TQT_SLOT(slotVelocityDown()), actionCollection(), "velocity_down"); new KAction(i18n("Set to Current Velocity"), 0, this, - SLOT(slotSetVelocitiesToCurrent()), actionCollection(), + TQT_SLOT(slotSetVelocitiesToCurrent()), actionCollection(), "set_to_current_velocity"); new KAction(i18n("Set Event &Velocities..."), 0, this, - SLOT(slotSetVelocities()), actionCollection(), + TQT_SLOT(slotSetVelocities()), actionCollection(), "set_velocities"); new KAction(i18n("Trigger Se&gment..."), 0, this, - SLOT(slotTriggerSegment()), actionCollection(), + TQT_SLOT(slotTriggerSegment()), actionCollection(), "trigger_segment"); new KAction(i18n("Remove Triggers..."), 0, this, - SLOT(slotRemoveTriggers()), actionCollection(), + TQT_SLOT(slotRemoveTriggers()), actionCollection(), "remove_trigger"); new KAction(i18n("Select &All"), Key_A + CTRL, this, - SLOT(slotSelectAll()), actionCollection(), + TQT_SLOT(slotSelectAll()), actionCollection(), "select_all"); new KAction(i18n("&Delete"), Key_Delete, this, - SLOT(slotEditDelete()), actionCollection(), + TQT_SLOT(slotEditDelete()), actionCollection(), "delete"); new KAction(i18n("Cursor &Back"), 0, Key_Left, this, - SLOT(slotStepBackward()), actionCollection(), + TQT_SLOT(slotStepBackward()), actionCollection(), "cursor_back"); new KAction(i18n("Cursor &Forward"), 0, Key_Right, this, - SLOT(slotStepForward()), actionCollection(), + TQT_SLOT(slotStepForward()), actionCollection(), "cursor_forward"); new KAction(i18n("Cursor Ba&ck Bar"), 0, Key_Left + CTRL, this, - SLOT(slotJumpBackward()), actionCollection(), + TQT_SLOT(slotJumpBackward()), actionCollection(), "cursor_back_bar"); new KAction(i18n("Cursor For&ward Bar"), 0, Key_Right + CTRL, this, - SLOT(slotJumpForward()), actionCollection(), + TQT_SLOT(slotJumpForward()), actionCollection(), "cursor_forward_bar"); new KAction(i18n("Cursor Back and Se&lect"), SHIFT + Key_Left, this, - SLOT(slotExtendSelectionBackward()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackward()), actionCollection(), "extend_selection_backward"); new KAction(i18n("Cursor Forward and &Select"), SHIFT + Key_Right, this, - SLOT(slotExtendSelectionForward()), actionCollection(), + TQT_SLOT(slotExtendSelectionForward()), actionCollection(), "extend_selection_forward"); new KAction(i18n("Cursor Back Bar and Select"), SHIFT + CTRL + Key_Left, this, - SLOT(slotExtendSelectionBackwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionBackwardBar()), actionCollection(), "extend_selection_backward_bar"); new KAction(i18n("Cursor Forward Bar and Select"), SHIFT + CTRL + Key_Right, this, - SLOT(slotExtendSelectionForwardBar()), actionCollection(), + TQT_SLOT(slotExtendSelectionForwardBar()), actionCollection(), "extend_selection_forward_bar"); new KAction(i18n("Cursor to St&art"), 0, /* #1025717: conflicting meanings for ctrl+a - dupe with Select All Key_A + CTRL, */ this, - SLOT(slotJumpToStart()), actionCollection(), + TQT_SLOT(slotJumpToStart()), actionCollection(), "cursor_start"); new KAction(i18n("Cursor to &End"), 0, Key_E + CTRL, this, - SLOT(slotJumpToEnd()), actionCollection(), + TQT_SLOT(slotJumpToEnd()), actionCollection(), "cursor_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-cursor-to-pointer"))); new KAction(i18n("Cursor to &Playback Pointer"), icon, 0, this, - SLOT(slotJumpCursorToPlayback()), actionCollection(), + TQT_SLOT(slotJumpCursorToPlayback()), actionCollection(), "cursor_to_playback_pointer"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-play"))); KAction *play = new KAction(i18n("&Play"), icon, Key_Enter, this, - SIGNAL(play()), actionCollection(), "play"); + TQT_SIGNAL(play()), actionCollection(), "play"); // Alternative shortcut for Play KShortcut playShortcut = play->shortcut(); playShortcut.append( KKey(Key_Return + CTRL) ); play->setShortcut(playShortcut); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-stop"))); new KAction(i18n("&Stop"), icon, Key_Insert, this, - SIGNAL(stop()), actionCollection(), "stop"); + TQT_SIGNAL(stop()), actionCollection(), "stop"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind"))); new KAction(i18n("Re&wind"), icon, Key_End, this, - SIGNAL(rewindPlayback()), actionCollection(), + TQT_SIGNAL(rewindPlayback()), actionCollection(), "playback_pointer_back_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd"))); new KAction(i18n("&Fast Forward"), icon, Key_PageDown, this, - SIGNAL(fastForwardPlayback()), actionCollection(), + TQT_SIGNAL(fastForwardPlayback()), actionCollection(), "playback_pointer_forward_bar"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-rewind-end"))); new KAction(i18n("Rewind to &Beginning"), icon, 0, this, - SIGNAL(rewindPlaybackToBeginning()), actionCollection(), + TQT_SIGNAL(rewindPlaybackToBeginning()), actionCollection(), "playback_pointer_start"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-ffwd-end"))); new KAction(i18n("Fast Forward to &End"), icon, 0, this, - SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), + TQT_SIGNAL(fastForwardPlaybackToEnd()), actionCollection(), "playback_pointer_end"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-pointer-to-cursor"))); new KAction(i18n("Playback Pointer to &Cursor"), icon, 0, this, - SLOT(slotJumpPlaybackToCursor()), actionCollection(), + TQT_SLOT(slotJumpPlaybackToCursor()), actionCollection(), "playback_pointer_to_cursor"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-solo"))); new KToggleAction(i18n("&Solo"), icon, 0, this, - SLOT(slotToggleSolo()), actionCollection(), + TQT_SLOT(slotToggleSolo()), actionCollection(), "toggle_solo"); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-tracking"))); (new KToggleAction(i18n("Scro&ll to Follow Playback"), icon, Key_Pause, this, - SLOT(slotToggleTracking()), actionCollection(), + TQT_SLOT(slotToggleTracking()), actionCollection(), "toggle_tracking"))->setChecked(m_playTracking); - icon = QIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap + icon = TQIconSet(NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap ("transport-panic"))); new KAction(i18n("Panic"), icon, Key_P + CTRL + ALT, this, - SIGNAL(panic()), actionCollection(), "panic"); + TQT_SIGNAL(panic()), actionCollection(), "panic"); new KAction(i18n("Set Loop to Selection"), Key_Semicolon + CTRL, this, - SLOT(slotPreviewSelection()), actionCollection(), + TQT_SLOT(slotPreviewSelection()), actionCollection(), "preview_selection"); new KAction(i18n("Clear L&oop"), Key_Colon + CTRL, this, - SLOT(slotClearLoop()), actionCollection(), + TQT_SLOT(slotClearLoop()), actionCollection(), "clear_loop"); new KAction(i18n("Clear Selection"), Key_Escape, this, - SLOT(slotClearSelection()), actionCollection(), + TQT_SLOT(slotClearSelection()), actionCollection(), "clear_selection"); - // icon = QIconSet(QCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); + // icon = TQIconSet(TQCanvasPixmap(pixmapDir + "/toolbar/eventfilter.xpm")); new KAction(i18n("&Filter Selection"), "filter", Key_F + CTRL, this, - SLOT(slotFilterSelection()), actionCollection(), + TQT_SLOT(slotFilterSelection()), actionCollection(), "filter_selection"); timeT crotchetDuration = Note(Note::Crotchet).getDuration(); @@ -877,22 +877,22 @@ void MatrixView::setupActions() if (d == SnapGrid::NoSnap) { new KAction(i18n("&No Snap"), 0, this, - SLOT(slotSetSnapFromAction()), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_none"); } else if (d == SnapGrid::SnapToUnit) { } else if (d == SnapGrid::SnapToBeat) { new KAction(i18n("Snap to Bea&t"), Key_1, this, - SLOT(slotSetSnapFromAction()), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_beat"); } else if (d == SnapGrid::SnapToBar) { new KAction(i18n("Snap to &Bar"), Key_5, this, - SLOT(slotSetSnapFromAction()), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), "snap_bar"); } else { timeT err = 0; - QString label = NotationStrings::makeNoteMenuLabel(d, true, err); - QPixmap pixmap = NotePixmapFactory::toQPixmap + TQString label = NotationStrings::makeNoteMenuLabel(d, true, err); + TQPixmap pixmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); KShortcut cut = 0; @@ -903,10 +903,10 @@ void MatrixView::setupActions() else if (d == crotchetDuration) cut = Key_4; else if (d == crotchetDuration * 2) cut = Key_2; - QString actionName = QString("snap_%1").arg(int((crotchetDuration * 4) / d)); + TQString actionName = TQString("snap_%1").arg(int((crotchetDuration * 4) / d)); if (d == (crotchetDuration * 3) / 2) actionName = "snap_3"; new KAction(i18n("Snap to %1").arg(label), pixmap, cut, this, - SLOT(slotSetSnapFromAction()), actionCollection(), + TQT_SLOT(slotSetSnapFromAction()), actionCollection(), actionName); } } @@ -915,16 +915,16 @@ void MatrixView::setupActions() // Settings menu // new KAction(i18n("Show Instrument Parameters"), 0, this, - SLOT(slotDockParametersBack()), + TQT_SLOT(slotDockParametersBack()), actionCollection(), "show_inst_parameters"); new KToggleAction(i18n("Show Ch&ord Name Ruler"), 0, this, - SLOT(slotToggleChordsRuler()), + TQT_SLOT(slotToggleChordsRuler()), actionCollection(), "show_chords_ruler"); new KToggleAction(i18n("Show &Tempo Ruler"), 0, this, - SLOT(slotToggleTempoRuler()), + TQT_SLOT(slotToggleTempoRuler()), actionCollection(), "show_tempo_ruler"); createGUI(getRCFileName(), false); @@ -977,8 +977,8 @@ void MatrixView::initStatusBar() { KStatusBar* sb = statusBar(); - m_hoveredOverAbsoluteTime = new QLabel(sb); - m_hoveredOverNoteName = new QLabel(sb); + m_hoveredOverAbsoluteTime = new TQLabel(sb); + m_hoveredOverNoteName = new TQLabel(sb); m_hoveredOverAbsoluteTime->setMinimumWidth(175); m_hoveredOverNoteName->setMinimumWidth(65); @@ -986,7 +986,7 @@ void MatrixView::initStatusBar() sb->addWidget(m_hoveredOverAbsoluteTime); sb->addWidget(m_hoveredOverNoteName); - m_insertModeLabel = new QLabel(sb); + m_insertModeLabel = new TQLabel(sb); m_insertModeLabel->setMinimumWidth(20); sb->addWidget(m_insertModeLabel); @@ -995,13 +995,13 @@ void MatrixView::initStatusBar() sb->setItemAlignment(KTmpStatusMsg::getDefaultId(), AlignLeft | AlignVCenter); - m_selectionCounter = new QLabel(sb); + m_selectionCounter = new TQLabel(sb); sb->addWidget(m_selectionCounter); } -void MatrixView::slotToolHelpChanged(const QString &s) +void MatrixView::slotToolHelpChanged(const TQString &s) { - QString msg = " " + s; + TQString msg = " " + s; if (m_toolContextHelp == msg) return; m_toolContextHelp = msg; @@ -1081,12 +1081,12 @@ void MatrixView::refreshSegment(Segment *segment, repaintRulers(); } -QSize MatrixView::getViewSize() +TQSize MatrixView::getViewSize() { return canvas()->size(); } -void MatrixView::setViewSize(QSize s) +void MatrixView::setViewSize(TQSize s) { MATRIX_DEBUG << "MatrixView::setViewSize() w = " << s.width() << endl; @@ -1314,11 +1314,11 @@ void MatrixView::slotSelectSelected() { EditTool* selector = m_toolBox->getTool(MatrixSelector::ToolName); - connect(selector, SIGNAL(gotSelection()), - this, SLOT(slotNewSelection())); + connect(selector, TQT_SIGNAL(gotSelection()), + this, TQT_SLOT(slotNewSelection())); - connect(selector, SIGNAL(editTriggerSegment(int)), - this, SIGNAL(editTriggerSegment(int))); + connect(selector, TQT_SIGNAL(editTriggerSegment(int)), + this, TQT_SIGNAL(editTriggerSegment(int))); setTool(selector); } @@ -1344,7 +1344,7 @@ void MatrixView::slotTransformsQuantize() QuantizeDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Quantizing..."), this); addCommandToHistory(new EventQuantizeCommand (*m_currentEventSelection, @@ -1385,7 +1385,7 @@ void MatrixView::slotTransformsLegato() } void MatrixView::slotMousePressed(timeT time, int pitch, - QMouseEvent* e, MatrixElement* el) + TQMouseEvent* e, MatrixElement* el) { MATRIX_DEBUG << "MatrixView::mousePressed at pitch " << pitch << ", time " << time << endl; @@ -1406,7 +1406,7 @@ void MatrixView::slotMousePressed(timeT time, int pitch, //playPreview(pitch); } -void MatrixView::slotMouseMoved(timeT time, int pitch, QMouseEvent* e) +void MatrixView::slotMouseMoved(timeT time, int pitch, TQMouseEvent* e) { // Don't allow moving/insertion before the beginning of the // segment @@ -1434,7 +1434,7 @@ void MatrixView::slotMouseMoved(timeT time, int pitch, QMouseEvent* e) } -void MatrixView::slotMouseReleased(timeT time, int pitch, QMouseEvent* e) +void MatrixView::slotMouseReleased(timeT time, int pitch, TQMouseEvent* e) { // Don't allow moving/insertion before the beginning of the // segment @@ -1473,14 +1473,14 @@ MatrixView::slotHoveredOverNoteChanged(int evPitch, getDocument()->getComposition().getElapsedRealTime(evTime); long ms = rt.msec(); - QString msg = i18n("Note: %1 (%2.%3s)") - .arg(QString("%1-%2-%3-%4") - .arg(QString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(QString("%1").arg(beat).rightJustify(2, '0')) - .arg(QString("%1").arg(fraction).rightJustify(2, '0')) - .arg(QString("%1").arg(remainder).rightJustify(2, '0'))) + TQString msg = i18n("Note: %1 (%2.%3s)") + .arg(TQString("%1-%2-%3-%4") + .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) + .arg(TQString("%1").arg(beat).rightJustify(2, '0')) + .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) + .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) .arg(rt.sec) - .arg(QString("%1").arg(ms).rightJustify(3, '0')); + .arg(TQString("%1").arg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(msg); } @@ -1503,7 +1503,7 @@ MatrixView::slotHoveredOverKeyChanged(unsigned int y) if (evPitch != m_previousEvPitch) { MidiPitchLabel label(evPitch); - m_hoveredOverNoteName->setText(QString("%1 (%2)"). + m_hoveredOverNoteName->setText(TQString("%1 (%2)"). arg(label.getQString()).arg(evPitch)); m_previousEvPitch = evPitch; } @@ -1524,18 +1524,18 @@ MatrixView::slotHoveredOverAbsoluteTimeChanged(unsigned int time) getDocument()->getComposition().getElapsedRealTime(t); long ms = rt.msec(); - // At the advice of doc.trolltech.com/3.0/qstring.html#sprintf - // we replaced this QString format("%ld (%ld.%03lds)"); + // At the advice of doc.trolltech.com/3.0/tqstring.html#sprintf + // we replaced this TQString format("%ld (%ld.%03lds)"); // to support Unicode - QString message = i18n("Time: %1 (%2.%3s)") - .arg(QString("%1-%2-%3-%4") - .arg(QString("%1").arg(bar + 1).rightJustify(3, '0')) - .arg(QString("%1").arg(beat).rightJustify(2, '0')) - .arg(QString("%1").arg(fraction).rightJustify(2, '0')) - .arg(QString("%1").arg(remainder).rightJustify(2, '0'))) + TQString message = i18n("Time: %1 (%2.%3s)") + .arg(TQString("%1-%2-%3-%4") + .arg(TQString("%1").arg(bar + 1).rightJustify(3, '0')) + .arg(TQString("%1").arg(beat).rightJustify(2, '0')) + .arg(TQString("%1").arg(fraction).rightJustify(2, '0')) + .arg(TQString("%1").arg(remainder).rightJustify(2, '0'))) .arg(rt.sec) - .arg(QString("%1").arg(ms).rightJustify(3, '0')); + .arg(TQString("%1").arg(ms).rightJustify(3, '0')); m_hoveredOverAbsoluteTime->setText(message); } @@ -1810,8 +1810,8 @@ void MatrixView::slotVerticalScrollPianoKeyboard(int y) void MatrixView::slotInsertNoteFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); Segment &segment = *getCurrentSegment(); int pitch = 0; @@ -2017,8 +2017,8 @@ MatrixView::slotSetSnapFromIndex(int s) void MatrixView::slotSetSnapFromAction() { - const QObject *s = sender(); - QString name = s->name(); + const TQObject *s = sender(); + TQString name = s->name(); if (name.left(5) == "snap_") { int snap = name.right(name.length() - 5).toInt(); @@ -2117,10 +2117,10 @@ MatrixView::initActionsToolbar() // The SnapGrid combo and Snap To... menu items // - QLabel *sLabel = new QLabel(i18n(" Grid: "), actionsToolbar, "kde toolbar widget"); + TQLabel *sLabel = new TQLabel(i18n(" Grid: "), actionsToolbar, "kde toolbar widget"); sLabel->setIndent(10); - QPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); + TQPixmap noMap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeToolbarPixmap("menu-no-note")); m_snapGridCombo = new KComboBox(actionsToolbar); @@ -2138,8 +2138,8 @@ MatrixView::initActionsToolbar() m_snapGridCombo->insertItem(i18n("Bar")); } else { timeT err = 0; - QString label = NotationStrings::makeNoteMenuLabel(d, true, err); - QPixmap pixmap = NotePixmapFactory::toQPixmap + TQString label = NotationStrings::makeNoteMenuLabel(d, true, err); + TQPixmap pixmap = NotePixmapFactory::toQPixmap (NotePixmapFactory::makeNoteMenuPixmap(d, err)); m_snapGridCombo->insertItem((err ? noMap : pixmap), label); } @@ -2149,25 +2149,25 @@ MatrixView::initActionsToolbar() } } - connect(m_snapGridCombo, SIGNAL(activated(int)), - this, SLOT(slotSetSnapFromIndex(int))); + connect(m_snapGridCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotSetSnapFromIndex(int))); // Velocity combo. Not a spin box, because the spin box is too // slow to use unless we make it typeable into, and then it takes // focus away from our more important widgets - QLabel *vlabel = new QLabel(i18n(" Velocity: "), actionsToolbar, "kde toolbar widget"); + TQLabel *vlabel = new TQLabel(i18n(" Velocity: "), actionsToolbar, "kde toolbar widget"); vlabel->setIndent(10); m_velocityCombo = new KComboBox(actionsToolbar); for (int i = 0; i <= 127; ++i) { - m_velocityCombo->insertItem(QString("%1").arg(i)); + m_velocityCombo->insertItem(TQString("%1").arg(i)); } m_velocityCombo->setCurrentItem(100); //!!! associate with segment // Quantize combo // - QLabel *qLabel = new QLabel(i18n(" Quantize: "), actionsToolbar, "kde toolbar widget"); + TQLabel *qLabel = new TQLabel(i18n(" Quantize: "), actionsToolbar, "kde toolbar widget"); qLabel->setIndent(10); m_quantizeCombo = new KComboBox(actionsToolbar); @@ -2176,15 +2176,15 @@ MatrixView::initActionsToolbar() timeT time = m_quantizations[i]; timeT error = 0; - QString label = NotationStrings::makeNoteMenuLabel(time, true, error); - QPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); + TQString label = NotationStrings::makeNoteMenuLabel(time, true, error); + TQPixmap pmap = NotePixmapFactory::toQPixmap(NotePixmapFactory::makeNoteMenuPixmap(time, error)); m_quantizeCombo->insertItem(error ? noMap : pmap, label); } m_quantizeCombo->insertItem(noMap, i18n("Off")); - connect(m_quantizeCombo, SIGNAL(activated(int)), - this, SLOT(slotQuantizeSelection(int))); + connect(m_quantizeCombo, TQT_SIGNAL(activated(int)), + this, TQT_SLOT(slotQuantizeSelection(int))); } void @@ -2217,17 +2217,17 @@ MatrixView::initZoomToolbar() } m_hZoomSlider = new ZoomSlider<double> - (zoomSizes, -1, QSlider::Horizontal, zoomToolbar, "kde toolbar widget"); + (zoomSizes, -1, TQSlider::Horizontal, zoomToolbar, "kde toolbar widget"); m_hZoomSlider->setTracking(true); - m_hZoomSlider->setFocusPolicy(QWidget::NoFocus); + m_hZoomSlider->setFocusPolicy(TQWidget::NoFocus); - m_zoomLabel = new QLabel(zoomToolbar, "kde toolbar widget"); + m_zoomLabel = new TQLabel(zoomToolbar, "kde toolbar widget"); m_zoomLabel->setIndent(10); m_zoomLabel->setFixedWidth(80); connect(m_hZoomSlider, - SIGNAL(valueChanged(int)), - SLOT(slotChangeHorizontalZoom(int))); + TQT_SIGNAL(valueChanged(int)), + TQT_SLOT(slotChangeHorizontalZoom(int))); } @@ -2251,7 +2251,7 @@ MatrixView::slotChangeHorizontalZoom(int) // Set zoom matrix // - QWMatrix zoomMatrix; + TQWMatrix zoomMatrix; zoomMatrix.scale(zoomValue, 1.0); m_canvasView->setWorldMatrix(zoomMatrix); @@ -2521,7 +2521,7 @@ void MatrixView::slotFilterSelection() return ; EventFilterDialog dialog(this); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { RG_DEBUG << "slotFilterSelection- accepted" << endl; bool haveEvent = false; @@ -2572,7 +2572,7 @@ MatrixView::readjustCanvasSize() int newWidth = computePostLayoutWidth(); // now get the EditView to do the biz - readjustViewSize(QSize(newWidth, maxHeight), true); + readjustViewSize(TQSize(newWidth, maxHeight), true); repaintRulers(); } @@ -2612,7 +2612,7 @@ MatrixView::slotSetVelocities() BaseProperties::VELOCITY, getCurrentVelocity()); - if (dialog.exec() == QDialog::Accepted) { + if (dialog.exec() == TQDialog::Accepted) { KTmpStatusMsg msg(i18n("Setting Velocities..."), this); addCommandToHistory(new SelectionPropertyCommand (m_currentEventSelection, @@ -2643,7 +2643,7 @@ MatrixView::slotTriggerSegment() return ; TriggerSegmentDialog dialog(this, &getDocument()->getComposition()); - if (dialog.exec() != QDialog::Accepted) + if (dialog.exec() != TQDialog::Accepted) return ; addCommandToHistory(new SetTriggerCommand(*m_currentEventSelection, @@ -2678,7 +2678,7 @@ MatrixView::slotToggleTempoRuler() } void -MatrixView::paintEvent(QPaintEvent* e) +MatrixView::paintEvent(TQPaintEvent* e) { //!!! There's a lot of code shared between matrix and notation for // dealing with step recording (the insertable note event stuff). @@ -2706,7 +2706,7 @@ MatrixView::updateViewCaption() { // Set client label // - QString view = i18n("Matrix"); + TQString view = i18n("Matrix"); if (isDrumMode()) view = i18n("Percussion"); @@ -2930,7 +2930,7 @@ MatrixView::slotToggleStepByStep() void MatrixView::slotUpdateInsertModeStatus() { - QString message; + TQString message; if (isInChordMode()) { message = i18n(" Chord "); } else { @@ -2940,7 +2940,7 @@ MatrixView::slotUpdateInsertModeStatus() } void -MatrixView::slotStepByStepTargetRequested(QObject *obj) +MatrixView::slotStepByStepTargetRequested(TQObject *obj) { KToggleAction *action = dynamic_cast<KToggleAction *> (actionCollection()->action("toggle_step_by_step")); @@ -3010,7 +3010,7 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr) delete m_pitchRuler; - QWidget *vport = m_pianoView->viewport(); + TQWidget *vport = m_pianoView->viewport(); // Create a new pitchruler widget PitchRuler *pitchRuler; @@ -3024,21 +3024,21 @@ MatrixView::slotPercussionSetChanged(Instrument * newInstr) } - QObject::connect - (pitchRuler, SIGNAL(hoveredOverKeyChanged(unsigned int)), - this, SLOT (slotHoveredOverKeyChanged(unsigned int))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(hoveredOverKeyChanged(unsigned int)), + this, TQT_SLOT (slotHoveredOverKeyChanged(unsigned int))); - QObject::connect - (pitchRuler, SIGNAL(keyPressed(unsigned int, bool)), - this, SLOT (slotKeyPressed(unsigned int, bool))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(keyPressed(unsigned int, bool)), + this, TQT_SLOT (slotKeyPressed(unsigned int, bool))); - QObject::connect - (pitchRuler, SIGNAL(keySelected(unsigned int, bool)), - this, SLOT (slotKeySelected(unsigned int, bool))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(keySelected(unsigned int, bool)), + this, TQT_SLOT (slotKeySelected(unsigned int, bool))); - QObject::connect - (pitchRuler, SIGNAL(keyReleased(unsigned int, bool)), - this, SLOT (slotKeyReleased(unsigned int, bool))); + TQObject::connect + (pitchRuler, TQT_SIGNAL(keyReleased(unsigned int, bool)), + this, TQT_SLOT (slotKeyReleased(unsigned int, bool))); // Replace the old pitchruler widget m_pitchRuler = pitchRuler; diff --git a/src/gui/editors/matrix/MatrixView.h b/src/gui/editors/matrix/MatrixView.h index 49e0358..0951c8c 100644 --- a/src/gui/editors/matrix/MatrixView.h +++ b/src/gui/editors/matrix/MatrixView.h @@ -35,20 +35,20 @@ #include "MatrixVLayout.h" #include "MatrixCanvasView.h" #include <kdockwidget.h> -#include <qpoint.h> -#include <qsize.h> +#include <tqpoint.h> +#include <tqsize.h> #include <vector> #include "base/Event.h" #include "document/ConfigGroups.h" -class QWidget; -class QPaintEvent; -class QObject; -class QMouseEvent; -class QLabel; -class QCursor; -class QCanvas; +class TQWidget; +class TQPaintEvent; +class TQObject; +class TQMouseEvent; +class TQLabel; +class TQCursor; +class TQCanvas; class KComboBox; @@ -88,7 +88,7 @@ class MatrixView : public EditView public: MatrixView(RosegardenGUIDoc *doc, std::vector<Segment *> segments, - QWidget *parent, bool drumMode); + TQWidget *parent, bool drumMode); virtual ~MatrixView(); @@ -100,9 +100,9 @@ public: timeT startTime = 0, timeT endTime = 0); - QCanvas* canvas() { return getCanvasView()->canvas(); } + TQCanvas* canvas() { return getCanvasView()->canvas(); } - void setCanvasCursor(const QCursor &cursor) { + void setCanvasCursor(const TQCursor &cursor) { getCanvasView()->viewport()->setCursor(cursor); } @@ -194,7 +194,7 @@ public: double getXbyInverseWorldMatrix(double value) { return m_canvasView->inverseWorldMatrix().m11() * value; } - QPoint inverseMapPoint(const QPoint& p) { return m_canvasView->inverseMapPoint(p); } + TQPoint inverseMapPoint(const TQPoint& p) { return m_canvasView->inverseMapPoint(p); } /* * Repaint the control rulers @@ -240,7 +240,7 @@ signals: void jumpPlaybackTo(timeT); void panic(); - void stepByStepTargetRequested(QObject *); + void stepByStepTargetRequested(TQObject *); void editTriggerSegment(int); @@ -316,10 +316,10 @@ public slots: * or somewhere on the staff */ void slotMousePressed(timeT time, int pitch, - QMouseEvent*, MatrixElement*); + TQMouseEvent*, MatrixElement*); - void slotMouseMoved(timeT time, int pitch, QMouseEvent*); - void slotMouseReleased(timeT time, int pitch, QMouseEvent*); + void slotMouseMoved(timeT time, int pitch, TQMouseEvent*); + void slotMouseReleased(timeT time, int pitch, TQMouseEvent*); /** * Called when the mouse cursor moves over a different height on @@ -468,8 +468,8 @@ public slots: /// Note-on or note-off received asynchronously -- as above void slotInsertableNoteEventReceived(int pitch, int velocity, bool noteOn); - /// The given QObject has originated a step-by-step-editing request - void slotStepByStepTargetRequested(QObject *); + /// The given TQObject has originated a step-by-step-editing request + void slotStepByStepTargetRequested(TQObject *); void slotInstrumentLevelsChanged(InstrumentId, const LevelInfo &); @@ -506,7 +506,7 @@ protected slots: */ void slotCheckTrackAssignments(); - void slotToolHelpChanged(const QString &); + void slotToolHelpChanged(const TQString &); void slotMouseEnteredCanvasView(); void slotMouseLeftCanvasView(); @@ -547,12 +547,12 @@ protected: /** * Return the size of the MatrixCanvasView */ - virtual QSize getViewSize(); + virtual TQSize getViewSize(); /** * Set the size of the MatrixCanvasView */ - virtual void setViewSize(QSize); + virtual void setViewSize(TQSize); virtual MatrixCanvasView *getCanvasView(); @@ -571,7 +571,7 @@ protected: */ bool canPreviewAnotherNote(); - virtual void paintEvent(QPaintEvent* e); + virtual void paintEvent(TQPaintEvent* e); virtual void updateViewCaption(); @@ -600,10 +600,10 @@ protected: timeT m_lastEndMarkerTime; // Status bar elements - QLabel* m_hoveredOverAbsoluteTime; - QLabel* m_hoveredOverNoteName; - QLabel *m_selectionCounter; - QLabel *m_insertModeLabel; + TQLabel* m_hoveredOverAbsoluteTime; + TQLabel* m_hoveredOverNoteName; + TQLabel *m_selectionCounter; + TQLabel *m_insertModeLabel; bool m_haveHoveredOverNote; /** @@ -642,7 +642,7 @@ protected: KComboBox *m_snapGridCombo; ZoomSlider<double> *m_hZoomSlider; ZoomSlider<double> *m_vZoomSlider; - QLabel *m_zoomLabel; + TQLabel *m_zoomLabel; // Hold our matrix quantization values and snap values // @@ -652,7 +652,7 @@ protected: std::vector<std::pair<PropertyViewRuler*, PropertyBox*> > m_propertyViewRulers; ChordNameRuler *m_chordNameRuler; - QWidget *m_tempoRuler; + TQWidget *m_tempoRuler; // ruler used to scale tempo and chord name ruler ZoomableMatrixHLayoutRulerScale* m_referenceRuler; @@ -664,7 +664,7 @@ protected: bool m_drumMode; bool m_mouseInCanvasView; - QString m_toolContextHelp; + TQString m_toolContextHelp; }; // Commented this out - was a MatrixView inner class, but we get a warning diff --git a/src/gui/editors/matrix/PianoKeyboard.cpp b/src/gui/editors/matrix/PianoKeyboard.cpp index e4641d0..47f8413 100644 --- a/src/gui/editors/matrix/PianoKeyboard.cpp +++ b/src/gui/editors/matrix/PianoKeyboard.cpp @@ -31,13 +31,13 @@ #include "gui/rulers/PitchRuler.h" #include "MatrixStaff.h" #include "MatrixView.h" -#include <qcolor.h> -#include <qcursor.h> -#include <qevent.h> -#include <qfont.h> -#include <qpainter.h> -#include <qsize.h> -#include <qwidget.h> +#include <tqcolor.h> +#include <tqcursor.h> +#include <tqevent.h> +#include <tqfont.h> +#include <tqpainter.h> +#include <tqsize.h> +#include <tqwidget.h> namespace Rosegarden @@ -46,32 +46,32 @@ namespace Rosegarden const unsigned int _smallWhiteKeyHeight = 14; const unsigned int _whiteKeyHeight = 18; -PianoKeyboard::PianoKeyboard(QWidget *parent, int keys) +PianoKeyboard::PianoKeyboard(TQWidget *parent, int keys) : PitchRuler(parent), m_keySize(48, 18), m_blackKeySize(24, 8), m_nbKeys(keys), m_mouseDown(false), - m_hoverHighlight(new QWidget(this)), + m_hoverHighlight(new TQWidget(this)), m_lastHoverHighlight(0), m_lastKeyPressed(0) { m_hoverHighlight->hide(); m_hoverHighlight->setPaletteBackgroundColor(GUIPalette::getColour(GUIPalette::MatrixKeyboardFocus)); - setPaletteBackgroundColor(QColor(238, 238, 224)); + setPaletteBackgroundColor(TQColor(238, 238, 224)); computeKeyPos(); setMouseTracking(true); } -QSize PianoKeyboard::sizeHint() const +TQSize PianoKeyboard::sizeHint() const { - return QSize(m_keySize.width(), + return TQSize(m_keySize.width(), m_keySize.height() * m_nbKeys); } -QSize PianoKeyboard::minimumSizeHint() const +TQSize PianoKeyboard::minimumSizeHint() const { return m_keySize; } @@ -125,15 +125,15 @@ void PianoKeyboard::computeKeyPos() } } -void PianoKeyboard::paintEvent(QPaintEvent*) +void PianoKeyboard::paintEvent(TQPaintEvent*) { - static QFont *pFont = 0; + static TQFont *pFont = 0; if (!pFont) { - pFont = new QFont(); + pFont = new TQFont(); pFont->setPixelSize(9); } - QPainter paint(this); + TQPainter paint(this); paint.setFont(*pFont); @@ -161,12 +161,12 @@ void PianoKeyboard::paintEvent(QPaintEvent*) m_blackKeySize.width(), m_blackKeySize.height()); } -void PianoKeyboard::enterEvent(QEvent *) +void PianoKeyboard::enterEvent(TQEvent *) { //drawHoverNote(e->y()); } -void PianoKeyboard::leaveEvent(QEvent*) +void PianoKeyboard::leaveEvent(TQEvent*) { m_hoverHighlight->hide(); @@ -241,7 +241,7 @@ void PianoKeyboard::drawHoverNote(int evPitch) } -void PianoKeyboard::mouseMoveEvent(QMouseEvent* e) +void PianoKeyboard::mouseMoveEvent(TQMouseEvent* e) { // The routine to work out where this should appear doesn't coincide with the note // that we send to the sequencer - hence this is a bit pointless and crap at the moment. @@ -270,7 +270,7 @@ void PianoKeyboard::mouseMoveEvent(QMouseEvent* e) emit hoveredOverKeyChanged(e->y()); } -void PianoKeyboard::mousePressEvent(QMouseEvent *e) +void PianoKeyboard::mousePressEvent(TQMouseEvent *e) { Qt::ButtonState bs = e->state(); @@ -286,7 +286,7 @@ void PianoKeyboard::mousePressEvent(QMouseEvent *e) } } -void PianoKeyboard::mouseReleaseEvent(QMouseEvent *e) +void PianoKeyboard::mouseReleaseEvent(TQMouseEvent *e) { if (e->button() == LeftButton) { m_mouseDown = false; diff --git a/src/gui/editors/matrix/PianoKeyboard.h b/src/gui/editors/matrix/PianoKeyboard.h index e8b06bb..82c2be6 100644 --- a/src/gui/editors/matrix/PianoKeyboard.h +++ b/src/gui/editors/matrix/PianoKeyboard.h @@ -27,14 +27,14 @@ #define _RG_PIANOKEYBOARD_H_ #include "gui/rulers/PitchRuler.h" -#include <qsize.h> +#include <tqsize.h> #include <vector> -class QWidget; -class QPaintEvent; -class QMouseEvent; -class QEvent; +class TQWidget; +class TQPaintEvent; +class TQMouseEvent; +class TQEvent; namespace Rosegarden @@ -46,10 +46,10 @@ class PianoKeyboard : public PitchRuler { Q_OBJECT public: - PianoKeyboard(QWidget *parent, int keys = 88); + PianoKeyboard(TQWidget *parent, int keys = 88); - virtual QSize sizeHint() const; - virtual QSize minimumSizeHint() const; + virtual TQSize sizeHint() const; + virtual TQSize minimumSizeHint() const; /* * We want to be able to call this from the matrix view @@ -96,21 +96,21 @@ signals: protected: - virtual void paintEvent(QPaintEvent*); + virtual void paintEvent(TQPaintEvent*); - virtual void mouseMoveEvent(QMouseEvent*); - virtual void mousePressEvent(QMouseEvent*); - virtual void mouseReleaseEvent(QMouseEvent*); - virtual void enterEvent(QEvent *); - virtual void leaveEvent(QEvent *); + virtual void mouseMoveEvent(TQMouseEvent*); + virtual void mousePressEvent(TQMouseEvent*); + virtual void mouseReleaseEvent(TQMouseEvent*); + virtual void enterEvent(TQEvent *); + virtual void leaveEvent(TQEvent *); // compute all key positions and store them // void computeKeyPos(); //--------------- Data members --------------------------------- - QSize m_keySize; - QSize m_blackKeySize; + TQSize m_keySize; + TQSize m_blackKeySize; unsigned int m_nbKeys; std::vector<unsigned int> m_whiteKeyPos; @@ -122,7 +122,7 @@ protected: bool m_selecting; // highlight element on the keyboard - QWidget *m_hoverHighlight; + TQWidget *m_hoverHighlight; int m_lastHoverHighlight; int m_lastKeyPressed; }; diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp index 582b53a..128d3f9 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.cpp @@ -27,17 +27,17 @@ #include "MatrixElement.h" #include "QCanvasMatrixRectangle.h" -#include <qcanvas.h> -#include <qpainter.h> -#include <qpointarray.h> -#include <qpoint.h> +#include <tqcanvas.h> +#include <tqpainter.h> +#include <tqpointarray.h> +#include <tqpoint.h> namespace Rosegarden { QCanvasMatrixDiamond::QCanvasMatrixDiamond(MatrixElement &n, - QCanvas* canvas) : + TQCanvas* canvas) : QCanvasMatrixRectangle(n, canvas) {} @@ -46,34 +46,34 @@ QCanvasMatrixDiamond::~QCanvasMatrixDiamond() hide(); } -QPointArray QCanvasMatrixDiamond::areaPoints() const +TQPointArray QCanvasMatrixDiamond::areaPoints() const { - QPointArray pa(4); + TQPointArray pa(4); int pw = (pen().width() + 1) / 2; if ( pw < 1 ) pw = 1; if ( pen() == NoPen ) pw = 0; - pa[0] = QPoint((int)x() - height() / 2 - pw, (int)y() - pw); - pa[1] = pa[0] + QPoint(height() + pw * 2, 0); - pa[2] = pa[1] + QPoint(0, height() + pw * 2); - pa[3] = pa[0] + QPoint(0, height() + pw * 2); + pa[0] = TQPoint((int)x() - height() / 2 - pw, (int)y() - pw); + pa[1] = pa[0] + TQPoint(height() + pw * 2, 0); + pa[2] = pa[1] + TQPoint(0, height() + pw * 2); + pa[3] = pa[0] + TQPoint(0, height() + pw * 2); return pa; } -void QCanvasMatrixDiamond::drawShape(QPainter & p) +void QCanvasMatrixDiamond::drawShape(TQPainter & p) { p.save(); p.setWorldXForm(false); - QPointArray pa(4); + TQPointArray pa(4); int q = height() / 2 + 2; - QPoint mapPos = p.worldMatrix().map(QPoint(int(x()), int(y()))); + TQPoint mapPos = p.worldMatrix().map(TQPoint(int(x()), int(y()))); - pa[0] = QPoint(mapPos.x(), mapPos.y() - 3); - pa[1] = QPoint(mapPos.x() + q, mapPos.y() - 3 + q); - pa[2] = pa[0] + QPoint(0, q * 2); - pa[3] = pa[1] - QPoint(q * 2, 0); + pa[0] = TQPoint(mapPos.x(), mapPos.y() - 3); + pa[1] = TQPoint(mapPos.x() + q, mapPos.y() - 3 + q); + pa[2] = pa[0] + TQPoint(0, q * 2); + pa[3] = pa[1] - TQPoint(q * 2, 0); p.drawConvexPolygon(pa); p.restore(); diff --git a/src/gui/editors/matrix/QCanvasMatrixDiamond.h b/src/gui/editors/matrix/QCanvasMatrixDiamond.h index 5163b12..547d7f1 100644 --- a/src/gui/editors/matrix/QCanvasMatrixDiamond.h +++ b/src/gui/editors/matrix/QCanvasMatrixDiamond.h @@ -27,11 +27,11 @@ #define _RG_QCANVASMATRIXDIAMOND_H_ #include "QCanvasMatrixRectangle.h" -#include <qpointarray.h> +#include <tqpointarray.h> -class QPainter; -class QCanvas; +class TQPainter; +class TQCanvas; namespace Rosegarden @@ -41,18 +41,18 @@ class MatrixElement; /** - * A QCanvas diamond shape referencing a MatrixElement + * A TQCanvas diamond shape referencing a MatrixElement */ class QCanvasMatrixDiamond : public QCanvasMatrixRectangle { public: - QCanvasMatrixDiamond(MatrixElement&, QCanvas *); + QCanvasMatrixDiamond(MatrixElement&, TQCanvas *); ~QCanvasMatrixDiamond(); - QPointArray areaPoints() const; + TQPointArray areaPoints() const; protected: - void drawShape(QPainter &); + void drawShape(TQPainter &); }; diff --git a/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp b/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp index a27b480..bbee6de 100644 --- a/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp +++ b/src/gui/editors/matrix/QCanvasMatrixRectangle.cpp @@ -26,15 +26,15 @@ #include "QCanvasMatrixRectangle.h" #include "MatrixElement.h" -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden { QCanvasMatrixRectangle::QCanvasMatrixRectangle(MatrixElement& n, - QCanvas* canvas) - : QCanvasRectangle(canvas), + TQCanvas* canvas) + : TQCanvasRectangle(canvas), m_matrixElement(n) {} diff --git a/src/gui/editors/matrix/QCanvasMatrixRectangle.h b/src/gui/editors/matrix/QCanvasMatrixRectangle.h index 64b6e65..6ef7ed8 100644 --- a/src/gui/editors/matrix/QCanvasMatrixRectangle.h +++ b/src/gui/editors/matrix/QCanvasMatrixRectangle.h @@ -26,7 +26,7 @@ #ifndef _RG_QCANVASMATRIXRECTANGLE_H_ #define _RG_QCANVASMATRIXRECTANGLE_H_ -#include <qcanvas.h> +#include <tqcanvas.h> namespace Rosegarden @@ -36,12 +36,12 @@ class MatrixElement; /** - * A QCanvasRectangle referencing a MatrixElement + * A TQCanvasRectangle referencing a MatrixElement */ class QCanvasMatrixRectangle : public QCanvasRectangle { public: - QCanvasMatrixRectangle(MatrixElement&, QCanvas*); + QCanvasMatrixRectangle(MatrixElement&, TQCanvas*); virtual ~QCanvasMatrixRectangle(); |