Skip to content

Commit

Permalink
Merge pull request #110 from briff/pure_trill_line
Browse files Browse the repository at this point in the history
18524 Pure trill line
  • Loading branch information
lasconic committed Oct 22, 2012
2 parents 36c7b4e + aa8ff15 commit fa4ea29
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
14 changes: 12 additions & 2 deletions libmscore/trill.cpp
Expand Up @@ -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 {
Expand Down Expand Up @@ -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));
}
Expand All @@ -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 "?";
Expand Down
4 changes: 2 additions & 2 deletions libmscore/trill.h
Expand Up @@ -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 {
Expand All @@ -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:
Expand Down
5 changes: 5 additions & 0 deletions mscore/inspector_trill.ui
Expand Up @@ -74,6 +74,11 @@
<string>prall prall</string>
</property>
</item>
<item>
<property name="text">
<string>pure line</string>
</property>
</item>
</widget>
</item>
</layout>
Expand Down

0 comments on commit fa4ea29

Please sign in to comment.