diff options
Diffstat (limited to 'src/gui/editors/notation/NotationStaff.cpp')
-rw-r--r-- | src/gui/editors/notation/NotationStaff.cpp | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/src/gui/editors/notation/NotationStaff.cpp b/src/gui/editors/notation/NotationStaff.cpp index 717e418..1b875f3 100644 --- a/src/gui/editors/notation/NotationStaff.cpp +++ b/src/gui/editors/notation/NotationStaff.cpp @@ -141,7 +141,7 @@ NotationStaff::changeFont(std::string fontName, int size) } void -NotationStaff::insertTimeSignature(double layoutX, +NotationStaff::insertTimeSignature(double tqlayoutX, const TimeSignature &timeSig) { if (timeSig.isHidden()) @@ -149,11 +149,11 @@ NotationStaff::insertTimeSignature(double layoutX, m_notePixmapFactory->setSelected(false); TQCanvasPixmap *pixmap = m_notePixmapFactory->makeTimeSigPixmap(timeSig); - QCanvasTimeSigSprite *sprite = - new QCanvasTimeSigSprite(layoutX, pixmap, m_canvas); + TQCanvasTimeSigSprite *sprite = + new TQCanvasTimeSigSprite(tqlayoutX, pixmap, m_canvas); LinedStaffCoords sigCoords = - getCanvasCoordsForLayoutCoords(layoutX, getLayoutYForHeight(4)); + getCanvasCoordsForLayoutCoords(tqlayoutX, getLayoutYForHeight(4)); sprite->move(sigCoords.first, (double)sigCoords.second); sprite->show(); @@ -174,7 +174,7 @@ NotationStaff::deleteTimeSignatures() } void -NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) +NotationStaff::insertRepeatedClefAndKey(double tqlayoutX, int barNo) { bool needClef = false, needKey = false; timeT t; @@ -196,15 +196,15 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) if (needClef) { - int layoutY = getLayoutYForHeight(clef.getAxisHeight()); + int tqlayoutY = getLayoutYForHeight(clef.getAxisHeight()); LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX + dx, tqlayoutY); TQCanvasPixmap *pixmap = m_notePixmapFactory->makeClefPixmap(clef); - QCanvasNonElementSprite *sprite = - new QCanvasNonElementSprite(pixmap, m_canvas); + TQCanvasNonElementSprite *sprite = + new TQCanvasNonElementSprite(pixmap, m_canvas); sprite->move(coords.first, coords.second); sprite->show(); @@ -215,15 +215,15 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) if (needKey) { - int layoutY = getLayoutYForHeight(12); + int tqlayoutY = getLayoutYForHeight(12); LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX + dx, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX + dx, tqlayoutY); TQCanvasPixmap *pixmap = m_notePixmapFactory->makeKeyPixmap(key, clef); - QCanvasNonElementSprite *sprite = - new QCanvasNonElementSprite(pixmap, m_canvas); + TQCanvasNonElementSprite *sprite = + new TQCanvasNonElementSprite(pixmap, m_canvas); sprite->move(coords.first, coords.second); sprite->show(); @@ -236,16 +236,16 @@ NotationStaff::insertRepeatedClefAndKey(double layoutX, int barNo) if (m_notationView->isInPrintMode() && (needClef || needKey)) { - int layoutY = getLayoutYForHeight(14); - int h = getLayoutYForHeight(-8) - layoutY; + int tqlayoutY = getLayoutYForHeight(14); + int h = getLayoutYForHeight(-8) - tqlayoutY; LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); TQCanvasRectangle *rect = new TQCanvasRectangle(coords.first, coords.second, dx, h, m_canvas); - rect->setPen(Qt::black); - rect->setBrush(Qt::white); + rect->setPen(TQt::black); + rect->setBrush(TQt::white); rect->setZ(1); rect->show(); @@ -282,8 +282,8 @@ NotationStaff::drawStaffName() m_staffName = new QCanvasStaffNameSprite(map, m_canvas); - int layoutY = getLayoutYForHeight(3); - LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(0, layoutY); + int tqlayoutY = getLayoutYForHeight(3); + LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(0, tqlayoutY); m_staffName->move(getX() + getMargin() + m_notePixmapFactory->getNoteBodyWidth(), coords.second - map->height() / 2); m_staffName->show(); @@ -300,9 +300,9 @@ NotationStaff::isStaffNameUpToDate() timeT NotationStaff::getTimeAtCanvasCoords(double cx, int cy) const { - LinedStaffCoords layoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); + LinedStaffCoords tqlayoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); RulerScale * rs = m_notationView->getHLayout(); - return rs->getTimeForX(layoutCoords.first); + return rs->getTimeForX(tqlayoutCoords.first); } void @@ -310,17 +310,17 @@ NotationStaff::getClefAndKeyAtCanvasCoords(double cx, int cy, Clef &clef, ::Rosegarden::Key &key) const { - LinedStaffCoords layoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); + LinedStaffCoords tqlayoutCoords = getLayoutCoordsForCanvasCoords(cx, cy); int i; for (i = 0; i < m_clefChanges.size(); ++i) { - if (m_clefChanges[i].first > layoutCoords.first) + if (m_clefChanges[i].first > tqlayoutCoords.first) break; clef = m_clefChanges[i].second; } for (i = 0; i < m_keyChanges.size(); ++i) { - if (m_keyChanges[i].first > layoutCoords.first) + if (m_keyChanges[i].first > tqlayoutCoords.first) break; key = m_keyChanges[i].second; } @@ -379,7 +379,7 @@ NotationStaff::getClosestElementToLayoutX(double x, return notes->end(); } - NOTATION_DEBUG << "NotationStaff::getClosestElementToLayoutX: found element at layout " << (*result)->getLayoutX() << " - we're at layout " << x << endl; + NOTATION_DEBUG << "NotationStaff::getClosestElementToLayoutX: found element at tqlayout " << (*result)->getLayoutX() << " - we're at tqlayout " << x << endl; PRINT_ELAPSED("NotationStaff::getClosestElementToLayoutX"); @@ -449,7 +449,7 @@ NotationStaff::renderElements(NotationElementList::iterator from, // NOTATION_DEBUG << "NotationStaff " << this << "::renderElements()" << endl; Profiler profiler("NotationStaff::renderElements"); - emit setOperationName(i18n("Rendering staff %1...").arg(getId() + 1)); + emit setOperationName(i18n("Rendering staff %1...").tqarg(getId() + 1)); emit setProgress(0); throwIfCancelled(); @@ -512,7 +512,7 @@ NotationStaff::renderPrintable(timeT from, timeT to) Profiler profiler("NotationStaff::renderElements"); - emit setOperationName(i18n("Rendering notes on staff %1...").arg(getId() + 1)); + emit setOperationName(i18n("Rendering notes on staff %1...").tqarg(getId() + 1)); emit setProgress(0); throwIfCancelled(); @@ -580,7 +580,7 @@ NotationStaff::positionElements(timeT from, timeT to) if (to < startTime) to = startTime; if (to == from) return; - emit setOperationName(i18n("Positioning staff %1...").arg(getId() + 1)); + emit setOperationName(i18n("Positioning staff %1...").tqarg(getId() + 1)); emit setProgress(0); throwIfCancelled(); @@ -1395,15 +1395,15 @@ void NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, FitPolicy policy) { - double layoutX = elt->getLayoutX(); - int layoutY = (int)elt->getLayoutY(); + double tqlayoutX = elt->getLayoutX(); + int tqlayoutY = (int)elt->getLayoutY(); elt->removeCanvasItem(); while (1) { LinedStaffCoords coords = - getCanvasCoordsForLayoutCoords(layoutX, layoutY); + getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); double canvasX = coords.first; int canvasY = coords.second; @@ -1412,11 +1412,11 @@ NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, if (m_pageMode == LinearMode || policy == PretendItFittedAllAlong) { - item = new QCanvasNotationSprite(*elt, pixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, pixmap, m_canvas); } else { - int row = getRowForLayoutX(layoutX); + int row = getRowForLayoutX(tqlayoutX); double rightMargin = getCanvasXForRightOfRow(row); double extent = canvasX + pixmap->width(); @@ -1432,13 +1432,13 @@ NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, PixmapFunctions::splitPixmap(*pixmap, int(rightMargin - canvasX)); - TQCanvasPixmap *leftCanvasPixmap = new QCanvasPixmap + TQCanvasPixmap *leftCanvasPixmap = new TQCanvasPixmap (split.first, TQPoint(pixmap->offsetX(), pixmap->offsetY())); - TQCanvasPixmap *rightCanvasPixmap = new QCanvasPixmap + TQCanvasPixmap *rightCanvasPixmap = new TQCanvasPixmap (split.second, TQPoint(0, pixmap->offsetY())); - item = new QCanvasNotationSprite(*elt, leftCanvasPixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, leftCanvasPixmap, m_canvas); item->setZ(z); if (elt->getCanvasItem()) { @@ -1452,19 +1452,19 @@ NotationStaff::setPixmap(NotationElement *elt, TQCanvasPixmap *pixmap, int z, delete pixmap; pixmap = rightCanvasPixmap; - layoutX += rightMargin - canvasX + 0.01; // ensure flip to next row + tqlayoutX += rightMargin - canvasX + 0.01; // ensure flip to next row continue; } else { // policy == MoveBackToFit - item = new QCanvasNotationSprite(*elt, pixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, pixmap, m_canvas); elt->setLayoutX(elt->getLayoutX() - (extent - rightMargin)); - coords = getCanvasCoordsForLayoutCoords(layoutX, layoutY); + coords = getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); canvasX = coords.first; } } else { - item = new QCanvasNotationSprite(*elt, pixmap, m_canvas); + item = new TQCanvasNotationSprite(*elt, pixmap, m_canvas); } } @@ -1742,7 +1742,7 @@ NotationStaff::renderNote(ViewElementList::iterator &vli) if (collision) { // Make collision halo TQCanvasPixmap *haloPixmap = factory->makeNoteHaloPixmap(params); - haloItem = new QCanvasNotationSprite(*elt, haloPixmap, m_canvas); + haloItem = new TQCanvasNotationSprite(*elt, haloPixmap, m_canvas); haloItem->setZ(-1); } } @@ -1819,11 +1819,11 @@ NotationStaff::isSelected(NotationElementList::iterator it) { const EventSelection *selection = m_notationView->getCurrentSelection(); - return selection && selection->contains((*it)->event()); + return selection && selection->tqcontains((*it)->event()); } void -NotationStaff::showPreviewNote(double layoutX, int heightOnStaff, +NotationStaff::showPreviewNote(double tqlayoutX, int heightOnStaff, const Note ¬e, bool grace) { NotePixmapFactory *npf = m_notePixmapFactory; @@ -1851,8 +1851,8 @@ NotationStaff::showPreviewNote(double layoutX, int heightOnStaff, m_previewSprite = new QCanvasSimpleSprite (npf->makeNotePixmap(params), m_canvas); - int layoutY = getLayoutYForHeight(heightOnStaff); - LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(layoutX, layoutY); + int tqlayoutY = getLayoutYForHeight(heightOnStaff); + LinedStaffCoords coords = getCanvasCoordsForLayoutCoords(tqlayoutX, tqlayoutY); m_previewSprite->move(coords.first, (double)coords.second); m_previewSprite->setZ(4); |