Add pure trill line type
This commit is contained in:
parent
6952215707
commit
6cd5de0d0e
3 changed files with 21 additions and 8 deletions
|
@ -76,11 +76,17 @@ void TrillSegment::draw(QPainter* painter) const
|
||||||
n = int(floor((x2-x1) / w2));
|
n = int(floor((x2-x1) / w2));
|
||||||
y = -b1.height();
|
y = -b1.height();
|
||||||
break;
|
break;
|
||||||
|
case Trill::PURE_LINE:
|
||||||
|
sym = noSym;
|
||||||
|
x0 = 0;
|
||||||
|
x1 = 0;
|
||||||
|
n = int(floor((x2-x1) / w2));
|
||||||
|
y = 0.0;
|
||||||
}
|
}
|
||||||
if (n <= 0)
|
if (n <= 0)
|
||||||
n = 1;
|
n = 1;
|
||||||
|
if (sym != noSym)
|
||||||
symbols[idx][sym].draw(painter, mag, QPointF(x0, y));
|
symbols[idx][sym].draw(painter, mag, QPointF(x0, y));
|
||||||
symbols[idx][trillelementSym].draw(painter, mag, QPointF(x1, b2.y() * .9), n);
|
symbols[idx][trillelementSym].draw(painter, mag, QPointF(x1, b2.y() * .9), n);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -275,6 +281,8 @@ void Trill::setSubtype(const QString& s)
|
||||||
_subtype = DOWNPRALL_LINE;
|
_subtype = DOWNPRALL_LINE;
|
||||||
else if (s == "prallprall")
|
else if (s == "prallprall")
|
||||||
_subtype = PRALLPRALL_LINE;
|
_subtype = PRALLPRALL_LINE;
|
||||||
|
else if (s == "pure")
|
||||||
|
_subtype = PURE_LINE;
|
||||||
else
|
else
|
||||||
qDebug("Trill::setSubtype: unknown <%s>", qPrintable(s));
|
qDebug("Trill::setSubtype: unknown <%s>", qPrintable(s));
|
||||||
}
|
}
|
||||||
|
@ -294,6 +302,8 @@ QString Trill::subtypeName() const
|
||||||
return "downprall";
|
return "downprall";
|
||||||
case PRALLPRALL_LINE:
|
case PRALLPRALL_LINE:
|
||||||
return "prallprall";
|
return "prallprall";
|
||||||
|
case PURE_LINE:
|
||||||
|
return "pure";
|
||||||
default:
|
default:
|
||||||
qDebug("unknown Trill subtype %d", subtype());
|
qDebug("unknown Trill subtype %d", subtype());
|
||||||
return "?";
|
return "?";
|
||||||
|
|
|
@ -41,7 +41,7 @@ class TrillSegment : public LineSegment {
|
||||||
|
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
// @@ Trill
|
// @@ Trill
|
||||||
// @P subtype enum TrillType TRILL_LINE, UPPRALL_LINE, DOWNPRALL_LINE, PRALLPRALL_LINE
|
// @P subtype enum TrillType TRILL_LINE, UPPRALL_LINE, DOWNPRALL_LINE, PRALLPRALL_LINE, PURE_LINE
|
||||||
//---------------------------------------------------------
|
//---------------------------------------------------------
|
||||||
|
|
||||||
class Trill : public SLine {
|
class Trill : public SLine {
|
||||||
|
@ -50,7 +50,7 @@ class Trill : public SLine {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum TrillType {
|
enum TrillType {
|
||||||
TRILL_LINE, UPPRALL_LINE, DOWNPRALL_LINE, PRALLPRALL_LINE
|
TRILL_LINE, UPPRALL_LINE, DOWNPRALL_LINE, PRALLPRALL_LINE, PURE_LINE
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>287</width>
|
<width>287</width>
|
||||||
<height>68</height>
|
<height>86</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -74,14 +74,17 @@
|
||||||
<string>prall prall</string>
|
<string>prall prall</string>
|
||||||
</property>
|
</property>
|
||||||
</item>
|
</item>
|
||||||
|
<item>
|
||||||
|
<property name="text">
|
||||||
|
<string>pure line</string>
|
||||||
|
</property>
|
||||||
|
</item>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="musescore.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Reference in a new issue