void Articulation::setArticulationType(ArticulationType idx) { _articulationType = idx; _anchor = score()->style()->articulationAnchor(_articulationType); anchorStyle = PropertyStyle::STYLED; _timeStretch = articulationList[articulationType()].timeStretch; }
void Articulation::draw(QPainter* painter) const { SymId sym = _up ? articulationList[int(articulationType())].upSym : articulationList[int(articulationType())].downSym; ArticulationShowIn flags = articulationList[int(articulationType())].flags; if (staff()) { if (staff()->staffGroup() == StaffGroup::TAB) { if (!(flags & ArticulationShowIn::TABLATURE)) return; } else { if (!(flags & ArticulationShowIn::PITCHED_STAFF)) return; } } painter->setPen(curColor()); drawSymbol(sym, painter, QPointF(-0.5 * width(), 0.0)); }
void Articulation::draw(QPainter* painter) const { SymId sym = _up ? articulationList[articulationType()].upSym : articulationList[articulationType()].downSym; int flags = articulationList[articulationType()].flags; if (staff()) { if (staff()->staffGroup() == TAB_STAFF_GROUP) { if (!(flags & ARTICULATION_SHOW_IN_TABLATURE)) return; } else { if (!(flags & ARTICULATION_SHOW_IN_PITCHED_STAFF)) return; } } painter->setPen(curColor()); drawSymbol(sym, painter, QPointF(-0.5 * width(), _up ? 0.0 : height())); }
void Articulation::draw(QPainter* painter) const { SymId sym = _up ? articulationList[articulationType()].upSym : articulationList[articulationType()].downSym; int flags = articulationList[articulationType()].flags; if (staff()) { if (staff()->staffGroup() == TAB_STAFF) { if (!(flags & ARTICULATION_SHOW_IN_TABLATURE)) return; } else { if (!(flags & ARTICULATION_SHOW_IN_PITCHED_STAFF)) return; } } painter->setPen(curColor()); symbols[score()->symIdx()][sym].draw(painter, magS()); }
void Articulation::setArticulationType(ArticulationType idx) { _articulationType = idx; _anchor = score()->style()->articulationAnchor(int(_articulationType)); anchorStyle = PropertyStyle::STYLED; _timeStretch = articulationList[int(articulationType())].timeStretch; _ornamentStyle = MScore::OrnamentStyle::DEFAULT; setPlayArticulation(true); }
void Articulation::reset() { #if 0 if (_direction != Direction_AUTO) undoChangeProperty(P_ID::DIRECTION, Direction_AUTO); ArticulationAnchor a = score()->style()->articulationAnchor(int(articulationType())); if (_anchor != a) undoChangeProperty(P_ID::ARTICULATION_ANCHOR, int(a)); #endif Element::reset(); }
void Articulation::reset() { if (_direction != MScore::AUTO) score()->undoChangeProperty(this, P_DIRECTION, int(MScore::AUTO)); ArticulationAnchor a = score()->style()->articulationAnchor(articulationType()); if (_anchor != a) score()->undoChangeProperty(this, P_ARTICULATION_ANCHOR, int(a)); Element::reset(); if (chordRest()) chordRest()->layoutArticulations(); score()->addRefresh(canvasBoundingRect()); }
void Articulation::write(Xml& xml) const { xml.stag("Articulation"); if (!_channelName.isEmpty()) xml.tagE(QString("channel name=\"%1\"").arg(_channelName)); writeProperty(xml, P_DIRECTION); if (_timeStretch != 1.0) xml.tag("timeStretch", _timeStretch); xml.tag("subtype", subtypeName()); Element::writeProperties(xml); if (_anchor != score()->style()->articulationAnchor(articulationType())) xml.tag("anchor", int(_anchor)); xml.etag(); }
QVariant Articulation::propertyDefault(P_ID propertyId) const { switch(propertyId) { case P_DIRECTION: return int(MScore::AUTO); case P_ARTICULATION_ANCHOR: return int(score()->style()->articulationAnchor(_articulationType)); case P_TIME_STRETCH: return articulationList[articulationType()].timeStretch; default: break; } return Element::propertyDefault(propertyId); }
void Fermata::draw(QPainter* painter) const { #if 0 SymId sym = symId(); FermataShowIn flags = articulationList[int(articulationType())].flags; if (staff()) { if (staff()->staffGroup() == StaffGroup::TAB) { if (!(flags & FermataShowIn::TABLATURE)) return; } else { if (!(flags & FermataShowIn::PITCHED_STAFF)) return; } } #endif painter->setPen(curColor()); drawSymbol(_symId, painter, QPointF(-0.5 * width(), 0.0)); }
QVariant Articulation::propertyDefault(P_ID propertyId) const { switch(propertyId) { case P_ID::DIRECTION: return int(MScore::Direction::AUTO); case P_ID::ARTICULATION_ANCHOR: return int(score()->style()->articulationAnchor(int(_articulationType))); case P_ID::TIME_STRETCH: return articulationList[int(articulationType())].timeStretch; case P_ID::ORNAMENT_STYLE: //return int(score()->style()->ornamentStyle(_ornamentStyle)); return int(MScore::OrnamentStyle::DEFAULT); case P_ID::PLAY: return true; default: break; } return Element::propertyDefault(propertyId); }
QString Articulation::subtypeUserName() const { return qApp->translate("articulation", articulationList[int(articulationType())].description.toUtf8().constData()); }
void Articulation::setArticulationType(ArticulationType idx) { _articulationType = idx; _anchor = score()->style()->articulationAnchor(idx); _timeStretch = articulationList[articulationType()].timeStretch; }
void Articulation::layout() { SymId sym = _up ? articulationList[articulationType()].upSym : articulationList[articulationType()].downSym; QRectF b(symBbox(sym)); setbbox(b.translated(-0.5 * b.width(), _up ? 0.0 : b.height())); }
QString Articulation::subtypeUserName() const { return articulationList[articulationType()].description; }
void Articulation::layout() { SymId sym = _up ? articulationList[articulationType()].upSym : articulationList[articulationType()].downSym; setbbox(score()->sym(sym).bbox(magS())); }
QString Articulation::subtypeName() const { return articulationList[articulationType()].name; }