fix measure number layout
This commit is contained in:
parent
35323ae3aa
commit
8a42030a4c
20 changed files with 313 additions and 153 deletions
|
@ -56,7 +56,7 @@ add_library (
|
|||
segmentlist.h select.h sequencer.h shadownote.h shape.h sig.h slur.h slurtie.h spacer.h spanner.h spannermap.h spatium.h
|
||||
staff.h stafflines.h staffstate.h stafftext.h stafftextbase.h stafftype.h stafftypechange.h stafftypelist.h stem.h
|
||||
stemslash.h stringdata.h style.h sym.h symbol.h synthesizerstate.h system.h systemdivider.h systemtext.h tempo.h
|
||||
tempotext.h text.h textbase.h textedit.h textframe.h textline.h textlinebase.h tie.h tiemap.h timesig.h
|
||||
tempotext.h text.h measurenumber.h textbase.h textedit.h textframe.h textline.h textlinebase.h tie.h tiemap.h timesig.h
|
||||
tremolo.h tremolobar.h trill.h tuplet.h tupletmap.h types.h undo.h utils.h velo.h vibrato.h volta.h xml.h
|
||||
|
||||
segmentlist.cpp fingering.cpp accidental.cpp arpeggio.cpp
|
||||
|
@ -76,7 +76,7 @@ add_library (
|
|||
score.cpp segment.cpp select.cpp shadownote.cpp slur.cpp tie.cpp slurtie.cpp
|
||||
spacer.cpp spanner.cpp staff.cpp staffstate.cpp
|
||||
stafftextbase.cpp stafftext.cpp systemtext.cpp stafftype.cpp stem.cpp style.cpp symbol.cpp
|
||||
sym.cpp system.cpp stringdata.cpp tempotext.cpp text.cpp textbase.cpp textedit.cpp
|
||||
sym.cpp system.cpp stringdata.cpp tempotext.cpp text.cpp measurenumber.cpp textbase.cpp textedit.cpp
|
||||
textframe.cpp textline.cpp textlinebase.cpp timesig.cpp
|
||||
tremolobar.cpp tremolo.cpp trill.cpp tuplet.cpp
|
||||
utils.cpp velo.cpp volta.cpp xmlreader.cpp xmlwriter.cpp mscore.cpp
|
||||
|
|
|
@ -76,6 +76,7 @@
|
|||
#include "tempotext.h"
|
||||
#include "textframe.h"
|
||||
#include "text.h"
|
||||
#include "measurenumber.h"
|
||||
#include "textline.h"
|
||||
#include "tie.h"
|
||||
#include "timesig.h"
|
||||
|
@ -943,6 +944,7 @@ Element* Element::create(ElementType type, Score* score)
|
|||
case ElementType::ACCIDENTAL: return new Accidental(score);
|
||||
case ElementType::DYNAMIC: return new Dynamic(score);
|
||||
case ElementType::TEXT: return new Text(score);
|
||||
case ElementType::MEASURE_NUMBER: return new MeasureNumber(score);
|
||||
case ElementType::INSTRUMENT_NAME: return new InstrumentName(score);
|
||||
case ElementType::STAFF_TEXT: return new StaffText(score);
|
||||
case ElementType::SYSTEM_TEXT: return new SystemText(score);
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
#include "sym.h"
|
||||
#include "system.h"
|
||||
#include "tempotext.h"
|
||||
#include "text.h"
|
||||
#include "measurenumber.h"
|
||||
#include "tie.h"
|
||||
#include "tiemap.h"
|
||||
#include "timesig.h"
|
||||
|
@ -87,16 +87,16 @@ namespace Ms {
|
|||
//---------------------------------------------------------
|
||||
|
||||
class MStaff {
|
||||
Text* _noText { 0 }; ///< Measure number text object
|
||||
StaffLines* _lines { 0 };
|
||||
Spacer* _vspacerUp { 0 };
|
||||
Spacer* _vspacerDown { 0 };
|
||||
bool _hasVoices { false }; ///< indicates that MStaff contains more than one voice,
|
||||
MeasureNumber* _noText { 0 }; ///< Measure number text object
|
||||
StaffLines* _lines { 0 };
|
||||
Spacer* _vspacerUp { 0 };
|
||||
Spacer* _vspacerDown { 0 };
|
||||
bool _hasVoices { false }; ///< indicates that MStaff contains more than one voice,
|
||||
///< this changes some layout rules
|
||||
bool _visible { true };
|
||||
bool _slashStyle { false };
|
||||
bool _visible { true };
|
||||
bool _slashStyle { false };
|
||||
#ifndef NDEBUG
|
||||
bool _corrupted { false };
|
||||
bool _corrupted { false };
|
||||
#endif
|
||||
|
||||
public:
|
||||
|
@ -107,8 +107,8 @@ class MStaff {
|
|||
void setScore(Score*);
|
||||
void setTrack(int);
|
||||
|
||||
Text* noText() const { return _noText; }
|
||||
void setNoText(Text* t) { _noText = t; }
|
||||
MeasureNumber* noText() const { return _noText; }
|
||||
void setNoText(MeasureNumber* t) { _noText = t; }
|
||||
|
||||
StaffLines* lines() const { return _lines; }
|
||||
void setLines(StaffLines* l) { _lines = l; }
|
||||
|
@ -284,14 +284,14 @@ Spacer* Measure::vspacerDown(int staffIdx) const { return _mstave
|
|||
Spacer* Measure::vspacerUp(int staffIdx) const { return _mstaves[staffIdx]->vspacerUp(); }
|
||||
void Measure::setStaffVisible(int staffIdx, bool visible) { _mstaves[staffIdx]->setVisible(visible); }
|
||||
void Measure::setStaffSlashStyle(int staffIdx, bool slashStyle) { _mstaves[staffIdx]->setSlashStyle(slashStyle); }
|
||||
|
||||
#ifndef NDEBUG
|
||||
bool Measure::corrupted(int staffIdx) const { return _mstaves[staffIdx]->corrupted(); }
|
||||
void Measure::setCorrupted(int staffIdx, bool val) { _mstaves[staffIdx]->setCorrupted(val); }
|
||||
#endif
|
||||
void Measure::setNoText(int staffIdx, Text* t) { _mstaves[staffIdx]->setNoText(t); }
|
||||
Text* Measure::noText(int staffIdx) const { return _mstaves[staffIdx]->noText(); }
|
||||
// const Shape& Measure::staffShape(int staffIdx) const { return _mstaves[staffIdx]->shape(); }
|
||||
// Shape& Measure::staffShape(int staffIdx) { return _mstaves[staffIdx]->shape(); }
|
||||
|
||||
void Measure::setNoText(int staffIdx, MeasureNumber* t) { _mstaves[staffIdx]->setNoText(t); }
|
||||
MeasureNumber* Measure::noText(int staffIdx) const { return _mstaves[staffIdx]->noText(); }
|
||||
|
||||
//---------------------------------------------------------
|
||||
// Measure
|
||||
|
@ -540,13 +540,12 @@ void Measure::layout2()
|
|||
}
|
||||
for (int staffIdx = 0; staffIdx < int(_mstaves.size()); ++staffIdx) {
|
||||
MStaff* ms = _mstaves[staffIdx];
|
||||
Text* t = ms->noText();
|
||||
MeasureNumber* t = ms->noText();
|
||||
if (t)
|
||||
t->setTrack(staffIdx * VOICES);
|
||||
if (smn && ((staffIdx == nn) || nas)) {
|
||||
if (t == 0) {
|
||||
t = new Text(score(), Tid::MEASURE_NUMBER);
|
||||
t->setFlag(ElementFlag::ON_STAFF, true);
|
||||
t = new MeasureNumber(score());
|
||||
t->setTrack(staffIdx * VOICES);
|
||||
t->setGenerated(true);
|
||||
t->setParent(this);
|
||||
|
@ -817,9 +816,9 @@ void Measure::add(Element* e)
|
|||
}
|
||||
break;
|
||||
|
||||
case ElementType::TEXT:
|
||||
case ElementType::MEASURE_NUMBER:
|
||||
if (e->staffIdx() < int(_mstaves.size()))
|
||||
_mstaves[e->staffIdx()]->setNoText(toText(e));
|
||||
_mstaves[e->staffIdx()]->setNoText(toMeasureNumber(e));
|
||||
break;
|
||||
|
||||
case ElementType::SPACER:
|
||||
|
@ -1947,9 +1946,8 @@ void Measure::read(XmlReader& e, int staffIdx)
|
|||
e.initTick(e.lastMeasure()->tick());
|
||||
}
|
||||
else if (tag == "MeasureNumber") {
|
||||
Text* noText = new Text(score(), Tid::MEASURE_NUMBER);
|
||||
MeasureNumber* noText = new MeasureNumber(score());
|
||||
noText->read(e);
|
||||
noText->setFlag(ElementFlag::ON_STAFF, true);
|
||||
noText->setTrack(e.track());
|
||||
noText->setParent(this);
|
||||
_mstaves[noText->staffIdx()]->setNoText(noText);
|
||||
|
|
|
@ -29,7 +29,7 @@ class Beam;
|
|||
class Tuplet;
|
||||
class Staff;
|
||||
class Chord;
|
||||
class Text;
|
||||
class MeasureNumber;
|
||||
class ChordRest;
|
||||
class Score;
|
||||
class MuseScoreView;
|
||||
|
@ -127,11 +127,9 @@ class Measure final : public MeasureBase {
|
|||
void setStaffSlashStyle(int staffIdx, bool slashStyle);
|
||||
bool corrupted(int staffIdx) const;
|
||||
void setCorrupted(int staffIdx, bool val);
|
||||
void setNoText(int staffIdx, Text*);
|
||||
Text* noText(int staffIdx) const;
|
||||
void setNoText(int staffIdx, MeasureNumber*);
|
||||
MeasureNumber* noText(int staffIdx) const;
|
||||
|
||||
// const Shape& staffShape(int staffIdx) const;
|
||||
// Shape& staffShape(int staffIdx);
|
||||
void createStaves(int);
|
||||
|
||||
MeasureNumberMode measureNumberMode() const { return _noMode; }
|
||||
|
|
53
libmscore/measurenumber.cpp
Normal file
53
libmscore/measurenumber.cpp
Normal file
|
@ -0,0 +1,53 @@
|
|||
//=============================================================================
|
||||
// MuseScore
|
||||
// Music Composition & Notation
|
||||
//
|
||||
// Copyright (C) 2011-2014 Werner Schweer
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2
|
||||
// as published by the Free Software Foundation and appearing in
|
||||
// the file LICENCE.GPL
|
||||
//=============================================================================
|
||||
|
||||
#include "measurenumber.h"
|
||||
#include "xml.h"
|
||||
|
||||
namespace Ms {
|
||||
|
||||
//---------------------------------------------------------
|
||||
// measureNumberStyle
|
||||
//---------------------------------------------------------
|
||||
|
||||
static const ElementStyle measureNumberStyle {
|
||||
};
|
||||
|
||||
//---------------------------------------------------------
|
||||
// MeasureNumber
|
||||
//---------------------------------------------------------
|
||||
|
||||
MeasureNumber::MeasureNumber(Score* s) : TextBase(s, Tid::MEASURE_NUMBER)
|
||||
{
|
||||
setFlag(ElementFlag::ON_STAFF, true);
|
||||
resetProperty(Pid::PLACEMENT);
|
||||
initElementStyle(&measureNumberStyle);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant MeasureNumber::propertyDefault(Pid id) const
|
||||
{
|
||||
switch(id) {
|
||||
case Pid::SUB_STYLE:
|
||||
return int(Tid::MEASURE_NUMBER);
|
||||
case Pid::PLACEMENT:
|
||||
return int (Placement::ABOVE);
|
||||
default:
|
||||
return TextBase::propertyDefault(id);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
37
libmscore/measurenumber.h
Normal file
37
libmscore/measurenumber.h
Normal file
|
@ -0,0 +1,37 @@
|
|||
//=============================================================================
|
||||
// MuseScore
|
||||
// Music Composition & Notation
|
||||
//
|
||||
// Copyright (C) 2014 Werner Schweer
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2
|
||||
// as published by the Free Software Foundation and appearing in
|
||||
// the file LICENCE.GPL
|
||||
//=============================================================================
|
||||
|
||||
#ifndef __MEASURENUMBER_H__
|
||||
#define __MEASURENUMBER_H__
|
||||
|
||||
#include "textbase.h"
|
||||
|
||||
namespace Ms {
|
||||
|
||||
//---------------------------------------------------------
|
||||
// MeasureNumber
|
||||
//---------------------------------------------------------
|
||||
|
||||
class MeasureNumber final : public TextBase {
|
||||
|
||||
public:
|
||||
MeasureNumber(Score* s = 0);
|
||||
|
||||
virtual ElementType type() const override { return ElementType::MEASURE_NUMBER; }
|
||||
virtual MeasureNumber* clone() const override { return new MeasureNumber(*this); }
|
||||
virtual QVariant propertyDefault(Pid id) const override;
|
||||
};
|
||||
|
||||
} // namespace Ms
|
||||
|
||||
#endif
|
||||
|
|
@ -24,6 +24,7 @@
|
|||
#include "ottava.h"
|
||||
#include "stafftype.h"
|
||||
#include "text.h"
|
||||
#include "measurenumber.h"
|
||||
#include "part.h"
|
||||
#include "sig.h"
|
||||
#include "box.h"
|
||||
|
@ -420,7 +421,7 @@ static bool readTextProperties(XmlReader& e, TextBase* t, Element*)
|
|||
// readText114
|
||||
//---------------------------------------------------------
|
||||
|
||||
static void readText114(XmlReader& e, Text* t, Element* be)
|
||||
static void readText114(XmlReader& e, TextBase* t, Element* be)
|
||||
{
|
||||
while (e.readNextStartElement()) {
|
||||
if (!readTextProperties(e, t, be))
|
||||
|
@ -2123,10 +2124,8 @@ static void readMeasure(Measure* m, int staffIdx, XmlReader& e)
|
|||
}
|
||||
}
|
||||
else if (tag == "MeasureNumber") {
|
||||
Text* noText = new Text(m->score(), Tid::MEASURE_NUMBER);
|
||||
MeasureNumber* noText = new MeasureNumber(m->score());
|
||||
readText114(e, noText, m);
|
||||
noText->setFlag(ElementFlag::ON_STAFF, true);
|
||||
// noText->setFlag(ElementFlag::MOVABLE, false); ??
|
||||
noText->setTrack(e.track());
|
||||
noText->setParent(m);
|
||||
m->setNoText(noText->staffIdx(), noText);
|
||||
|
|
|
@ -63,6 +63,7 @@
|
|||
#include "undo.h"
|
||||
#include "lyrics.h"
|
||||
#include "tempotext.h"
|
||||
#include "measurenumber.h"
|
||||
|
||||
#ifdef OMR
|
||||
#include "omr/omr.h"
|
||||
|
@ -2912,10 +2913,8 @@ static void readMeasure(Measure* m, int staffIdx, XmlReader& e)
|
|||
else if (tag == "Segment")
|
||||
segment->read(e);
|
||||
else if (tag == "MeasureNumber") {
|
||||
Text* noText = new Text(score, Tid::MEASURE_NUMBER);
|
||||
MeasureNumber* noText = new MeasureNumber(score);
|
||||
readText206(e, noText, m);
|
||||
noText->setFlag(ElementFlag::ON_STAFF, true);
|
||||
// noText->setFlag(ElementFlag::MOVABLE, false); ??
|
||||
noText->setTrack(e.track());
|
||||
noText->setParent(m);
|
||||
m->setNoText(noText->staffIdx(), noText);
|
||||
|
|
|
@ -34,6 +34,7 @@ static const ElementName elementNames[] = {
|
|||
{ ElementType::SCORE, "Score", QT_TRANSLATE_NOOP("elementName", "Score") },
|
||||
{ ElementType::SYMBOL, "Symbol", QT_TRANSLATE_NOOP("elementName", "Symbol") },
|
||||
{ ElementType::TEXT, "Text", QT_TRANSLATE_NOOP("elementName", "Text") },
|
||||
{ ElementType::MEASURE_NUMBER, "MeasureNumber", QT_TRANSLATE_NOOP("elementName", "Measure Number") },
|
||||
{ ElementType::INSTRUMENT_NAME, "InstrumentName", QT_TRANSLATE_NOOP("elementName", "Instrument Name") },
|
||||
{ ElementType::SLUR_SEGMENT, "SlurSegment", QT_TRANSLATE_NOOP("elementName", "Slur Segment") },
|
||||
{ ElementType::TIE_SEGMENT, "TieSegment", QT_TRANSLATE_NOOP("elementName", "Tie Segment") },
|
||||
|
@ -740,6 +741,7 @@ bool ScoreElement::isTextBase() const
|
|||
|| type() == ElementType::FIGURED_BASS
|
||||
|| type() == ElementType::TEMPO_TEXT
|
||||
|| type() == ElementType::INSTRUMENT_NAME
|
||||
|| type() == ElementType::MEASURE_NUMBER
|
||||
;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -129,6 +129,7 @@ class Vibrato;
|
|||
class VibratoSegment;
|
||||
class PalmMute;
|
||||
class PalmMuteSegment;
|
||||
class MeasureNumber;
|
||||
|
||||
class StaffTextBase;
|
||||
|
||||
|
@ -336,6 +337,7 @@ class ScoreElement {
|
|||
CONVERT(FretDiagram, FRET_DIAGRAM)
|
||||
CONVERT(Page, PAGE)
|
||||
CONVERT(Text, TEXT)
|
||||
CONVERT(MeasureNumber, MEASURE_NUMBER)
|
||||
CONVERT(StaffText, STAFF_TEXT)
|
||||
CONVERT(SystemText, SYSTEM_TEXT)
|
||||
CONVERT(BracketItem, BRACKET_ITEM)
|
||||
|
@ -534,6 +536,7 @@ static inline const a* to##a(const ScoreElement* e) { Q_ASSERT(e == 0 || e->is##
|
|||
CONVERT(InstrumentChange)
|
||||
CONVERT(StaffTypeChange)
|
||||
CONVERT(Text)
|
||||
CONVERT(MeasureNumber)
|
||||
CONVERT(Hairpin)
|
||||
CONVERT(HairpinSegment)
|
||||
CONVERT(Bend)
|
||||
|
|
|
@ -614,7 +614,7 @@ static const StyleType styleTypes[] {
|
|||
{ Sid::measureNumberFontUnderline, "measureNumberFontUnderline", false },
|
||||
{ Sid::measureNumberOffset, "measureNumberOffset", QPointF(0.0, -2.0) },
|
||||
{ Sid::measureNumberOffsetType, "measureNumberOffsetType", int(OffsetType::SPATIUM) },
|
||||
{ Sid::measureNumberAlign, "measureNumberAlign", QVariant::fromValue(Align::LEFT | Align::BASELINE) },
|
||||
{ Sid::measureNumberAlign, "measureNumberAlign", QVariant::fromValue(Align::HCENTER | Align::BASELINE) },
|
||||
|
||||
{ Sid::translatorFontFace, "translatorFontFace", "FreeSerif" },
|
||||
{ Sid::translatorFontSize, "translatorFontSize", 11.0 },
|
||||
|
|
|
@ -30,6 +30,7 @@ enum class ElementType {
|
|||
SCORE,
|
||||
SYMBOL,
|
||||
TEXT,
|
||||
MEASURE_NUMBER,
|
||||
INSTRUMENT_NAME,
|
||||
SLUR_SEGMENT,
|
||||
TIE_SEGMENT,
|
||||
|
|
|
@ -340,6 +340,7 @@ add_executable ( ${ExecutableName}
|
|||
inspector/inspectorHarmony.cpp
|
||||
inspector/inspectorFret.cpp
|
||||
inspector/inspectorText.cpp
|
||||
inspector/inspectorMeasureNumber.cpp
|
||||
inspector/inspectorLasso.cpp
|
||||
inspector/inspectorBarline.cpp
|
||||
inspector/inspectorVolta.cpp
|
||||
|
|
|
@ -69,6 +69,7 @@
|
|||
#include "libmscore/trill.h"
|
||||
#include "libmscore/timesig.h"
|
||||
#include "libmscore/systemdivider.h"
|
||||
#include "libmscore/measurenumber.h"
|
||||
|
||||
namespace Ms {
|
||||
|
||||
|
@ -665,6 +666,7 @@ void Debugger::updateElement(Element* el)
|
|||
case ElementType::MARKER:
|
||||
case ElementType::JUMP:
|
||||
case ElementType::TEXT:
|
||||
case ElementType::MEASURE_NUMBER:
|
||||
case ElementType::STAFF_TEXT:
|
||||
case ElementType::SYSTEM_TEXT:
|
||||
case ElementType::REHEARSAL_MARK:
|
||||
|
|
|
@ -512,7 +512,7 @@
|
|||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Pos</string>
|
||||
<string notr="true">pos</string>
|
||||
</property>
|
||||
<property name="textFormat">
|
||||
<enum>Qt::PlainText</enum>
|
||||
|
@ -771,102 +771,6 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="3">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleName">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">Uoff</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="indent">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="4">
|
||||
<widget class="QDoubleSpinBox" name="offsetx">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true">User x offset</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-100000.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>100000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="5">
|
||||
<widget class="QDoubleSpinBox" name="offsety">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-100000.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>100000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="sizePolicy">
|
||||
|
@ -882,7 +786,7 @@
|
|||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">CanvasPos</string>
|
||||
<string notr="true">canvasPos</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
|
@ -917,6 +821,102 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QLabel" name="label_10">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="statusTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="whatsThis">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleName">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string notr="true">offset</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
|
||||
</property>
|
||||
<property name="indent">
|
||||
<number>5</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QDoubleSpinBox" name="offsetx">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true">User x offset</string>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-100000.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>100000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="2">
|
||||
<widget class="QDoubleSpinBox" name="offsety">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="accessibleDescription">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="buttonSymbols">
|
||||
<enum>QAbstractSpinBox::NoButtons</enum>
|
||||
</property>
|
||||
<property name="suffix">
|
||||
<string notr="true"/>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<double>-100000.000000000000000</double>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<double>100000.000000000000000</double>
|
||||
</property>
|
||||
<property name="singleStep">
|
||||
<double>0.100000000000000</double>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
|
|
|
@ -40,6 +40,7 @@
|
|||
#include "inspectorVibrato.h"
|
||||
#include "inspectorNoteDot.h"
|
||||
#include "inspectorInstrchange.h"
|
||||
#include "inspectorMeasureNumber.h"
|
||||
#include "musescore.h"
|
||||
#include "scoreview.h"
|
||||
#include "bendproperties.h"
|
||||
|
@ -322,6 +323,9 @@ void Inspector::update(Score* s)
|
|||
case ElementType::REHEARSAL_MARK:
|
||||
ie = new InspectorStaffText(this);
|
||||
break;
|
||||
case ElementType::MEASURE_NUMBER:
|
||||
ie = new InspectorMeasureNumber(this);
|
||||
break;
|
||||
case ElementType::STAFFTYPE_CHANGE:
|
||||
ie = new InspectorStaffTypeChange(this);
|
||||
break;
|
||||
|
|
|
@ -38,7 +38,6 @@ InspectorJump::InspectorJump(QWidget* parent)
|
|||
};
|
||||
|
||||
mapSignals(iiList, ppList);
|
||||
connect(t.resetToStyle, SIGNAL(clicked()), SLOT(resetToStyle()));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
36
mscore/inspector/inspectorMeasureNumber.cpp
Normal file
36
mscore/inspector/inspectorMeasureNumber.cpp
Normal file
|
@ -0,0 +1,36 @@
|
|||
//=============================================================================
|
||||
// MuseScore
|
||||
// Music Composition & Notation
|
||||
//
|
||||
// Copyright (C) 2011 Werner Schweer
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2
|
||||
// as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE.GPL
|
||||
//=============================================================================
|
||||
|
||||
#include "inspectorMeasureNumber.h"
|
||||
#include "libmscore/score.h"
|
||||
#include "icons.h"
|
||||
|
||||
namespace Ms {
|
||||
|
||||
//---------------------------------------------------------
|
||||
// InspectorMeasureNumber
|
||||
//---------------------------------------------------------
|
||||
|
||||
InspectorMeasureNumber::InspectorMeasureNumber(QWidget* parent)
|
||||
: InspectorTextBase(parent)
|
||||
{
|
||||
const std::vector<InspectorItem> iiList = {
|
||||
};
|
||||
const std::vector<InspectorPanel> ppList = {
|
||||
{ t.title, t.panel },
|
||||
};
|
||||
|
||||
mapSignals(iiList, ppList);
|
||||
}
|
||||
|
||||
}
|
||||
|
36
mscore/inspector/inspectorMeasureNumber.h
Normal file
36
mscore/inspector/inspectorMeasureNumber.h
Normal file
|
@ -0,0 +1,36 @@
|
|||
//=============================================================================
|
||||
// MuseScore
|
||||
// Music Composition & Notation
|
||||
//
|
||||
// Copyright (C) 2011 Werner Schweer and others
|
||||
//
|
||||
// This program is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License version 2
|
||||
// as published by the Free Software Foundation and appearing in
|
||||
// the file LICENSE.GPL
|
||||
//=============================================================================
|
||||
|
||||
#ifndef __INSPECTOR_MEASURENUMBER_H__
|
||||
#define __INSPECTOR_MEASURENUMBER_H__
|
||||
|
||||
#include "inspector.h"
|
||||
#include "inspectorTextBase.h"
|
||||
#include "ui_inspector_text.h"
|
||||
|
||||
namespace Ms {
|
||||
|
||||
//---------------------------------------------------------
|
||||
// InspectorMeasureNumber
|
||||
//---------------------------------------------------------
|
||||
|
||||
class InspectorMeasureNumber : public InspectorTextBase {
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
InspectorMeasureNumber(QWidget* parent);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
@ -1,18 +1,8 @@
|
|||
test script p1: read score elements
|
||||
found:Clef (19) at 0
|
||||
found:KeySig (20) at 0
|
||||
found:TimeSig (22) at 0
|
||||
found:Chord (91) at 0
|
||||
durationType:
|
||||
beamMode:0
|
||||
small:false
|
||||
stemDirection:AUTO
|
||||
duration:
|
||||
found:Rest (23) at 480
|
||||
found:Chord (91) at 960
|
||||
durationType:
|
||||
beamMode:0
|
||||
small:false
|
||||
stemDirection:AUTO
|
||||
duration:
|
||||
found:BarLine (10) at 1920
|
||||
found:Clef (20) at 0
|
||||
found:KeySig (21) at 0
|
||||
found:TimeSig (23) at 0
|
||||
found:Chord (92) at 0
|
||||
found:Rest (24) at 480
|
||||
found:Chord (92) at 960
|
||||
found:BarLine (11) at 1920
|
||||
|
|
Loading…
Reference in a new issue