diff options
Diffstat (limited to 'src/gui/editors/notation/NotationHLayout.cpp')
-rw-r--r-- | src/gui/editors/notation/NotationHLayout.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/src/gui/editors/notation/NotationHLayout.cpp b/src/gui/editors/notation/NotationHLayout.cpp index 4d891a6..20b7469 100644 --- a/src/gui/editors/notation/NotationHLayout.cpp +++ b/src/gui/editors/notation/NotationHLayout.cpp @@ -58,8 +58,8 @@ using namespace BaseProperties; NotationHLayout::NotationHLayout(Composition *c, NotePixmapFactory *npf, const NotationProperties &properties, - TQObject* parent, const char* name) : - ProgressReporter(parent, name), + TQObject* tqparent, const char* name) : + ProgressReporter(tqparent, name), HorizontalLayoutEngine(c), m_totalWidth(0.), m_pageMode(false), @@ -324,7 +324,7 @@ NotationHLayout::scanStaff(Staff &staff, timeT startTime, timeT endTime) setBarBasicData(staff, barNo, from, barCorrect, timeSignature, newTimeSig); BarDataList::iterator bdli(barList.find(barNo)); - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; ChunkList &chunks = bdli->second.chunks; chunks.clear(); @@ -655,10 +655,10 @@ NotationHLayout::scanChord(NotationElementList *notes, extraWidth += e; } - float layoutExtra = 0; + float tqlayoutExtra = 0; if (chord.hasNoteHeadShifted()) { if (chord.hasStemUp()) { - layoutExtra += npf->getNoteBodyWidth(); + tqlayoutExtra += npf->getNoteBodyWidth(); } else { extraWidth = std::max(extraWidth, float(npf->getNoteBodyWidth())); } @@ -686,13 +686,13 @@ NotationHLayout::scanChord(NotationElementList *notes, if (grace) { chunks.push_back(Chunk(d, chord.getSubOrdering(), - extraWidth + layoutExtra + extraWidth + tqlayoutExtra + getLayoutWidth(**myLongest, npf, key) - npf->getNoteBodyWidth(), // tighten up 0)); } else { chunks.push_back(Chunk(d, 0, extraWidth, - std::max(layoutExtra + + std::max(tqlayoutExtra + getLayoutWidth(**myLongest, npf, key), lyricWidth))); lyricWidth = 0; @@ -847,7 +847,7 @@ NotationHLayout::preSquishBar(int barNo) bdli->second.sizeData.reconciledWidth = bdli->second.sizeData.idealWidth; - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; } } } @@ -987,7 +987,7 @@ NotationHLayout::reconcileBarsLinear() double diff = maxWidth - bd.reconciledWidth; if (diff < -0.1 || diff > 0.1) { NOTATION_DEBUG << "(So needsLayout becomes true)" << endl; - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; } bd.reconciledWidth = maxWidth; } @@ -1181,7 +1181,7 @@ NotationHLayout::reconcileBarsPage() BarData::SizeData &bd(bdli->second.sizeData); double diff = maxWidth - bd.reconciledWidth; if (diff < -0.1 || diff > 0.1) { - bdli->second.layoutData.needsLayout = true; + bdli->second.tqlayoutData.needsLayout = true; } bd.reconciledWidth = maxWidth; } @@ -1230,15 +1230,15 @@ NotationHLayout::finishLayout(timeT startTime, timeT endTime) m_timePerProgressIncrement = timeCovered / (100 / m_barData.size()); - layout(i, startTime, endTime); + tqlayout(i, startTime, endTime); ++staffNo; } } void -NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) +NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime) { - Profiler profiler("NotationHLayout::layout"); + Profiler profiler("NotationHLayout::tqlayout"); Staff &staff = *(i->first); NotationElementList *notes = staff.getViewElementList(); @@ -1247,11 +1247,11 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) bool isFullLayout = (startTime == endTime); - // these two are for partial layouts: + // these two are for partial tqlayouts: // bool haveSimpleOffset = false; // double simpleOffset = 0; - NOTATION_DEBUG << "NotationHLayout::layout: full layout " << isFullLayout << ", times " << startTime << "->" << endTime << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout: full tqlayout " << isFullLayout << ", times " << startTime << "->" << endTime << endl; double x = 0, barX = 0; TieMap tieMap; @@ -1287,7 +1287,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) NotationElementList::iterator from = bdi->second.basicData.start; NotationElementList::iterator to; - NOTATION_DEBUG << "NotationHLayout::layout(): starting bar " << barNo << ", x = " << barX << ", width = " << bdi->second.sizeData.idealWidth << ", time = " << (from == notes->end() ? -1 : (*from)->getViewAbsoluteTime()) << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): starting bar " << barNo << ", x = " << barX << ", width = " << bdi->second.sizeData.idealWidth << ", time = " << (from == notes->end() ? -1 : (*from)->getViewAbsoluteTime()) << endl; BarDataList::iterator nbdi(bdi); if (++nbdi == barList.end()) { @@ -1303,27 +1303,27 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) NOTATION_DEBUG << "Start is to" << endl; } - if (!bdi->second.layoutData.needsLayout) { + if (!bdi->second.tqlayoutData.needsLayout) { - double offset = barX - bdi->second.layoutData.x; + double offset = barX - bdi->second.tqlayoutData.x; - NOTATION_DEBUG << "NotationHLayout::layout(): bar " << barNo << " has needsLayout false and offset of " << offset << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): bar " << barNo << " has needsLayout false and offset of " << offset << endl; if (offset > -0.1 && offset < 0.1) { - NOTATION_DEBUG << "NotationHLayout::layout(): no offset, ignoring" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): no offset, ignoring" << endl; continue; } - bdi->second.layoutData.x += offset; + bdi->second.tqlayoutData.x += offset; if (bdi->second.basicData.newTimeSig) - bdi->second.layoutData.timeSigX += (int)offset; + bdi->second.tqlayoutData.timeSigX += (int)offset; for (NotationElementList::iterator it = from; it != to && it != notes->end(); ++it) { NotationElement* nel = static_cast<NotationElement*>(*it); - NOTATION_DEBUG << "NotationHLayout::layout(): shifting element's x to " << ((*it)->getLayoutX() + offset) << " (was " << (*it)->getLayoutX() << ")" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): shifting element's x to " << ((*it)->getLayoutX() + offset) << " (was " << (*it)->getLayoutX() << ")" << endl; nel->setLayoutX((*it)->getLayoutX() + offset); double airX, airWidth; nel->getLayoutAirspace(airX, airWidth); @@ -1333,7 +1333,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) continue; } - bdi->second.layoutData.x = barX; + bdi->second.tqlayoutData.x = barX; // x = barX + getPostBarMargin(); bool timeSigToPlace = false; @@ -1342,7 +1342,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) timeSigToPlace = !bdi->second.basicData.timeSignature.isHidden(); } if (timeSigToPlace) { - NOTATION_DEBUG << "NotationHLayout::layout(): there's a time sig in this bar" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): there's a time sig in this bar" << endl; } bool repeatClefAndKey = false; @@ -1350,7 +1350,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) repeatClefAndKey = true; } if (repeatClefAndKey) { - NOTATION_DEBUG << "NotationHLayout::layout(): need to repeat clef & key in this bar" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): need to repeat clef & key in this bar" << endl; } double barInset = notationStaff.getBarInset(barNo, repeatClefAndKey); @@ -1446,9 +1446,9 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) } // NOTATION_DEBUG << "Placing timesig at " << (x - fixed) << endl; -// bdi->second.layoutData.timeSigX = (int)(x - fixed); +// bdi->second.tqlayoutData.timeSigX = (int)(x - fixed); NOTATION_DEBUG << "Placing timesig at " << sigx << " (would previously have been " << int(x-fixed) << "?)" << endl; - bdi->second.layoutData.timeSigX = (int)sigx; + bdi->second.tqlayoutData.timeSigX = (int)sigx; double shift = getFixedItemSpacing() + m_npf->getTimeSigWidth(timeSignature); offset += shift; @@ -1467,7 +1467,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) } } - NOTATION_DEBUG << "NotationHLayout::layout(): setting element's x to " << x << " (was " << el->getLayoutX() << ")" << endl; + NOTATION_DEBUG << "NotationHLayout::tqlayout(): setting element's x to " << x << " (was " << el->getLayoutX() << ")" << endl; double displacedX = 0.0; long dxRaw = 0; @@ -1571,7 +1571,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) // no other events in this bar, so we never managed to place it x = barX + offset; NOTATION_DEBUG << "Placing timesig reluctantly at " << x << endl; - bdi->second.layoutData.timeSigX = (int)(x); + bdi->second.tqlayoutData.timeSigX = (int)(x); timeSigToPlace = false; } @@ -1583,7 +1583,7 @@ NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) } m_groupsExtant.clear(); - bdi->second.layoutData.needsLayout = false; + bdi->second.tqlayoutData.needsLayout = false; } } @@ -1653,7 +1653,7 @@ NotationHLayout::getSpacingDuration(Staff &staff, if (d > 0 && (*i)->event()->getDuration() == 0) return d; // grace note NotationElementList::iterator j(i), e(staff.getViewElementList()->end()); - while (j != e && (chord.contains(j) || (*j)->getViewDuration() == 0)) + while (j != e && (chord.tqcontains(j) || (*j)->getViewDuration() == 0)) ++j; if (j != e) { @@ -1692,7 +1692,7 @@ NotationHLayout::positionChord(Staff &staff, barEndsInChord = true; // #704958 (multiple tuplet spanners created when entering - // triplet chord) -- layout() updates the beamed group data + // triplet chord) -- tqlayout() updates the beamed group data // for non-notes, but we have to do it for notes so as to // ensure every note in the chord is accounted for sampleGroupElement(staff, clef, key, citr); @@ -2024,7 +2024,7 @@ bool NotationHLayout::getTimeSignaturePosition(Staff &staff, BarDataList::iterator bdli(bdl.find(i)); if (bdli != bdl.end()) { timeSig = bdli->second.basicData.timeSignature; - timeSigX = (double)(bdli->second.layoutData.timeSigX); + timeSigX = (double)(bdli->second.tqlayoutData.timeSigX); return bdli->second.basicData.newTimeSig; } else return 0; |