QVariant Ottava::propertyDefault(Pid pid) const { switch (pid) { case Pid::OTTAVA_TYPE: return QVariant(); case Pid::END_HOOK_TYPE: return int(HookType::HOOK_90); case Pid::LINE_VISIBLE: return true; case Pid::BEGIN_TEXT_OFFSET: case Pid::CONTINUE_TEXT_OFFSET: case Pid::END_TEXT_OFFSET: return QPointF(); case Pid::BEGIN_TEXT_PLACE: case Pid::CONTINUE_TEXT_PLACE: case Pid::END_TEXT_PLACE: return int(PlaceText::LEFT); case Pid::BEGIN_HOOK_TYPE: return int(HookType::NONE); case Pid::BEGIN_HOOK_HEIGHT: return Spatium(.0); case Pid::END_TEXT: return QString(""); case Pid::PLACEMENT: return styleValue(Pid::PLACEMENT, getPropertyStyle(Pid::PLACEMENT)); default: return TextLineBase::propertyDefault(pid); } }
bool InstrumentName::setProperty(P_ID id, const QVariant& v) { bool rv = true; switch (id) { case P_ID::INAME_LAYOUT_POSITION: _layoutPos = v.toInt(); break; default: rv = Text::setProperty(id, v); break; } StyleIdx sidx = getPropertyStyle(id); if (sidx != StyleIdx::NOSTYLE) { score()->undoChangeStyleVal(sidx, getProperty(id)); } score()->setLayoutAll(); return rv; }