bool Hairpin::setProperty(P_ID id, const QVariant& v) { switch (id) { case P_HAIRPIN_TYPE: _hairpinType = HairpinType(v.toInt()); setGenerated(false); break; case P_VELO_CHANGE: _veloChange = v.toInt(); break; case P_DYNAMIC_RANGE: _dynRange = DynamicRange(v.toInt()); break; case P_LINE_WIDTH: lineWidthStyle = PropertyStyle::UNSTYLED; SLine::setProperty(id, v); break; case P_HAIRPIN_HEIGHT: hairpinHeightStyle = PropertyStyle::UNSTYLED; _hairpinHeight = Spatium(v.toDouble()); break; case P_HAIRPIN_CONT_HEIGHT: hairpinContHeightStyle = PropertyStyle::UNSTYLED; _hairpinContHeight = Spatium(v.toDouble()); break; default: return SLine::setProperty(id, v); } return true; }
void Hairpin::read(XmlReader& e) { foreach(SpannerSegment* seg, spannerSegments()) delete seg; spannerSegments().clear(); setId(e.intAttribute("id", -1)); while (e.readNextStartElement()) { const QStringRef& tag(e.name()); if (tag == "subtype") _hairpinType = HairpinType(e.readInt()); else if (tag == "lineWidth") { setLineWidth(Spatium(e.readDouble())); lineWidthStyle = PropertyStyle::UNSTYLED; } else if (tag == "hairpinHeight") { setHairpinHeight(Spatium(e.readDouble())); hairpinHeightStyle = PropertyStyle::UNSTYLED; } else if (tag == "hairpinContHeight") { setHairpinContHeight(Spatium(e.readDouble())); hairpinContHeightStyle = PropertyStyle::UNSTYLED; } else if (tag == "veloChange") _veloChange = e.readInt(); else if (tag == "dynType") _dynRange = DynamicRange(e.readInt()); else if (!SLine::readProperties(e)) e.unknown(); } }
void Dynamic::read(XmlReader& e) { while (e.readNextStartElement()) { const QStringRef& tag = e.name(); if (tag == "subtype") { setDynamicType(e.readElementText()); } else if (tag == "velocity") _velocity = e.readInt(); else if (tag == "dynType") _dynRange = DynamicRange(e.readInt()); else if (!Text::readProperties(e)) e.unknown(); } setTextStyleType(TEXT_STYLE_DYNAMICS); }
bool Hairpin::setProperty(P_ID id, const QVariant& v) { switch (id) { case P_HAIRPIN_TYPE: _hairpinType = HairpinType(v.toInt()); setGenerated(false); break; case P_VELO_CHANGE: _veloChange = v.toInt(); break; case P_DYNAMIC_RANGE: _dynRange = DynamicRange(v.toInt()); break; default: return SLine::setProperty(id, v); } return true; }
void Hairpin::read(XmlReader& e) { foreach(SpannerSegment* seg, spannerSegments()) delete seg; spannerSegments().clear(); setId(e.intAttribute("id", -1)); while (e.readNextStartElement()) { const QStringRef& tag(e.name()); if (tag == "subtype") _hairpinType = HairpinType(e.readInt()); else if (tag == "veloChange") _veloChange = e.readInt(); else if (tag == "dynType") _dynRange = DynamicRange(e.readInt()); else if (!SLine::readProperties(e)) e.unknown(); } }
bool Dynamic::setProperty(P_ID propertyId, const QVariant& v) { switch (propertyId) { case P_DYNAMIC_RANGE: _dynRange = DynamicRange(v.toInt()); break; case P_VELOCITY: _velocity = v.toInt(); break; case P_SUBTYPE: _dynamicType = DynamicType(v.toInt()); break; default: if (!Text::setProperty(propertyId, v)) return false; break; } score()->setLayoutAll(true); return true; }