Add pure trill line type

This commit is contained in:
briff 2012-10-15 23:58:40 +02:00
parent 6952215707
commit 6cd5de0d0e
3 changed files with 21 additions and 8 deletions

View file

@ -76,11 +76,17 @@ void TrillSegment::draw(QPainter* painter) const
n = int(floor((x2-x1) / w2));
y = -b1.height();
break;
case Trill::PURE_LINE:
sym = noSym;
x0 = 0;
x1 = 0;
n = int(floor((x2-x1) / w2));
y = 0.0;
}
if (n <= 0)
n = 1;
symbols[idx][sym].draw(painter, mag, QPointF(x0, y));
if (sym != noSym)
symbols[idx][sym].draw(painter, mag, QPointF(x0, y));
symbols[idx][trillelementSym].draw(painter, mag, QPointF(x1, b2.y() * .9), n);
}
else {
@ -275,6 +281,8 @@ void Trill::setSubtype(const QString& s)
_subtype = DOWNPRALL_LINE;
else if (s == "prallprall")
_subtype = PRALLPRALL_LINE;
else if (s == "pure")
_subtype = PURE_LINE;
else
qDebug("Trill::setSubtype: unknown <%s>", qPrintable(s));
}
@ -294,6 +302,8 @@ QString Trill::subtypeName() const
return "downprall";
case PRALLPRALL_LINE:
return "prallprall";
case PURE_LINE:
return "pure";
default:
qDebug("unknown Trill subtype %d", subtype());
return "?";

View file

@ -41,7 +41,7 @@ class TrillSegment : public LineSegment {
//---------------------------------------------------------
// @@ 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 {
@ -50,7 +50,7 @@ class Trill : public SLine {
public:
enum TrillType {
TRILL_LINE, UPPRALL_LINE, DOWNPRALL_LINE, PRALLPRALL_LINE
TRILL_LINE, UPPRALL_LINE, DOWNPRALL_LINE, PRALLPRALL_LINE, PURE_LINE
};
private:

View file

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>287</width>
<height>68</height>
<height>86</height>
</rect>
</property>
<property name="windowTitle">
@ -74,14 +74,17 @@
<string>prall prall</string>
</property>
</item>
<item>
<property name="text">
<string>pure line</string>
</property>
</item>
</widget>
</item>
</layout>
</item>
</layout>
</widget>
<resources>
<include location="musescore.qrc"/>
</resources>
<resources/>
<connections/>
</ui>