diff options
author | Timothy Pearson <[email protected]> | 2011-12-21 14:07:05 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-21 14:07:05 -0600 |
commit | c18386d69b76ef0218b5f0a08ca773fa824322b6 (patch) | |
tree | 0bea571897791e4a9ae01e42d0923c3c7baf0bda /src/gui/editors/notation | |
parent | 97f1c43c867725d49f3943a68ef08d7e71767e99 (diff) | |
download | rosegarden-c18386d69b76ef0218b5f0a08ca773fa824322b6.tar.gz rosegarden-c18386d69b76ef0218b5f0a08ca773fa824322b6.zip |
Rename obsolete tq methods to standard names
Diffstat (limited to 'src/gui/editors/notation')
-rw-r--r-- | src/gui/editors/notation/NotationElement.h | 4 | ||||
-rw-r--r-- | src/gui/editors/notation/NotationGroup.h | 6 | ||||
-rw-r--r-- | src/gui/editors/notation/NotationHLayout.cpp | 24 | ||||
-rw-r--r-- | src/gui/editors/notation/NotationHLayout.h | 14 | ||||
-rw-r--r-- | src/gui/editors/notation/NotationStaff.cpp | 2 | ||||
-rw-r--r-- | src/gui/editors/notation/NotationStaff.h | 18 | ||||
-rw-r--r-- | src/gui/editors/notation/NotationVLayout.cpp | 6 | ||||
-rw-r--r-- | src/gui/editors/notation/NotationVLayout.h | 8 | ||||
-rw-r--r-- | src/gui/editors/notation/NotationView.cpp | 158 | ||||
-rw-r--r-- | src/gui/editors/notation/NotationView.h | 38 |
10 files changed, 139 insertions, 139 deletions
diff --git a/src/gui/editors/notation/NotationElement.h b/src/gui/editors/notation/NotationElement.h index 6dfad3d..2bb036f 100644 --- a/src/gui/editors/notation/NotationElement.h +++ b/src/gui/editors/notation/NotationElement.h @@ -43,7 +43,7 @@ class Event; /** - * The Notation H and V tqlayout is performed on a + * The Notation H and V layout is performed on a * NotationElementList. Once this is done, each NotationElement is * affected a TQCanvasItem which is set at these coords. * @@ -82,7 +82,7 @@ public: * Sets the X coordinate and width of the space "underneath" * this element, i.e. the extents within which a mouse click * or some such might be considered to be interested in this - * element as opposed to any other. These are tqlayout coords + * element as opposed to any other. These are layout coords */ void setLayoutAirspace(double x, double width) { m_airX = x; m_airWidth = width; diff --git a/src/gui/editors/notation/NotationGroup.h b/src/gui/editors/notation/NotationGroup.h index 9906747..c7b1134 100644 --- a/src/gui/editors/notation/NotationGroup.h +++ b/src/gui/editors/notation/NotationGroup.h @@ -73,13 +73,13 @@ public: /** * Writes the BEAMED, BEAM_ABOVE, and STEM_UP properties into the - * notes in the group, as appropriate. Does not require tqlayout x + * notes in the group, as appropriate. Does not require layout x * coordinates to have been set. */ void applyStemProperties(); /** - * Writes beam data into each note in the group. Notes' tqlayout x + * Writes beam data into each note in the group. Notes' layout x * coordinates must already have been set. Does not require * applyStemProperties to have already been called. */ @@ -87,7 +87,7 @@ public: /** * Writes tupling line data into each note in the group. Notes' - * tqlayout x coordinates must already have been set. Does nothing + * layout x coordinates must already have been set. Does nothing * if this is not a tupled group. */ void applyTuplingLine(NotationStaff &); diff --git a/src/gui/editors/notation/NotationHLayout.cpp b/src/gui/editors/notation/NotationHLayout.cpp index e971521..4d891a6 100644 --- a/src/gui/editors/notation/NotationHLayout.cpp +++ b/src/gui/editors/notation/NotationHLayout.cpp @@ -1230,15 +1230,15 @@ NotationHLayout::finishLayout(timeT startTime, timeT endTime) m_timePerProgressIncrement = timeCovered / (100 / m_barData.size()); - tqlayout(i, startTime, endTime); + layout(i, startTime, endTime); ++staffNo; } } void -NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime) +NotationHLayout::layout(BarDataMap::iterator i, timeT startTime, timeT endTime) { - Profiler profiler("NotationHLayout::tqlayout"); + Profiler profiler("NotationHLayout::layout"); Staff &staff = *(i->first); NotationElementList *notes = staff.getViewElementList(); @@ -1251,7 +1251,7 @@ NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime // bool haveSimpleOffset = false; // double simpleOffset = 0; - NOTATION_DEBUG << "NotationHLayout::tqlayout: full tqlayout " << isFullLayout << ", times " << startTime << "->" << endTime << endl; + NOTATION_DEBUG << "NotationHLayout::layout: full layout " << isFullLayout << ", times " << startTime << "->" << endTime << endl; double x = 0, barX = 0; TieMap tieMap; @@ -1287,7 +1287,7 @@ NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime NotationElementList::iterator from = bdi->second.basicData.start; NotationElementList::iterator to; - NOTATION_DEBUG << "NotationHLayout::tqlayout(): starting bar " << barNo << ", x = " << barX << ", width = " << bdi->second.sizeData.idealWidth << ", time = " << (from == notes->end() ? -1 : (*from)->getViewAbsoluteTime()) << endl; + NOTATION_DEBUG << "NotationHLayout::layout(): 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()) { @@ -1307,10 +1307,10 @@ NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime double offset = barX - bdi->second.layoutData.x; - NOTATION_DEBUG << "NotationHLayout::tqlayout(): bar " << barNo << " has needsLayout false and offset of " << offset << endl; + NOTATION_DEBUG << "NotationHLayout::layout(): bar " << barNo << " has needsLayout false and offset of " << offset << endl; if (offset > -0.1 && offset < 0.1) { - NOTATION_DEBUG << "NotationHLayout::tqlayout(): no offset, ignoring" << endl; + NOTATION_DEBUG << "NotationHLayout::layout(): no offset, ignoring" << endl; continue; } @@ -1323,7 +1323,7 @@ NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime it != to && it != notes->end(); ++it) { NotationElement* nel = static_cast<NotationElement*>(*it); - NOTATION_DEBUG << "NotationHLayout::tqlayout(): shifting element's x to " << ((*it)->getLayoutX() + offset) << " (was " << (*it)->getLayoutX() << ")" << endl; + NOTATION_DEBUG << "NotationHLayout::layout(): shifting element's x to " << ((*it)->getLayoutX() + offset) << " (was " << (*it)->getLayoutX() << ")" << endl; nel->setLayoutX((*it)->getLayoutX() + offset); double airX, airWidth; nel->getLayoutAirspace(airX, airWidth); @@ -1342,7 +1342,7 @@ NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime timeSigToPlace = !bdi->second.basicData.timeSignature.isHidden(); } if (timeSigToPlace) { - NOTATION_DEBUG << "NotationHLayout::tqlayout(): there's a time sig in this bar" << endl; + NOTATION_DEBUG << "NotationHLayout::layout(): there's a time sig in this bar" << endl; } bool repeatClefAndKey = false; @@ -1350,7 +1350,7 @@ NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime repeatClefAndKey = true; } if (repeatClefAndKey) { - NOTATION_DEBUG << "NotationHLayout::tqlayout(): need to repeat clef & key in this bar" << endl; + NOTATION_DEBUG << "NotationHLayout::layout(): need to repeat clef & key in this bar" << endl; } double barInset = notationStaff.getBarInset(barNo, repeatClefAndKey); @@ -1467,7 +1467,7 @@ NotationHLayout::tqlayout(BarDataMap::iterator i, timeT startTime, timeT endTime } } - NOTATION_DEBUG << "NotationHLayout::tqlayout(): setting element's x to " << x << " (was " << el->getLayoutX() << ")" << endl; + NOTATION_DEBUG << "NotationHLayout::layout(): setting element's x to " << x << " (was " << el->getLayoutX() << ")" << endl; double displacedX = 0.0; long dxRaw = 0; @@ -1692,7 +1692,7 @@ NotationHLayout::positionChord(Staff &staff, barEndsInChord = true; // #704958 (multiple tuplet spanners created when entering - // triplet chord) -- tqlayout() updates the beamed group data + // triplet chord) -- layout() 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); diff --git a/src/gui/editors/notation/NotationHLayout.h b/src/gui/editors/notation/NotationHLayout.h index 07cf25e..878dc17 100644 --- a/src/gui/editors/notation/NotationHLayout.h +++ b/src/gui/editors/notation/NotationHLayout.h @@ -56,7 +56,7 @@ class AccidentalTable; /** - * Horizontal notation tqlayout + * Horizontal notation layout * * computes the X coordinates of notation elements */ @@ -77,9 +77,9 @@ public: } /** - * Precomputes tqlayout data for a single staff. The resulting data + * Precomputes layout data for a single staff. The resulting data * is stored in the BarDataMap, keyed from the staff reference; - * the entire map is then used by reconcileBars() and tqlayout(). + * the entire map is then used by reconcileBars() and layout(). * The map should be cleared (by calling reset()) before a full * set of staffs is preparsed. */ @@ -167,7 +167,7 @@ public: static std::vector<int> getAvailableProportions(); /** - * Returns the total length of all elements once tqlayout is done + * Returns the total length of all elements once layout is done * This is the x-coord of the end of the last element on the longest * staff, plus the space allocated to that element */ @@ -211,7 +211,7 @@ public: * Returns the X coord corresponding to the given time value. * This RulerScale method works by interpolating between bar lines * (the inverse of the way getTimeForX works), and should be used - * for any rulers associated with the tqlayout. + * for any rulers associated with the layout. */ virtual double getXForTime(timeT time) const; @@ -286,7 +286,7 @@ protected: } sizeData; struct LayoutData - { // slots either assumed, or only known at tqlayout time + { // slots either assumed, or only known at layout time bool needsLayout; double x; // coordinate for display of barline int timeSigX; @@ -360,7 +360,7 @@ protected: /// Tries to harmonize the bar positions for all the staves (page mode) void reconcileBarsPage(); - void tqlayout(BarDataMap::iterator, + void layout(BarDataMap::iterator, timeT startTime, timeT endTime); diff --git a/src/gui/editors/notation/NotationStaff.cpp b/src/gui/editors/notation/NotationStaff.cpp index 37fd03f..1baa33c 100644 --- a/src/gui/editors/notation/NotationStaff.cpp +++ b/src/gui/editors/notation/NotationStaff.cpp @@ -379,7 +379,7 @@ NotationStaff::getClosestElementToLayoutX(double x, return notes->end(); } - NOTATION_DEBUG << "NotationStaff::getClosestElementToLayoutX: found element at tqlayout " << (*result)->getLayoutX() << " - we're at tqlayout " << x << endl; + NOTATION_DEBUG << "NotationStaff::getClosestElementToLayoutX: found element at layout " << (*result)->getLayoutX() << " - we're at layout " << x << endl; PRINT_ELAPSED("NotationStaff::getClosestElementToLayoutX"); diff --git a/src/gui/editors/notation/NotationStaff.h b/src/gui/editors/notation/NotationStaff.h index 783e3db..f58e77d 100644 --- a/src/gui/editors/notation/NotationStaff.h +++ b/src/gui/editors/notation/NotationStaff.h @@ -136,14 +136,14 @@ public: /** * Assign suitable coordinates to the elements on the staff, - * based entirely on the tqlayout X and Y coordinates they were - * given by the horizontal and vertical tqlayout processes. + * based entirely on the layout X and Y coordinates they were + * given by the horizontal and vertical layout processes. * * This is necessary because the sprites that are being positioned - * may have been created either after the tqlayout process completed + * may have been created either after the layout process completed * (by renderElements) or before (by the previous renderElements * call, if the sprites are unchanged but have moved) -- so - * neither the tqlayout nor renderElements can authoritatively set + * neither the layout nor renderElements can authoritatively set * their final positions. * * This method also updates the selected-ness of any elements it @@ -197,7 +197,7 @@ public: * elements). Pass movedOnly as true to indicate that elements * have not changed but only been repositioned, for example as a * consequence of a modification on another staff that caused a - * retqlayout. + * relayout. */ virtual void markChanged(timeT from = 0, timeT to = 0, @@ -270,7 +270,7 @@ public: Accidentals::NoAccidental) const; /** - * Find the NotationElement whose tqlayout x-coord is closest to x, + * Find the NotationElement whose layout x-coord is closest to x, * without regard to its y-coord. * * If notesAndRestsOnly is true, will return the closest note @@ -289,7 +289,7 @@ public: int proximityThreshold = 10); /** - * Find the NotationElement "under" the given tqlayout x-coord, + * Find the NotationElement "under" the given layout x-coord, * without regard to its y-coord. * * Also returns the clef and key in force at the given coordinates. @@ -396,7 +396,7 @@ protected: * Returns true if the item at the given iterator appears to have * moved horizontally without the spacing around it changing. * - * In practice, calculates the offset between the intended tqlayout + * In practice, calculates the offset between the intended layout * and current canvas coordinates of the item at the given * iterator, and returns true if this offset is equal to those of * all other following iterators at the same time as well as the @@ -412,7 +412,7 @@ protected: /** * Prepare a painter to draw an object of logical width w at - * tqlayout-x coord x, starting at offset dx into the object, by + * layout-x coord x, starting at offset dx into the object, by * setting the painter's clipping so as to crop the object at the * right edge of the row if it would otherwise overrun. The * return value is the amount of the object visible on this row diff --git a/src/gui/editors/notation/NotationVLayout.cpp b/src/gui/editors/notation/NotationVLayout.cpp index af5b0bb..5afaa4a 100644 --- a/src/gui/editors/notation/NotationVLayout.cpp +++ b/src/gui/editors/notation/NotationVLayout.cpp @@ -249,7 +249,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) bool hasShifted = chord.hasNoteHeadShifted(); - double y0 = -1E50; // A very unlikely Y tqlayout value + double y0 = -1E50; // A very unlikely Y layout value for (unsigned int j = 0; j < chord.size(); ++j) { @@ -269,7 +269,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) // These calculations and assignments are pretty much final // if the chord is not in a beamed group, but if it is then // they will be reworked by NotationGroup::applyBeam, which - // is called from NotationHLayout::tqlayout, which is called + // is called from NotationHLayout::layout, which is called // after this. Any inaccuracies here for beamed groups // should be stamped out there. @@ -342,7 +342,7 @@ NotationVLayout::scanStaff(Staff &staffBase, timeT, timeT) // Not optimal, as we can end up scanning the chord // multiple times (we'll return to it after scanning the // contained note). [We can't just iterate over all - // elements within the chord (as we can in htqlayout) + // elements within the chord (as we can in hlayout) // because we need them in height order.] i = chord.getFirstElementNotInChord(); diff --git a/src/gui/editors/notation/NotationVLayout.h b/src/gui/editors/notation/NotationVLayout.h index b69c06c..2e718c7 100644 --- a/src/gui/editors/notation/NotationVLayout.h +++ b/src/gui/editors/notation/NotationVLayout.h @@ -52,7 +52,7 @@ class Composition; /** - * Vertical notation tqlayout + * Vertical notation layout * * computes the Y coordinate of notation elements */ @@ -91,9 +91,9 @@ public: timeT = 0); /** - * Do any tqlayout dependent on more than one staff. As it - * happens, we have none, but we do have some tqlayout that - * depends on the final results from the horizontal tqlayout + * Do any layout dependent on more than one staff. As it + * happens, we have none, but we do have some layout that + * depends on the final results from the horizontal layout * (for slurs), so we should do that here */ virtual void finishLayout(timeT = 0, diff --git a/src/gui/editors/notation/NotationView.cpp b/src/gui/editors/notation/NotationView.cpp index ece3e36..a9bfc4c 100644 --- a/src/gui/editors/notation/NotationView.cpp +++ b/src/gui/editors/notation/NotationView.cpp @@ -372,9 +372,9 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_pageMode(LinedStaff::LinearMode), m_leftGutter(20), m_notePixmapFactory(new NotePixmapFactory(m_fontName, m_fontSize)), - m_htqlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, + m_hlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, m_properties, TQT_TQOBJECT(this))), - m_vtqlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, + m_vlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, m_properties, TQT_TQOBJECT(this))), m_chordNameRuler(0), m_tempoRuler(0), @@ -409,7 +409,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Initialise the display-related defaults that will be needed - // by both the actions and the tqlayout toolbar + // by both the actions and the layout toolbar m_config->setGroup(NotationViewConfigGroup); @@ -435,15 +435,15 @@ NotationView::NotationView(RosegardenGUIDoc *doc, NoteFontFactory::getDefaultSize(m_fontName)); int defaultSpacing = m_config->readNumEntry("spacing", 100); - m_htqlayout->setSpacing(defaultSpacing); + m_hlayout->setSpacing(defaultSpacing); int defaultProportion = m_config->readNumEntry("proportion", 60); - m_htqlayout->setProportion(defaultProportion); + m_hlayout->setProportion(defaultProportion); delete m_notePixmapFactory; m_notePixmapFactory = new NotePixmapFactory(m_fontName, m_fontSize); - m_htqlayout->setNotePixmapFactory(m_notePixmapFactory); - m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory); + m_hlayout->setNotePixmapFactory(m_notePixmapFactory); + m_vlayout->setNotePixmapFactory(m_notePixmapFactory); setupActions(); // setupAddControlRulerMenu(); - too early for notation, moved to end of ctor. @@ -460,19 +460,19 @@ NotationView::NotationView(RosegardenGUIDoc *doc, updateViewCaption(); m_chordNameRuler = new ChordNameRuler - (m_htqlayout, doc, segments, m_leftGutter, 20, getCentralWidget()); + (m_hlayout, doc, segments, m_leftGutter, 20, getCentralWidget()); addRuler(m_chordNameRuler); if (showProgressive) m_chordNameRuler->show(); m_tempoRuler = new TempoRuler - (m_htqlayout, doc, this, m_leftGutter, 24, false, getCentralWidget()); + (m_hlayout, doc, this, m_leftGutter, 24, false, getCentralWidget()); addRuler(m_tempoRuler); m_tempoRuler->hide(); static_cast<TempoRuler *>(m_tempoRuler)->connectSignals(); m_rawNoteRuler = new RawNoteRuler - (m_htqlayout, segments[0], m_leftGutter, 20, getCentralWidget()); + (m_hlayout, segments[0], m_leftGutter, 20, getCentralWidget()); addRuler(m_rawNoteRuler); m_rawNoteRuler->show(); @@ -484,7 +484,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, readOptions(); - setBottomStandardRuler(new StandardRuler(getDocument(), m_htqlayout, m_leftGutter, 25, + setBottomStandardRuler(new StandardRuler(getDocument(), m_hlayout, m_leftGutter, 25, true, getBottomWidget())); for (unsigned int i = 0; i < segments.size(); ++i) @@ -506,7 +506,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_canvasView->setLeftFixedWidget(m_headersGroupView); // Add a close button just above the track headers. - // The grid tqlayout is only here to maintain the button in a + // The grid layout is only here to maintain the button in a // right place m_headersTopFrame = new TQFrame(getCentralWidget()); TQGridLayout * headersTopGrid @@ -522,7 +522,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, TQToolTip::add(hideHeadersButton, i18n("Close track headers")); headersTopGrid->setMargin(4); setTopStandardRuler(new StandardRuler(getDocument(), - m_htqlayout, m_leftGutter, 25, + m_hlayout, m_leftGutter, 25, false, getCentralWidget()), m_headersTopFrame); m_topStandardRuler->getLoopRuler()->setBackgroundColor @@ -544,7 +544,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // - // tqlayout + // layout // ProgressDialog* progressDlg = 0; @@ -594,7 +594,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, } catch (ProgressReporter::Cancelled c) { // when cancelled, m_ok is false -- checked by calling method - NOTATION_DEBUG << "NotationView ctor : tqlayout Cancelled" << endl; + NOTATION_DEBUG << "NotationView ctor : layout Cancelled" << endl; } NOTATION_DEBUG << "NotationView ctor : m_ok = " << m_ok << endl; @@ -817,9 +817,9 @@ NotationView::NotationView(RosegardenGUIDoc *doc, m_pageMode(LinedStaff::LinearMode), m_leftGutter(0), m_notePixmapFactory(new NotePixmapFactory(m_fontName, m_fontSize)), - m_htqlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, + m_hlayout(new NotationHLayout(&doc->getComposition(), m_notePixmapFactory, m_properties, TQT_TQOBJECT(this))), - m_vtqlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, + m_vlayout(new NotationVLayout(&doc->getComposition(), m_notePixmapFactory, m_properties, TQT_TQOBJECT(this))), m_chordNameRuler(0), m_tempoRuler(0), @@ -850,7 +850,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, // Initialise the display-related defaults that will be needed - // by both the actions and the tqlayout toolbar + // by both the actions and the layout toolbar m_config->setGroup(NotationViewConfigGroup); @@ -871,20 +871,20 @@ NotationView::NotationView(RosegardenGUIDoc *doc, if (referenceView) { - m_htqlayout->setSpacing(referenceView->m_htqlayout->getSpacing()); - m_htqlayout->setProportion(referenceView->m_htqlayout->getProportion()); + m_hlayout->setSpacing(referenceView->m_hlayout->getSpacing()); + m_hlayout->setProportion(referenceView->m_hlayout->getProportion()); } else { int defaultSpacing = m_config->readNumEntry("spacing", 100); - m_htqlayout->setSpacing(defaultSpacing); + m_hlayout->setSpacing(defaultSpacing); int defaultProportion = m_config->readNumEntry("proportion", 60); - m_htqlayout->setProportion(defaultProportion); + m_hlayout->setProportion(defaultProportion); } delete m_notePixmapFactory; m_notePixmapFactory = new NotePixmapFactory(m_fontName, m_fontSize); - m_htqlayout->setNotePixmapFactory(m_notePixmapFactory); - m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory); + m_hlayout->setNotePixmapFactory(m_notePixmapFactory); + m_vlayout->setNotePixmapFactory(m_notePixmapFactory); setBackgroundMode(PaletteBase); m_config->setGroup(NotationViewConfigGroup); @@ -939,7 +939,7 @@ NotationView::NotationView(RosegardenGUIDoc *doc, } catch (ProgressReporter::Cancelled c) { // when cancelled, m_ok is false -- checked by calling method - NOTATION_DEBUG << "NotationView ctor : tqlayout Cancelled" << endl; + NOTATION_DEBUG << "NotationView ctor : layout Cancelled" << endl; } NOTATION_DEBUG << "NotationView ctor : m_ok = " << m_ok << endl; @@ -1223,7 +1223,7 @@ void NotationView::positionStaffs() } } - m_htqlayout->setPageWidth(pageWidth - leftMargin * 2); + m_hlayout->setPageWidth(pageWidth - leftMargin * 2); int topGutter = 0; @@ -1549,7 +1549,7 @@ void NotationView::setupActions() KActionMenu *spacingActionMenu = new KActionMenu(i18n("S&pacing"), TQT_TQOBJECT(this), "stretch_actionmenu"); - int defaultSpacing = m_htqlayout->getSpacing(); + int defaultSpacing = m_hlayout->getSpacing(); std::vector<int> spacings = NotationHLayout::getAvailableSpacings(); for (std::vector<int>::iterator i = spacings.begin(); @@ -1571,7 +1571,7 @@ void NotationView::setupActions() KActionMenu *proportionActionMenu = new KActionMenu(i18n("Du&ration Factor"), TQT_TQOBJECT(this), "proportion_actionmenu"); - int defaultProportion = m_htqlayout->getProportion(); + int defaultProportion = m_hlayout->getProportion(); std::vector<int> proportions = NotationHLayout::getAvailableProportions(); for (std::vector<int>::iterator i = proportions.begin(); @@ -1820,7 +1820,7 @@ void NotationView::setupActions() TQString pixmapDir = KGlobal::dirs()->findResource("appdata", "pixmaps/"); - TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-tqlayout.xpm"); + TQCanvasPixmap pixmap(pixmapDir + "/toolbar/linear-layout.xpm"); icon = TQIconSet(pixmap); KRadioAction *linearModeAction = new KRadioAction (i18n("&Linear Layout"), icon, 0, TQT_TQOBJECT(this), TQT_SLOT(slotLinearMode()), @@ -2611,7 +2611,7 @@ void NotationView::initLayoutToolbar() if (!layoutToolbar) { std::cerr - << "NotationView::initLayoutToolbar() : tqlayout toolbar not found" + << "NotationView::initLayoutToolbar() : layout toolbar not found" << std::endl; return ; } @@ -2679,7 +2679,7 @@ void NotationView::initLayoutToolbar() // // spacing combo // - int defaultSpacing = m_htqlayout->getSpacing(); + int defaultSpacing = m_hlayout->getSpacing(); std::vector<int> spacings = NotationHLayout::getAvailableSpacings(); m_spacingCombo = new KComboBox(layoutToolbar, "spacing combo"); @@ -2786,17 +2786,17 @@ NotationView::setPageMode(LinedStaff::PageMode pageMode) int topMargin = 0, leftMargin = 0; getPageMargins(leftMargin, topMargin); - m_htqlayout->setPageMode(pageMode != LinedStaff::LinearMode); - m_htqlayout->setPageWidth(pageWidth - leftMargin * 2); + m_hlayout->setPageMode(pageMode != LinedStaff::LinearMode); + m_hlayout->setPageWidth(pageWidth - leftMargin * 2); - NOTATION_DEBUG << "NotationView::setPageMode: set tqlayout's page width to " + NOTATION_DEBUG << "NotationView::setPageMode: set layout's page width to " << (pageWidth - leftMargin * 2) << endl; positionStaffs(); bool layoutApplied = applyLayout(); if (!layoutApplied) - KMessageBox::sorry(0, "Couldn't apply tqlayout"); + KMessageBox::sorry(0, "Couldn't apply layout"); else { for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->markChanged(); @@ -2894,7 +2894,7 @@ void NotationView::scrollToTime(timeT t) { - double notationViewLayoutCoord = m_htqlayout->getXForTime(t); + double notationViewLayoutCoord = m_hlayout->getXForTime(t); // Doesn't appear to matter which staff we use //!!! actually it probably does matter, if they don't have the same extents @@ -2912,7 +2912,7 @@ NotationView::scrollToTime(timeT t) RulerScale* NotationView::getHLayout() { - return m_htqlayout; + return m_hlayout; } void @@ -2948,8 +2948,8 @@ NotationView::paintEvent(TQPaintEvent *e) getPageMargins(leftMargin, topMargin); if (m_pageMode == LinedStaff::ContinuousPageMode) { - // retqlayout if the window width changes significantly in continuous page mode - int diff = int(getPageWidth() - leftMargin * 2 - m_htqlayout->getPageWidth()); + // relayout if the window width changes significantly in continuous page mode + int diff = int(getPageWidth() - leftMargin * 2 - m_hlayout->getPageWidth()); if (diff < -10 || diff > 10) { setPageMode(m_pageMode); refreshSegment(0, 0, 0); @@ -2998,7 +2998,7 @@ bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime) slotSetOperationNameAndStatus(i18n("Laying out score...")); ProgressDialog::processEvents(); - m_htqlayout->setStaffCount(m_staffs.size()); + m_hlayout->setStaffCount(m_staffs.size()); Profiler profiler("NotationView::applyLayout"); unsigned int i; @@ -3011,17 +3011,17 @@ bool NotationView::applyLayout(int staffNo, timeT startTime, timeT endTime) slotSetOperationNameAndStatus(i18n("Laying out staff %1...").arg(i + 1)); ProgressDialog::processEvents(); - m_htqlayout->resetStaff(*m_staffs[i], startTime, endTime); - m_vtqlayout->resetStaff(*m_staffs[i], startTime, endTime); - m_htqlayout->scanStaff(*m_staffs[i], startTime, endTime); - m_vtqlayout->scanStaff(*m_staffs[i], startTime, endTime); + m_hlayout->resetStaff(*m_staffs[i], startTime, endTime); + m_vlayout->resetStaff(*m_staffs[i], startTime, endTime); + m_hlayout->scanStaff(*m_staffs[i], startTime, endTime); + m_vlayout->scanStaff(*m_staffs[i], startTime, endTime); } slotSetOperationNameAndStatus(i18n("Reconciling staffs...")); ProgressDialog::processEvents(); - m_htqlayout->finishLayout(startTime, endTime); - m_vtqlayout->finishLayout(startTime, endTime); + m_hlayout->finishLayout(startTime, endTime); + m_vlayout->finishLayout(startTime, endTime); // find the last finishing staff for future use @@ -3349,10 +3349,10 @@ void NotationView::setNotePixmapFactory(NotePixmapFactory* f) { delete m_notePixmapFactory; m_notePixmapFactory = f; - if (m_htqlayout) - m_htqlayout->setNotePixmapFactory(m_notePixmapFactory); - if (m_vtqlayout) - m_vtqlayout->setNotePixmapFactory(m_notePixmapFactory); + if (m_hlayout) + m_hlayout->setNotePixmapFactory(m_notePixmapFactory); + if (m_vlayout) + m_vlayout->setNotePixmapFactory(m_notePixmapFactory); } Segment * @@ -3469,7 +3469,7 @@ NotationView::getStaffForCanvasCoords(int x, int y) const LinedStaff::LinedStaffCoords coords = s->getLayoutCoordsForCanvasCoords(x, y); - timeT t = m_htqlayout->getTimeForX(coords.first); + timeT t = m_hlayout->getTimeForX(coords.first); // In order to find the correct starting and ending bar of the segment, // make infinitesimal shifts (+1 and -1) towards its center. timeT t0 = getDocument()->getComposition().getBarStartForTime(m_staffs[m_currentStaff]->getSegment().getStartTime()+1); @@ -3488,7 +3488,7 @@ NotationView::getStaffForCanvasCoords(int x, int y) const LinedStaff::LinedStaffCoords coords = s->getLayoutCoordsForCanvasCoords(x, y); - timeT t = m_htqlayout->getTimeForX(coords.first); + timeT t = m_hlayout->getTimeForX(coords.first); // In order to find the correct starting and ending bar of the segment, // make infinitesimal shifts (+1 and -1) towards its center. timeT t0 = getDocument()->getComposition().getBarStartForTime(m_staffs[i]->getSegment().getStartTime()+1); @@ -3589,8 +3589,8 @@ void NotationView::print(bool previewOnly) LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords (pageRect.x() + pageRect.width(), pageRect.y() + pageRect.height()); - timeT t0 = m_htqlayout->getTimeForX(cc0.first); - timeT t1 = m_htqlayout->getTimeForX(cc1.first); + timeT t0 = m_hlayout->getTimeForX(cc0.first); + timeT t1 = m_hlayout->getTimeForX(cc1.first); m_staffs[i]->setPrintPainter(&printpainter); m_staffs[i]->checkRendered(t0, t1); @@ -3629,8 +3629,8 @@ void NotationView::print(bool previewOnly) LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords (pageRect.x() + pageRect.width(), pageRect.y() + pageRect.height()); - timeT t0 = m_htqlayout->getTimeForX(cc0.first); - timeT t1 = m_htqlayout->getTimeForX(cc1.first); + timeT t0 = m_hlayout->getTimeForX(cc0.first); + timeT t1 = m_hlayout->getTimeForX(cc1.first); m_staffs[i]->renderPrintable(t0, t1); } @@ -3886,7 +3886,7 @@ void NotationView::readjustCanvasSize() LinedStaff &staff = *m_staffs[i]; - staff.sizeStaff(*m_htqlayout); + staff.sizeStaff(*m_hlayout); UPDATE_PROGRESS(1); if (staff.getTotalWidth() + staff.getX() > maxWidth) { @@ -4110,10 +4110,10 @@ void NotationView::setupProgress(KProgress* bar) if (bar) { NOTATION_DEBUG << "NotationView::setupProgress(bar)\n"; - connect(m_htqlayout, TQT_SIGNAL(setProgress(int)), + connect(m_hlayout, TQT_SIGNAL(setProgress(int)), bar, TQT_SLOT(setValue(int))); - connect(m_htqlayout, TQT_SIGNAL(incrementProgress(int)), + connect(m_hlayout, TQT_SIGNAL(incrementProgress(int)), bar, TQT_SLOT(advance(int))); connect(this, TQT_SIGNAL(setProgress(int)), @@ -4142,7 +4142,7 @@ void NotationView::setupProgress(ProgressDialog* dialog) setupProgress(dialog->progressBar()); connect(dialog, TQT_SIGNAL(cancelClicked()), - m_htqlayout, TQT_SLOT(slotCancel())); + m_hlayout, TQT_SLOT(slotCancel())); for (unsigned int i = 0; i < m_staffs.size(); ++i) { connect(m_staffs[i], TQT_SIGNAL(setOperationName(TQString)), @@ -4170,7 +4170,7 @@ void NotationView::disconnectProgress() { NOTATION_DEBUG << "NotationView::disconnectProgress()" << endl; - m_htqlayout->disconnect(); + m_hlayout->disconnect(); disconnect(TQT_SIGNAL(setProgress(int))); disconnect(TQT_SIGNAL(incrementProgress(int))); disconnect(TQT_SIGNAL(setOperationName(TQString))); @@ -4324,10 +4324,10 @@ NotationView::slotChangeSpacingFromAction() void NotationView::slotChangeSpacing(int spacing) { - if (m_htqlayout->getSpacing() == spacing) + if (m_hlayout->getSpacing() == spacing) return ; - m_htqlayout->setSpacing(spacing); + m_hlayout->setSpacing(spacing); // m_spacingSlider->setSize(spacing); @@ -4357,7 +4357,7 @@ NotationView::slotChangeSpacing(int spacing) void NotationView::slotChangeProportionFromIndex(int n) { - std::vector<int> proportions = m_htqlayout->getAvailableProportions(); + std::vector<int> proportions = m_hlayout->getAvailableProportions(); if (n >= (int)proportions.size()) n = proportions.size() - 1; slotChangeProportion(proportions[n]); @@ -4382,10 +4382,10 @@ NotationView::slotChangeProportionFromAction() void NotationView::slotChangeProportion(int proportion) { - if (m_htqlayout->getProportion() == proportion) + if (m_hlayout->getProportion() == proportion) return ; - m_htqlayout->setProportion(proportion); + m_hlayout->setProportion(proportion); // m_proportionSlider->setSize(proportion); @@ -4581,7 +4581,7 @@ NotationView::slotChangeFont(std::string newName, int newSize) int topMargin = 0, leftMargin = 0; getPageMargins(leftMargin, topMargin); - m_htqlayout->setPageWidth(pageWidth - leftMargin * 2); + m_hlayout->setPageWidth(pageWidth - leftMargin * 2); } for (unsigned int i = 0; i < m_staffs.size(); ++i) { @@ -4594,7 +4594,7 @@ NotationView::slotChangeFont(std::string newName, int newSize) bool layoutApplied = applyLayout(); if (!layoutApplied) - KMessageBox::sorry(0, "Couldn't apply tqlayout"); + KMessageBox::sorry(0, "Couldn't apply layout"); else { for (unsigned int i = 0; i < m_staffs.size(); ++i) { m_staffs[i]->markChanged(); @@ -6438,22 +6438,22 @@ NotationView::slotSetPointerPosition(timeT time, bool scroll) for (unsigned int i = 0; i < m_staffs.size(); ++i) { - double layoutX = m_htqlayout->getXForTimeByEvent(time); + double layoutX = m_hlayout->getXForTimeByEvent(time); Segment &seg = m_staffs[i]->getSegment(); bool good = true; - if (barNo >= m_htqlayout->getLastVisibleBarOnStaff(*m_staffs[i])) { + if (barNo >= m_hlayout->getLastVisibleBarOnStaff(*m_staffs[i])) { if (seg.isRepeating() && time < seg.getRepeatEndTime()) { timeT mappedTime = seg.getStartTime() + ((time - seg.getStartTime()) % (seg.getEndMarkerTime() - seg.getStartTime())); - layoutX = m_htqlayout->getXForTimeByEvent(mappedTime); + layoutX = m_hlayout->getXForTimeByEvent(mappedTime); } else { good = false; } - } else if (barNo < m_htqlayout->getFirstVisibleBarOnStaff(*m_staffs[i])) { + } else if (barNo < m_hlayout->getFirstVisibleBarOnStaff(*m_staffs[i])) { good = false; } @@ -6750,7 +6750,7 @@ NotationView::doDeferredCursorMove() t == segment.getEndTime() || t == segment.getBarStartForTime(t)) { - staff->setInsertCursorPosition(*m_htqlayout, t); + staff->setInsertCursorPosition(*m_hlayout, t); if (type == CursorMoveAndMakeVisible) { double cx; @@ -6976,21 +6976,21 @@ void NotationView::slotMultiPageMode() void NotationView::slotToggleChordsRuler() { - if (m_htqlayout->isPageMode()) + if (m_hlayout->isPageMode()) return ; toggleWidget(m_chordNameRuler, "show_chords_ruler"); } void NotationView::slotToggleRawNoteRuler() { - if (m_htqlayout->isPageMode()) + if (m_hlayout->isPageMode()) return ; toggleWidget(m_rawNoteRuler, "show_raw_note_ruler"); } void NotationView::slotToggleTempoRuler() { - if (m_htqlayout->isPageMode()) + if (m_hlayout->isPageMode()) return ; toggleWidget(m_tempoRuler, "show_tempo_ruler"); } @@ -7116,7 +7116,7 @@ void NotationView::slotNonNotationItemPressed(TQMouseEvent *e, TQCanvasItem *it) } else if (dynamic_cast<TQCanvasTimeSigSprite *>(it)) { double layoutX = (dynamic_cast<TQCanvasTimeSigSprite *>(it))->getLayoutX(); - emit editTimeSignature(m_htqlayout->getTimeForX(layoutX)); + emit editTimeSignature(m_hlayout->getTimeForX(layoutX)); } } @@ -7396,8 +7396,8 @@ NotationView::slotCheckRendered(double cx0, double cx1) LinedStaff::LinedStaffCoords cc1 = staff->getLayoutCoordsForCanvasCoords (cx1, staff->getTotalHeight() + staff->getY()); - timeT t0 = m_htqlayout->getTimeForX(cc0.first); - timeT t1 = m_htqlayout->getTimeForX(cc1.first); + timeT t0 = m_hlayout->getTimeForX(cc0.first); + timeT t1 = m_hlayout->getTimeForX(cc1.first); if (dynamic_cast<NotationStaff *>(staff)->checkRendered(t0, t1)) { something = true; //!!! diff --git a/src/gui/editors/notation/NotationView.h b/src/gui/editors/notation/NotationView.h index 939cf72..ac8f58c 100644 --- a/src/gui/editors/notation/NotationView.h +++ b/src/gui/editors/notation/NotationView.h @@ -274,13 +274,13 @@ public: /// Sound the given note void playNote(Segment &segment, int pitch, int velocity = -1); - /// Switches between page- and linear- tqlayout modes + /// Switches between page- and linear- layout modes void setPageMode(LinedStaff::PageMode mode); - /// Returns the page width according to the tqlayout mode (page/linear) + /// Returns the page width according to the layout mode (page/linear) int getPageWidth(); - /// Returns the page height according to the tqlayout mode (page/linear) + /// Returns the page height according to the layout mode (page/linear) int getPageHeight(); /// Returns the margins within the page (zero if not in MultiPageMode) @@ -310,7 +310,7 @@ public: /** * Render segments on printing painter. This uses the current - * font size and tqlayout, rather than the optimal ones for the + * font size and layout, rather than the optimal ones for the * printer configuration (notation editing is not quite WYSIWYG, * and we may be in a non-page mode). * @@ -446,7 +446,7 @@ public slots: void slotToggleGroupToolBar(); /** - * toggles the tqlayout toolbar + * toggles the layout toolbar */ void slotToggleLayoutToolBar(); @@ -773,22 +773,22 @@ public slots: /// Changes to the next font size down void slotZoomOut(); - /// Changes the htqlayout spacing of the staffs on the view + /// Changes the hlayout spacing of the staffs on the view void slotChangeSpacing(int newSpacing); - /// Changes the htqlayout spacing of the staffs on the view + /// Changes the hlayout spacing of the staffs on the view void slotChangeSpacingFromStringValue(const TQString&); - /// Changes the htqlayout spacing of the staffs on the view + /// Changes the hlayout spacing of the staffs on the view void slotChangeSpacingFromAction(); - /// Changes the htqlayout proportion of the staffs on the view + /// Changes the hlayout proportion of the staffs on the view void slotChangeProportion(int newProportion); - /// Changes the htqlayout proportion of the staffs on the view + /// Changes the hlayout proportion of the staffs on the view void slotChangeProportionFromIndex(int newProportionIndex); - /// Changes the htqlayout proportion of the staffs on the view + /// Changes the hlayout proportion of the staffs on the view void slotChangeProportionFromAction(); /// Note-on received asynchronously -- consider step-by-step editing @@ -912,13 +912,13 @@ protected: virtual void initStatusBar(); /** - * Place the staffs at the correct x & y coordinates (before tqlayout) + * Place the staffs at the correct x & y coordinates (before layout) */ void positionStaffs(); /** * Place the page pixmaps (if any) at the correct x & y - * coordinates (after tqlayout) + * coordinates (after layout) */ void positionPages(); @@ -929,7 +929,7 @@ protected: void updateThumbnails(bool complete); /** - * setup the tqlayout/font toolbar + * setup the layout/font toolbar */ void initLayoutToolbar(); @@ -940,15 +940,15 @@ protected: */ void toggleNamedToolBar(const TQString& toolBarName, bool* force = 0); - /// Calls all the relevant preparse and tqlayout methods + /// Calls all the relevant preparse and layout methods virtual bool applyLayout(int staffNo = -1, timeT startTime = 0, timeT endTime = 0); /** - * Readjust the size of the canvas after a tqlayout + * Readjust the size of the canvas after a layout * - * Checks the total width computed by the horizontal tqlayout + * Checks the total width computed by the horizontal layout * * @see NotationHLayout#getTotalWidth() */ @@ -1074,8 +1074,8 @@ protected: NotePixmapFactory *m_notePixmapFactory; - NotationHLayout* m_htqlayout; - NotationVLayout* m_vtqlayout; + NotationHLayout* m_hlayout; + NotationVLayout* m_vlayout; ChordNameRuler *m_chordNameRuler; TQWidget *m_tempoRuler; |