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/MatrixSelector.cpp | |
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/MatrixSelector.cpp')
-rw-r--r-- | src/gui/editors/matrix/MatrixSelector.cpp | 82 |
1 files changed, 41 insertions, 41 deletions
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" |