bool Trill::setProperty(P_ID propertyId, const QVariant& val) { switch(propertyId) { case P_ID::TRILL_TYPE: setTrillType(Type(val.toInt())); break; default: if (!SLine::setProperty(propertyId, val)) return false; break; } score()->setLayoutAll(true); return true; }
void Trill::read(XmlReader& e) { qDeleteAll(spannerSegments()); spannerSegments().clear(); e.addSpanner(e.intAttribute("id", -1), this); while (e.readNextStartElement()) { const QStringRef& tag(e.name()); if (tag == "subtype") setTrillType(e.readElementText()); else if (tag == "Accidental") { _accidental = new Accidental(score()); _accidental->read(e); _accidental->setParent(this); } else if (!SLine::readProperties(e)) e.unknown(); } }
bool Trill::setProperty(Pid propertyId, const QVariant& val) { switch(propertyId) { case Pid::TRILL_TYPE: setTrillType(Type(val.toInt())); break; case Pid::PLAY: setPlayArticulation(val.toBool()); break; case Pid::ORNAMENT_STYLE: setOrnamentStyle(MScore::OrnamentStyle(val.toInt())); break; default: if (!SLine::setProperty(propertyId, val)) return false; break; } score()->setLayoutAll(); return true; }
void Trill::read(XmlReader& e) { eraseSpannerSegments(); while (e.readNextStartElement()) { const QStringRef& tag(e.name()); if (tag == "subtype") setTrillType(e.readElementText()); else if (tag == "Accidental") { _accidental = new Accidental(score()); _accidental->read(e); _accidental->setParent(this); } else if ( tag == "ornamentStyle") readProperty(e, Pid::ORNAMENT_STYLE); else if ( tag == "play") setPlayArticulation(e.readBool()); else if (!SLine::readProperties(e)) e.unknown(); } }