bug fixes for concert pitch switch

This commit is contained in:
ws 2014-04-09 16:09:21 +02:00
parent 4532ce17a0
commit e534cccef8
65 changed files with 328 additions and 246 deletions

View file

@ -17,6 +17,7 @@
#include "score.h"
#include "staff.h"
#include "undo.h"
#include "xml.h"
namespace Ms {

View file

@ -20,6 +20,7 @@
#include "sym.h"
#include "system.h"
#include "utils.h"
#include "xml.h"
namespace Ms {

View file

@ -19,6 +19,7 @@
#include "part.h"
#include "segment.h"
#include "property.h"
#include "xml.h"
namespace Ms {

View file

@ -21,6 +21,7 @@
#include "page.h"
#include "barline.h"
#include "sym.h"
#include "xml.h"
namespace Ms {

View file

@ -19,6 +19,7 @@
#include "segment.h"
#include "articulation.h"
#include "stafftype.h"
#include "xml.h"
namespace Ms {
@ -792,7 +793,7 @@ void BarLine::endEditDrag()
}
else
shiftDrag = false;
// if any value changed, update
if(newSpan != _span || newSpanFrom != _spanFrom || newSpanTo != _spanTo) {
_span = newSpan;

View file

@ -30,6 +30,7 @@
#include "icon.h"
#include "stemslash.h"
#include "groups.h"
#include "xml.h"
namespace Ms {

View file

@ -16,6 +16,7 @@
#include "staff.h"
#include "chord.h"
#include "note.h"
#include "xml.h"
namespace Ms {

View file

@ -24,6 +24,7 @@
#include "mscore.h"
#include "stafftext.h"
#include "icon.h"
#include "xml.h"
namespace Ms {

View file

@ -16,6 +16,7 @@
#include "segment.h"
#include "measure.h"
#include "score.h"
#include "xml.h"
namespace Ms {

View file

@ -12,6 +12,7 @@
#include "score.h"
#include "image.h"
#include "xml.h"
namespace Ms {

View file

@ -1505,16 +1505,13 @@ void Chord::layout10(AccidentalState* as)
for (Note* note : notes()) {
if (drumset) {
int pitch = note->pitch();
if (!drumset->isValid(pitch)) {
// qDebug("unmapped drum note %d", pitch);
}
else {
if (drumset->isValid(pitch)) {
note->setHeadGroup(drumset->noteHead(pitch));
note->setLine(drumset->line(pitch));
continue;
}
}
note->layout10(as);
else
note->layout10(as);
}
sortNotes();
}

View file

@ -521,7 +521,7 @@ ClefType Clef::clefType(const QString& s)
void Clef::setClefType(ClefType i)
{
if (score()->concertPitch()) {
if (concertPitch()) {
_clefTypes._concertClef = i;
if (_clefTypes._transposingClef == ClefType::INVALID)
_clefTypes._transposingClef = i;
@ -558,7 +558,7 @@ void Clef::setTransposingClef(ClefType val)
ClefType Clef::clefType() const
{
if (score()->concertPitch())
if (concertPitch())
return _clefTypes._concertClef;
else
return _clefTypes._transposingClef;

View file

@ -13,6 +13,7 @@
#include "cleflist.h"
#include "clef.h"
#include "score.h"
#include "xml.h"
namespace Ms {

View file

@ -15,6 +15,7 @@
#include "score.h"
#include "undo.h"
#include "staff.h"
#include "xml.h"
namespace Ms {

View file

@ -356,8 +356,6 @@ Note* Score::addNote(Chord* chord, NoteVal& noteVal)
note->setParent(chord);
note->setTrack(chord->track());
note->setNval(noteVal);
if (note->tpc() == INVALID_TPC)
note->setTpcFromPitch();
undoAddElement(note);
_playNote = true;
select(note, SELECT_SINGLE, 0);

View file

@ -1778,5 +1778,13 @@ QString Element::toTimeSigString(const QString& s) const
return d;
}
//---------------------------------------------------------
// concertPitch
//---------------------------------------------------------
bool Element::concertPitch() const
{
return score()->styleB(ST_concertPitch);
}
}

View file

@ -13,10 +13,10 @@
#ifndef __ELEMENT_H__
#define __ELEMENT_H__
#include "xml.h"
#include "mscore.h"
#include "property.h"
#include "spatium.h"
#include "fraction.h"
class QPainter;
@ -306,7 +306,6 @@ class Element : public QObject {
uint _tag; ///< tag bitmask
protected:
Score* _score;
QPointF _startDragPosition; ///< used during drag
@ -567,6 +566,8 @@ class Element : public QObject {
QPointF symAttach(SymId id) const;
QString toTimeSigString(const QString& s) const;
bool symIsValid(SymId id) const;
bool concertPitch() const;
};
//---------------------------------------------------------

View file

@ -20,6 +20,7 @@
#include "rest.h"
#include "score.h"
#include "sym.h"
#include "xml.h"
namespace Ms {

View file

@ -13,6 +13,7 @@
#include "fingering.h"
#include "score.h"
#include "undo.h"
#include "xml.h"
namespace Ms {

View file

@ -21,6 +21,7 @@
#include "staff.h"
#include "style.h"
#include "sym.h"
#include "xml.h"
namespace Ms {

View file

@ -15,6 +15,7 @@
#include "chordrest.h"
#include "staff.h"
#include "tuplet.h"
#include "xml.h"
namespace Ms {

View file

@ -23,6 +23,7 @@
#include "part.h"
#include "utils.h"
#include "sym.h"
#include "xml.h"
namespace Ms {

View file

@ -17,6 +17,7 @@
#include "part.h"
#include "undo.h"
#include "mscore.h"
#include "xml.h"
namespace Ms {

View file

@ -12,6 +12,7 @@
#include "jump.h"
#include "score.h"
#include "xml.h"
namespace Ms {

View file

@ -17,6 +17,7 @@
#include "segment.h"
#include "score.h"
#include "undo.h"
#include "xml.h"
namespace Ms {

View file

@ -13,6 +13,7 @@
#include "layoutbreak.h"
#include "score.h"
#include "mscore.h"
#include "xml.h"
namespace Ms {

View file

@ -13,6 +13,7 @@
#include "marker.h"
#include "score.h"
#include "sym.h"
#include "xml.h"
namespace Ms {

View file

@ -3649,6 +3649,7 @@ void Measure::updateAccidentals(int staffIdx)
for (Chord* ch : chord->graceNotes()) {
for (Note* note : ch->notes())
note->updateAccidental(&as);
ch->sortNotes();
}
for (Note* note : chord->notes()) {
@ -3683,6 +3684,7 @@ void Measure::updateAccidentals(int staffIdx)
break;
}
}
chord->sortNotes();
}
}
}

View file

@ -260,16 +260,6 @@ Note::Note(const Note& n)
_mark = n._mark;
}
//---------------------------------------------------------
// concertPitch
// return true if current note is in concert pitch mode
//---------------------------------------------------------
inline bool Note::concertPitch() const
{
return score()->styleB(ST_concertPitch);
}
//---------------------------------------------------------
// concertPitchIdx
//---------------------------------------------------------
@ -285,21 +275,11 @@ inline int Note::concertPitchIdx() const
void Note::setPitch(int val)
{
_pitch = restrict(val, 0, 127);
#if 0
int pitchOffset = 0;
if (score()) {
Part* part = staff() ? staff()->part() : 0;
if (part)
pitchOffset = concertPitch() ? 0 : transposition();
Q_ASSERT(val >= 0 && val <= 127);
if (_pitch != val) {
_pitch = val;
score()->setPlaylistDirty(true);
}
for (int i = 0; i < _playEvents.size(); ++i)
_playEvents[i].setPitch(pitchOffset);
if (chord()) {
if (chord()->measure())
chord()->measure()->updateAccidentals(chord()->staffIdx());
}
#endif
}
void Note::setPitch(int pitch, int tpc1, int tpc2)
@ -1569,13 +1549,7 @@ void Note::layout10(AccidentalState* as)
_accidental = 0;
}
}
//
// calculate the real note line depending on clef
//
Staff* s = score()->staff(staffIdx() + chord()->staffMove());
int tick = chord()->tick();
_line = relStep(_line, s->clef(tick));
updateRelLine();
}
}
@ -1786,76 +1760,75 @@ void Note::updateAccidental(AccidentalState* as)
// don't touch accidentals that don't concern tpc such as
// quarter tones
if (_accidental &&
_accidental->accidentalType() > Accidental::ACC_NATURAL) {
// calculate the real note line depending on clef
if (!(_accidental && _accidental->accidentalType() > Accidental::ACC_NATURAL)) {
// calculate accidental
Accidental::AccidentalType acci = Accidental::ACC_NONE;
Staff* s = score()->staff(staffIdx() + chord()->staffMove());
int tick = chord()->tick();
ClefType clef = s->clef(tick);
_line = relStep(_line, clef);
return;
}
// calculate accidental
Accidental::AccidentalType acci = Accidental::ACC_NONE;
AccidentalVal accVal = tpc2alter(tpc());
if ((accVal != as->accidentalVal(int(_line))) || hidden() || as->tieContext(int(_line))) {
as->setAccidentalVal(int(_line), accVal, _tieBack != 0);
if (_tieBack)
acci = Accidental::ACC_NONE;
else {
acci = Accidental::value2subtype(accVal);
if (acci == Accidental::ACC_NONE)
acci = Accidental::ACC_NATURAL;
}
}
if (acci != Accidental::ACC_NONE && !_tieBack && !_hidden) {
if (_accidental == 0) {
Accidental* a = new Accidental(score());
a->setParent(this);
a->setAccidentalType(acci);
score()->undoAddElement(a);
}
else if (_accidental->accidentalType() != acci) {
Accidental* a = _accidental->clone();
a->setParent(this);
a->setAccidentalType(acci);
score()->undoChangeElement(_accidental, a);
}
}
else {
if (_accidental) {
// remove this if it was ACC_AUTO:
if (_accidental->role() == Accidental::ACC_AUTO)
score()->undoRemoveElement(_accidental);
AccidentalVal accVal = tpc2alter(tpc());
if ((accVal != as->accidentalVal(int(_line))) || hidden() || as->tieContext(int(_line))) {
as->setAccidentalVal(int(_line), accVal, _tieBack != 0);
if (_tieBack)
acci = Accidental::ACC_NONE;
else {
// keep it, but update type if needed
acci = Accidental::value2subtype(accVal);
if (acci == Accidental::ACC_NONE)
acci = Accidental::ACC_NATURAL;
if (_accidental->accidentalType() != acci) {
Accidental* a = _accidental->clone();
a->setParent(this);
a->setAccidentalType(acci);
score()->undoChangeElement(_accidental, a);
}
}
if (acci != Accidental::ACC_NONE && !_tieBack && !_hidden) {
if (_accidental == 0) {
Accidental* a = new Accidental(score());
a->setParent(this);
a->setAccidentalType(acci);
score()->undoAddElement(a);
}
else if (_accidental->accidentalType() != acci) {
Accidental* a = _accidental->clone();
a->setParent(this);
a->setAccidentalType(acci);
score()->undoChangeElement(_accidental, a);
}
}
else {
if (_accidental) {
// remove this if it was ACC_AUTO:
if (_accidental->role() == Accidental::ACC_AUTO)
score()->undoRemoveElement(_accidental);
else {
// keep it, but update type if needed
acci = Accidental::value2subtype(accVal);
if (acci == Accidental::ACC_NONE)
acci = Accidental::ACC_NATURAL;
if (_accidental->accidentalType() != acci) {
Accidental* a = _accidental->clone();
a->setParent(this);
a->setAccidentalType(acci);
score()->undoChangeElement(_accidental, a);
}
}
}
}
}
updateRelLine();
}
//
// calculate the real note line depending on clef
//
//---------------------------------------------------------
// updateRelLine
// calculate the real note line depending on clef,
// _line is the absolute line
//---------------------------------------------------------
void Note::updateRelLine()
{
Staff* s = score()->staff(staffIdx() + chord()->staffMove());
int tick = chord()->tick();
ClefType clef = s->clef(tick);
_line = relStep(_line, clef);
if (chord())
chord()->sortNotes();
ClefType clef = s->clef(chord()->tick());
int line = relStep(_line, clef);
if (line != _line) {
setLine(line);
if (chord())
chord()->sortNotes();
}
}
//---------------------------------------------------------
@ -1864,11 +1837,8 @@ void Note::updateAccidental(AccidentalState* as)
void Note::updateLine()
{
Staff* s = score()->staff(staffIdx() + chord()->staffMove());
ClefType clef = s->clef(chord()->tick());
_line = relStep(epitch(), tpc(), clef);
if (chord())
chord()->sortNotes();
_line = absStep(tpc(), epitch());
updateRelLine();
}
//---------------------------------------------------------
@ -1882,7 +1852,10 @@ void Note::setNval(NoteVal nval)
_string = nval.string;
if (nval.tpc != INVALID_TPC)
setTpc(nval.tpc);
if (_tpc[0] == INVALID_TPC)
_tpc[0] = tpcFromPitch(_pitch);
if (_tpc[1] == INVALID_TPC)
_tpc[1] = tpcFromPitch(_pitch - transposition());
_headGroup = NoteHeadGroup(nval.headGroup);
}

View file

@ -215,8 +215,8 @@ class Note : public Element {
void endEdit();
void addSpanner(Spanner*);
void removeSpanner(Spanner*);
bool concertPitch() const;
int concertPitchIdx() const;
void updateRelLine();
public:
Note(Score* s = 0);

View file

@ -14,6 +14,7 @@
#include "score.h"
#include "staff.h"
#include "sym.h"
#include "xml.h"
namespace Ms {

View file

@ -13,6 +13,7 @@
#include "pedal.h"
#include "textline.h"
#include "sym.h"
#include "xml.h"
#include "score.h"

View file

@ -164,9 +164,12 @@ static const int pitchByStepAndKey[NUM_OF_KEYS][STEP_DELTA_OCTAVE] = {
int step2deltaPitchByKey(int step, int key)
{
while (step < 0) step+= STEP_DELTA_OCTAVE;
while (key < KEY_MIN) key += KEY_DELTA_ENHARMONIC;
while (key > KEY_MAX) key -= KEY_DELTA_ENHARMONIC;
while (step < 0)
step+= STEP_DELTA_OCTAVE;
while (key < KEY_MIN)
key += KEY_DELTA_ENHARMONIC;
while (key > KEY_MAX)
key -= KEY_DELTA_ENHARMONIC;
return pitchByStepAndKey[key-KEY_MIN][step % STEP_DELTA_OCTAVE];
}
@ -176,7 +179,7 @@ int step2deltaPitchByKey(int step, int key)
int tpc2pitch(int tpc)
{
tpc += 1;
Q_ASSERT(tpcIsValid(tpc));
static int pitches[] = {
//step: F C G D A E B
@ -186,10 +189,7 @@ int tpc2pitch(int tpc)
6, 1, 8, 3, 10, 5, 12, // #
7, 2, 9, 4, 11, 6, 13 // ##
};
if (tpc < 0 || tpc >= int(sizeof(pitches)/sizeof(*pitches))) {
qFatal("tpc %d >= %d\n", tpc, int(sizeof(pitches)/sizeof(*pitches)));
}
return pitches[tpc];
return pitches[tpc + 1];
}
//---------------------------------------------------------

View file

@ -14,6 +14,7 @@
#include "mscore.h"
#include "layoutbreak.h"
#include "groups.h"
#include "xml.h"
namespace Ms {

View file

@ -32,6 +32,7 @@
#include "drumset.h"
#include "style.h"
#include "sym.h"
#include "xml.h"
namespace Ms {

View file

@ -2311,6 +2311,7 @@ void Score::splitStaff(int staffIdx, int splitPoint)
nnote->updateLine();
removeNotes.append(note);
}
c->sortNotes();
foreach(Note* note, removeNotes) {
undoRemoveElement(note);
if (note->chord()->notes().isEmpty())

View file

@ -878,7 +878,6 @@ class Score : public QObject {
void cmdUpdateNotes();
void cmdUpdateAccidentals(Measure* m, int staffIdx);
QMap<int, LinkedElements*>& links();
bool concertPitch() const { return styleB(ST_concertPitch); }
void layoutFingering(Fingering*);
void cmdSplitMeasure(ChordRest*);
void cmdJoinMeasure(Measure*, Measure*);

View file

@ -34,6 +34,7 @@
#include "clef.h"
#include "timesig.h"
#include "system.h"
#include "xml.h"
namespace Ms {

View file

@ -13,6 +13,7 @@
#include "spacer.h"
#include "score.h"
#include "mscore.h"
#include "xml.h"
namespace Ms {

View file

@ -224,7 +224,7 @@ ClefTypeList Staff::clefTypeList(int tick) const
ClefType Staff::clef(int tick) const
{
ClefTypeList c = clefs.clef(tick);
return score()->concertPitch() ? c._concertClef : c._transposingClef;
return score()->styleB(ST_concertPitch) ? c._concertClef : c._transposingClef;
}
ClefType Staff::clef(Segment* segment) const

View file

@ -17,6 +17,7 @@
#include "staff.h"
#include "part.h"
#include "mscore.h"
#include "xml.h"
namespace Ms {

View file

@ -14,6 +14,7 @@
#include "stafftext.h"
#include "system.h"
#include "staff.h"
#include "xml.h"
namespace Ms {

View file

@ -18,6 +18,7 @@
#include "hook.h"
#include "tremolo.h"
#include "note.h"
#include "xml.h"
// TEMPORARY HACK!!
#include "sym.h"

View file

@ -15,6 +15,7 @@
#include "tempo.h"
#include "system.h"
#include "measure.h"
#include "xml.h"
namespace Ms {

View file

@ -18,6 +18,7 @@
#include "box.h"
#include "textframe.h"
#include "sym.h"
#include "xml.h"
namespace Ms {

View file

@ -18,6 +18,7 @@
#include "measure.h"
#include "segment.h"
#include "stem.h"
#include "xml.h"
namespace Ms {

View file

@ -16,6 +16,7 @@
#include "staff.h"
#include "chord.h"
#include "note.h"
#include "xml.h"
namespace Ms {

View file

@ -98,9 +98,11 @@ void updateNoteLines(Segment* segment, int track)
if (chord && chord->type() == Element::CHORD) {
for (Note* n : chord->notes())
n->updateLine();
chord->sortNotes();
for (Chord* gc : chord->graceNotes()) {
for(Note* gn : gc->notes())
for (Note* gn : gc->notes())
gn->updateLine();
gc->sortNotes();
}
}
}
@ -553,7 +555,7 @@ void Score::undoChangeClef(Staff* ostaff, Segment* seg, ClefType st)
tp = st;
}
else {
bool concertPitch = score->concertPitch();
bool concertPitch = clef->concertPitch();
if (concertPitch) {
cp = st;
tp = clef->transposingClef();
@ -1077,14 +1079,14 @@ void Score::undoAddElement(Element* element)
int sm = 0;
if (cr1->staffIdx() != cr2->staffIdx())
sm = cr1->staffMove() + cr2->staffMove();
Chord* c2 = 0;
if (ns2) {
Element* e = ns2->element((staffIdx + sm) * VOICES + cr2->voice());
if (e->type() == Element::CHORD)
c2 = static_cast<Chord*>(e);
}
Note* nn1 = c1->findNote(n1->pitch());
Note* nn2 = c2 ? c2->findNote(n2->pitch()) : 0;
Tie* ntie = static_cast<Tie*>(ne);
@ -3112,7 +3114,7 @@ void ChangeClefType::flip()
clef->setConcertClef(concertClef);
clef->setTransposingClef(transposingClef);
clef->setClefType(clef->score()->concertPitch() ? concertClef : transposingClef);
clef->setClefType(clef->concertPitch() ? concertClef : transposingClef);
clef->staff()->addClef(clef);
Segment* segment = clef->segment();

View file

@ -28,14 +28,15 @@ QString docName;
int XmlReader::intAttribute(const char* s, int _default) const
{
if (attributes().hasAttribute(s))
return attributes().value(s).toString().toInt();
// return attributes().value(s).toString().toInt();
return attributes().value(s).toInt();
else
return _default;
}
int XmlReader::intAttribute(const char* s) const
{
return attributes().value(s).toString().toInt();
return attributes().value(s).toInt();
}
//---------------------------------------------------------
@ -44,14 +45,13 @@ int XmlReader::intAttribute(const char* s) const
double XmlReader::doubleAttribute(const char* s) const
{
QString value(attributes().value(s).toString());
return value.toDouble();
return attributes().value(s).toDouble();
}
double XmlReader::doubleAttribute(const char* s, double _default) const
{
if (attributes().hasAttribute(s))
return attributes().value(s).toUtf8().toDouble();
return attributes().value(s).toDouble();
else
return _default;
}

View file

@ -53,7 +53,7 @@ class XmlReader : public QXmlStreamReader {
void htmlToString(int level, QString*);
public:
XmlReader(QFile* f) : QXmlStreamReader(f) { docName = f->fileName(); }
XmlReader(QFile* f) : QXmlStreamReader(f), docName(f->fileName()) {}
XmlReader(const QByteArray& d, const QString& s = QString()) : QXmlStreamReader(d), docName(s) {}
XmlReader(QIODevice* d, const QString& s = QString()) : QXmlStreamReader(d), docName(s) {}
XmlReader(const QString& d, const QString& s = QString()) : QXmlStreamReader(d), docName(s) {}

View file

@ -26,6 +26,7 @@
#include "preferences.h"
#include "icons.h"
#include "libmscore/mscore.h"
#include "libmscore/xml.h"
namespace Ms {

View file

@ -1074,7 +1074,6 @@ ShowNoteWidget::ShowNoteWidget()
connect(nb.tieBack, SIGNAL(clicked()), SLOT(tieBackClicked()));
connect(nb.accidental, SIGNAL(clicked()), SLOT(accidentalClicked()));
connect(nb.fingering, SIGNAL(itemClicked(QListWidgetItem*)), SLOT(gotoElement(QListWidgetItem*)));
connect(nb.tpc, SIGNAL(valueChanged(int)), SLOT(tpcChanged(int)));
connect(nb.dot1, SIGNAL(clicked()), SLOT(dot1Clicked()));
connect(nb.dot2, SIGNAL(clicked()), SLOT(dot2Clicked()));
connect(nb.dot3, SIGNAL(clicked()), SLOT(dot3Clicked()));
@ -1090,12 +1089,14 @@ void ShowNoteWidget::setElement(Element* e)
ShowElementBase::setElement(e);
nb.pitch->setValue(note->pitch());
nb.epitch->setValue(note->epitch());
nb.tuning->setValue(note->tuning());
nb.line->setValue(note->line());
nb.string->setValue(note->string());
nb.fret->setValue(note->fret());
nb.mirror->setChecked(note->mirror());
nb.tpc->setValue(note->tpc());
nb.tpc1->setValue(note->tpc1());
nb.tpc2->setValue(note->tpc2());
nb.headGroup->setValue(int(note->headGroup()));
nb.hidden->setChecked(note->hidden());
nb.subchannel->setValue(note->subchannel());
@ -1150,16 +1151,6 @@ void ShowNoteWidget::dot3Clicked()
emit elementChanged(((Note*)element())->dot(2));
}
//---------------------------------------------------------
// tpcChanged
//---------------------------------------------------------
void ShowNoteWidget::tpcChanged(int val)
{
((Note*)element())->setTpc(val);
emit scoreChanged();
}
//---------------------------------------------------------
// tieForClicked
//---------------------------------------------------------

View file

@ -254,7 +254,6 @@ class ShowNoteWidget : public ShowElementBase {
void tieForClicked();
void tieBackClicked();
void accidentalClicked();
void tpcChanged(int);
void dot1Clicked();
void dot2Clicked();
void dot3Clicked();

View file

@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>525</width>
<height>301</height>
<width>807</width>
<height>309</height>
</rect>
</property>
<property name="windowTitle">
@ -17,7 +17,16 @@
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<property name="leftMargin">
<number>8</number>
</property>
<property name="topMargin">
<number>8</number>
</property>
<property name="rightMargin">
<number>8</number>
</property>
<property name="bottomMargin">
<number>8</number>
</property>
<item>
@ -87,30 +96,17 @@
</property>
</widget>
</item>
<item row="2" column="0">
<item row="3" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string notr="true" comment="do not translate">TPC</string>
<string notr="true" comment="do not translate">TPC2</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="tpc">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="2">
<item row="3" column="2">
<widget class="QLabel" name="label_7">
<property name="text">
<string notr="true" comment="do not translate">HGrp.</string>
@ -120,7 +116,7 @@
</property>
</widget>
</item>
<item row="2" column="3">
<item row="3" column="3">
<widget class="QSpinBox" name="headGroup">
<property name="toolTip">
<string notr="true">note head group</string>
@ -133,7 +129,7 @@
</property>
</widget>
</item>
<item row="3" column="0">
<item row="4" column="0">
<widget class="QLabel" name="label_3">
<property name="text">
<string notr="true" comment="do not translate">Line</string>
@ -149,7 +145,7 @@
</property>
</widget>
</item>
<item row="3" column="1">
<item row="4" column="1">
<widget class="QSpinBox" name="line">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -165,45 +161,42 @@
</property>
</widget>
</item>
<item row="3" column="2" colspan="2">
<item row="4" column="2" colspan="2">
<widget class="QPushButton" name="tieFor">
<property name="text">
<string notr="true" comment="do not translate">Tie Forw.</string>
</property>
</widget>
</item>
<item row="4" column="2" colspan="2">
<widget class="QPushButton" name="tieBack">
<property name="text">
<string notr="true" comment="do not translate">Tie Back</string>
</property>
</widget>
</item>
<item row="5" column="2" colspan="2">
<widget class="QPushButton" name="accidental">
<property name="text">
<string notr="true" comment="do not translate">Accidental</string>
</property>
</widget>
</item>
<item row="8" column="0" colspan="2">
<item row="9" column="0" colspan="2">
<widget class="QCheckBox" name="mirror">
<property name="text">
<string notr="true" comment="do not translate">Mirror Head</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_5">
<item row="5" column="2" colspan="2">
<widget class="QPushButton" name="tieBack">
<property name="text">
<string notr="true" comment="do not translate">S-Channel</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
<string notr="true" comment="do not translate">Tie Back</string>
</property>
</widget>
</item>
<item row="5" column="1">
<item row="8" column="4">
<widget class="QPushButton" name="dot1">
<property name="text">
<string notr="true">Dot1</string>
</property>
</widget>
</item>
<item row="6" column="2" colspan="2">
<widget class="QPushButton" name="accidental">
<property name="text">
<string notr="true" comment="do not translate">Accidental</string>
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QSpinBox" name="subchannel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -216,7 +209,27 @@
</property>
</widget>
</item>
<item row="1" column="2">
<item row="6" column="0">
<widget class="QLabel" name="label_5">
<property name="text">
<string notr="true" comment="do not translate">S-Channel</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="3">
<widget class="QSpinBox" name="velo">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="maximum">
<number>127</number>
</property>
</widget>
</item>
<item row="2" column="2">
<widget class="QLabel" name="label_11">
<property name="text">
<string notr="true">Velo</string>
@ -226,15 +239,8 @@
</property>
</widget>
</item>
<item row="1" column="3">
<widget class="QSpinBox" name="velo">
<property name="readOnly">
<bool>true</bool>
</property>
<property name="maximum">
<number>127</number>
</property>
</widget>
<item row="3" column="5" rowspan="5" colspan="2">
<widget class="QListWidget" name="fingering"/>
</item>
<item row="0" column="4">
<widget class="QLabel" name="label_12">
@ -249,23 +255,7 @@
</property>
</widget>
</item>
<item row="2" column="4">
<widget class="QLabel" name="label_10">
<property name="toolTip">
<string notr="true"/>
</property>
<property name="text">
<string notr="true" comment="do not translate">Elements</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="2" column="5" rowspan="5" colspan="2">
<widget class="QListWidget" name="fingering"/>
</item>
<item row="8" column="5" colspan="2">
<item row="9" column="5" colspan="2">
<widget class="QComboBox" name="userMirror">
<item>
<property name="text">
@ -284,14 +274,27 @@
</item>
</widget>
</item>
<item row="8" column="2" colspan="2">
<item row="3" column="4">
<widget class="QLabel" name="label_10">
<property name="toolTip">
<string notr="true"/>
</property>
<property name="text">
<string notr="true" comment="do not translate">Elements</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="9" column="2" colspan="2">
<widget class="QCheckBox" name="hidden">
<property name="text">
<string notr="true" comment="do not translate">Hidden</string>
</property>
</widget>
</item>
<item row="4" column="1">
<item row="5" column="1">
<widget class="QDoubleSpinBox" name="tuning">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
@ -310,7 +313,7 @@
</property>
</widget>
</item>
<item row="4" column="0">
<item row="5" column="0">
<widget class="QLabel" name="label_4">
<property name="text">
<string notr="true">Tuning</string>
@ -320,7 +323,7 @@
</property>
</widget>
</item>
<item row="7" column="0">
<item row="8" column="0">
<widget class="QLabel" name="label_14">
<property name="text">
<string notr="true">String</string>
@ -330,7 +333,7 @@
</property>
</widget>
</item>
<item row="7" column="1">
<item row="8" column="1">
<widget class="QSpinBox" name="string">
<property name="readOnly">
<bool>true</bool>
@ -346,7 +349,7 @@
</property>
</widget>
</item>
<item row="7" column="2">
<item row="8" column="2">
<widget class="QLabel" name="label_15">
<property name="text">
<string notr="true">Fret</string>
@ -356,7 +359,7 @@
</property>
</widget>
</item>
<item row="7" column="3">
<item row="8" column="3">
<widget class="QSpinBox" name="fret">
<property name="readOnly">
<bool>true</bool>
@ -372,30 +375,94 @@
</property>
</widget>
</item>
<item row="7" column="4">
<widget class="QPushButton" name="dot1">
<property name="text">
<string notr="true">Dot1</string>
</property>
</widget>
</item>
<item row="7" column="5">
<widget class="QPushButton" name="dot2">
<property name="text">
<string notr="true">Dot2</string>
</property>
</widget>
</item>
<item row="7" column="6">
<item row="8" column="6">
<widget class="QPushButton" name="dot3">
<property name="text">
<string notr="true">Dot3</string>
</property>
</widget>
</item>
<item row="0" column="5" rowspan="2" colspan="2">
<item row="8" column="5">
<widget class="QPushButton" name="dot2">
<property name="text">
<string notr="true">Dot2</string>
</property>
</widget>
</item>
<item row="0" column="5" rowspan="3" colspan="2">
<widget class="QListWidget" name="noteEvents"/>
</item>
<item row="2" column="1">
<widget class="QSpinBox" name="tpc1">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QSpinBox" name="tpc2">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_8">
<property name="text">
<string notr="true" comment="do not translate">TPC1</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QSpinBox" name="epitch">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="readOnly">
<bool>true</bool>
</property>
<property name="maximum">
<number>127</number>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QLabel" name="label_9">
<property name="text">
<string notr="true" comment="do not translate">ePitch</string>
</property>
<property name="textFormat">
<enum>Qt::PlainText</enum>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>pitch</cstring>
</property>
</widget>
</item>
</layout>
</widget>
</item>

View file

@ -24,6 +24,7 @@
#include "libmscore/spanner.h"
#include "libmscore/chord.h"
#include "libmscore/icon.h"
#include "libmscore/xml.h"
#include "musescore.h"
#include "scoreview.h"

View file

@ -17,6 +17,7 @@
#include "libmscore/page.h"
#include "libmscore/icon.h"
#include "libmscore/chord.h"
#include "libmscore/xml.h"
namespace Ms {

View file

@ -29,6 +29,7 @@
#include "libmscore/symbol.h"
#include "libmscore/chordlist.h"
#include "libmscore/mscore.h"
#include "libmscore/xml.h"
namespace Ms {

View file

@ -27,6 +27,7 @@
#include "keycanvas.h"
#include "libmscore/clef.h"
#include "libmscore/mscore.h"
#include "libmscore/xml.h"
namespace Ms {

View file

@ -212,8 +212,8 @@ void domError(const QDomElement& e)
{
QString m;
QString s = domElementPath(e);
if (!docName.isEmpty())
m = QString("<%1>:").arg(docName);
// if (!docName.isEmpty())
// m = QString("<%1>:").arg(docName);
int ln = e.lineNumber();
if (ln != -1)
m += QString("line:%1 ").arg(ln);
@ -235,8 +235,8 @@ void domNotImplemented(const QDomElement& e)
if (!MScore::debugMode)
return;
QString s = domElementPath(e);
if (!docName.isEmpty())
qDebug("<%s>:", qPrintable(docName));
// if (!docName.isEmpty())
// qDebug("<%s>:", qPrintable(docName));
qDebug("%s: Node not implemented: <%s>, type %d",
qPrintable(s), qPrintable(e.tagName()), e.nodeType());
if (e.isText())

View file

@ -16,6 +16,7 @@
#include "libmscore/segment.h"
#include "libmscore/repeatlist.h"
#include "libmscore/system.h"
#include "libmscore/xml.h"
namespace Ms {

View file

@ -48,6 +48,7 @@ class MeasureBase;
class Staff;
class OmrView;
class PositionCursor;
class Tuplet;
enum class POS;
@ -230,7 +231,7 @@ class ScoreView : public QWidget, public MuseScoreView {
void cmdEnterRest();
void cmdTuplet(int n, ChordRest*);
void cmdTuplet(int);
void cmdCreateTuplet( ChordRest* cr, Tuplet* tuplet);
void cmdCreateTuplet(ChordRest* cr, Tuplet* tuplet);
void cmdRepeatSelection();
void cmdChangeEnharmonic(bool);

View file

@ -60,6 +60,7 @@ void TestBeam::initTestCase()
void TestBeam::beam(const char* path)
{
Score* score = readScore(DIR + path);
score->updateNotes();
score->doLayout();
QVERIFY(score);
QVERIFY(saveCompareScore(score, path, DIR + path));

View file

@ -18,6 +18,7 @@
#include "libmscore/segment.h"
#include "libmscore/chordrest.h"
#include "libmscore/chord.h"
#include "libmscore/xml.h"
#define DIR QString("libmscore/copypaste/")

View file

@ -16,9 +16,8 @@
#include "libmscore/score.h"
#include "libmscore/system.h"
#include "libmscore/measure.h"
//#include "libmscore/segment.h"
//#include "libmscore/chordrest.h"
#include "libmscore/chord.h"
#include "libmscore/xml.h"
#define DIR QString("libmscore/copypastesymbollist/")

View file

@ -23,6 +23,7 @@
#include "synthesizer/msynthesizer.h"
#include "mscore/musescoreCore.h"
#include "mscore/shortcut.h"
#include "libmscore/xml.h"
namespace Ms {