bool Volta::setProperty(P_ID propertyId, const QVariant& val) { switch (propertyId) { case P_ID::VOLTA_TYPE: setVoltaType(Type(val.toInt())); break; case P_ID::VOLTA_ENDING: setEndings(val.value<QList<int>>()); break; case P_ID::LINE_WIDTH: lineWidthStyle = PropertyStyle::UNSTYLED; setLineWidth(val.value<Spatium>()); break; case P_ID::LINE_STYLE: lineStyleStyle = PropertyStyle::UNSTYLED; setLineStyle(Qt::PenStyle(val.toInt())); break; default: if (!TextLineBase::setProperty(propertyId, val)) return false; break; } triggerLayout(); return true; }
bool Volta::setProperty(P_ID propertyId, const QVariant& val) { switch (propertyId) { case P_ID::VOLTA_ENDING: setEndings(val.value<QList<int>>()); break; default: if (!TextLineBase::setProperty(propertyId, val)) return false; break; } triggerLayout(); return true; }