Skip to content

Commit

Permalink
remove articulations from rest element
Browse files Browse the repository at this point in the history
  • Loading branch information
wschweer committed Jan 17, 2018
1 parent 5d1b354 commit 9d9cd89
Show file tree
Hide file tree
Showing 38 changed files with 642 additions and 672 deletions.
30 changes: 1 addition & 29 deletions libmscore/articulation.cpp
Expand Up @@ -37,7 +37,6 @@ Articulation::Articulation(Score* s)
_anchor = ArticulationAnchor::TOP_STAFF;
_direction = Direction::AUTO;
_up = true;
_timeStretch = 1.0;
_ornamentStyle = MScore::OrnamentStyle::DEFAULT;
setPlayArticulation(true);
}
Expand Down Expand Up @@ -115,8 +114,6 @@ bool Articulation::readProperties(XmlReader& e)
setProperty(P_ID::ORNAMENT_STYLE, Ms::getProperty(P_ID::ORNAMENT_STYLE, e));
else if ( tag == "play")
setPlayArticulation(e.readBool());
else if (tag == "timeStretch")
_timeStretch = e.readDouble();
else if (tag == "offset") {
if (score()->mscVersion() > 114)
Element::readProperties(e);
Expand All @@ -143,7 +140,6 @@ void Articulation::write(XmlWriter& xml) const
xml.tagE(QString("channel name=\"%1\"").arg(_channelName));
writeProperty(xml, P_ID::DIRECTION);
xml.tag("subtype", Sym::id2name(_symId));
writeProperty(xml, P_ID::TIME_STRETCH);
writeProperty(xml, P_ID::PLAY);
writeProperty(xml, P_ID::ORNAMENT_STYLE);
Element::writeProperties(xml);
Expand All @@ -166,7 +162,7 @@ QString Articulation::userName() const

void Articulation::draw(QPainter* painter) const
{
#if 0
#if 0 //TODO
SymId sym = symId();
ArticulationShowIn flags = articulationList[int(articulationType())].flags;
if (staff()) {
Expand Down Expand Up @@ -287,7 +283,6 @@ QVariant Articulation::getProperty(P_ID propertyId) const
switch (propertyId) {
case P_ID::DIRECTION: return QVariant::fromValue<Direction>(direction());
case P_ID::ARTICULATION_ANCHOR: return int(anchor());
case P_ID::TIME_STRETCH: return timeStretch();
case P_ID::ORNAMENT_STYLE: return int(ornamentStyle());
case P_ID::PLAY: return bool(playArticulation());
default:
Expand All @@ -314,10 +309,6 @@ bool Articulation::setProperty(P_ID propertyId, const QVariant& v)
case P_ID::ORNAMENT_STYLE:
setOrnamentStyle(MScore::OrnamentStyle(v.toInt()));
break;
case P_ID::TIME_STRETCH:
setTimeStretch(v.toDouble());
score()->fixTicks();
break;
default:
return Element::setProperty(propertyId, v);
}
Expand Down Expand Up @@ -397,9 +388,6 @@ QVariant Articulation::propertyDefault(P_ID propertyId) const
return int(ArticulationAnchor::TOP_STAFF);
}

case P_ID::TIME_STRETCH:
return 1.0; // articulationList[int(articulationType())].timeStretch;

case P_ID::ORNAMENT_STYLE:
//return int(score()->style()->ornamentStyle(_ornamentStyle));
return int(MScore::OrnamentStyle::DEFAULT);
Expand Down Expand Up @@ -467,7 +455,6 @@ PropertyFlags& Articulation::propertyFlags(P_ID id)
#if 0
switch (id) {
case P_ID::DIRECTION:
case P_ID::TIME_STRETCH:
case P_ID::ARTICULATION_ANCHOR:
return PropertyFlags::NOSTYLE;

Expand Down Expand Up @@ -499,7 +486,6 @@ void Articulation::resetProperty(P_ID id)
{
switch (id) {
case P_ID::DIRECTION:
case P_ID::TIME_STRETCH:
case P_ID::ORNAMENT_STYLE:
setProperty(id, propertyDefault(id));
return;
Expand All @@ -522,20 +508,6 @@ qreal Articulation::mag() const
return parent() ? parent()->mag() * score()->styleD(StyleIdx::articulationMag): 1.0;
}

//---------------------------------------------------------
// isFermata
//---------------------------------------------------------

bool Articulation::isFermata() const
{
return _symId == SymId::fermataAbove || _symId == SymId::fermataBelow
|| _symId == SymId::fermataLongAbove || _symId == SymId::fermataLongBelow
|| _symId == SymId::fermataLongHenzeAbove || _symId == SymId::fermataLongHenzeBelow
|| _symId == SymId::fermataShortAbove || _symId == SymId::fermataShortBelow
|| _symId == SymId::fermataShortHenzeAbove || _symId == SymId::fermataShortHenzeBelow
|| _symId == SymId::fermataVeryLongAbove || _symId == SymId::fermataVeryLongBelow
|| _symId == SymId::fermataVeryShortAbove || _symId == SymId::fermataVeryShortBelow; }

bool Articulation::isTenuto() const
{
return _symId == SymId::articTenutoAbove || _symId == SymId::articTenutoBelow;
Expand Down
6 changes: 0 additions & 6 deletions libmscore/articulation.h
Expand Up @@ -62,7 +62,6 @@ class Articulation final : public Element {
ArticulationAnchor _anchor;

bool _up;
qreal _timeStretch; // for fermata
MScore::OrnamentStyle _ornamentStyle; // for use in ornaments such as trill
bool _playArticulation;

Expand All @@ -78,7 +77,6 @@ class Articulation final : public Element {

virtual qreal mag() const override;


SymId symId() const { return _symId; }
void setSymId(SymId id);
virtual int subtype() const override { return int(_symId); }
Expand Down Expand Up @@ -115,9 +113,6 @@ class Articulation final : public Element {
ArticulationAnchor anchor() const { return _anchor; }
void setAnchor(ArticulationAnchor v) { _anchor = v; }

qreal timeStretch() const { return _timeStretch; }
void setTimeStretch(qreal val) { _timeStretch = val; }

MScore::OrnamentStyle ornamentStyle() const { return _ornamentStyle; }
void setOrnamentStyle(MScore::OrnamentStyle val) { _ornamentStyle = val; }

Expand All @@ -129,7 +124,6 @@ class Articulation final : public Element {

QString accessibleInfo() const override;

bool isFermata() const;
bool isTenuto() const;
bool isStaccato() const;
bool isAccent() const;
Expand Down

0 comments on commit 9d9cd89

Please sign in to comment.