replaced QVariant to PropertyValue for propertyDefault
This commit is contained in:
parent
2706ddfff8
commit
bba2d97ec0
|
@ -32,6 +32,7 @@
|
|||
#include "undo.h"
|
||||
|
||||
using namespace mu;
|
||||
using namespace mu::engraving;
|
||||
|
||||
namespace Ms {
|
||||
//---------------------------------------------------------
|
||||
|
@ -591,7 +592,7 @@ void Accidental::undoSetSmall(bool val)
|
|||
// getProperty
|
||||
//---------------------------------------------------------
|
||||
|
||||
engraving::PropertyValue Accidental::getProperty(Pid propertyId) const
|
||||
PropertyValue Accidental::getProperty(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::ACCIDENTAL_TYPE: return int(_accidentalType);
|
||||
|
@ -607,7 +608,7 @@ engraving::PropertyValue Accidental::getProperty(Pid propertyId) const
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Accidental::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Accidental::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::ACCIDENTAL_TYPE: return int(AccidentalType::NONE);
|
||||
|
|
|
@ -140,7 +140,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid propertyId) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid propertyId) const override;
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
QString propertyUserValue(Pid) const override;
|
||||
|
||||
|
|
|
@ -764,7 +764,7 @@ bool Ambitus::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Ambitus::propertyDefault(Pid id) const
|
||||
PropertyValue Ambitus::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::HEAD_GROUP:
|
||||
|
|
|
@ -114,7 +114,7 @@ public:
|
|||
// properties
|
||||
mu::engraving::PropertyValue getProperty(Pid) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
|
||||
EngravingItem* nextSegmentElement() override;
|
||||
EngravingItem* prevSegmentElement() override;
|
||||
|
|
|
@ -755,7 +755,7 @@ bool Arpeggio::setProperty(Pid propertyId, const QVariant& val)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Arpeggio::propertyDefault(Pid propertyId) const
|
||||
engraving::PropertyValue Arpeggio::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::ARP_USER_LEN1:
|
||||
|
|
|
@ -116,7 +116,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid propertyId) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid propertyId) const override;
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
|
||||
// TODO: add a grip for moving the entire arpeggio
|
||||
|
|
|
@ -355,11 +355,11 @@ bool Articulation::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Articulation::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Articulation::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::DIRECTION:
|
||||
return QVariant::fromValue<Direction>(Direction::AUTO);
|
||||
return PropertyValue::fromValue<Direction>(Direction::AUTO);
|
||||
|
||||
case Pid::ORNAMENT_STYLE:
|
||||
//return int(score()->style()->ornamentStyle(_ornamentStyle));
|
||||
|
|
|
@ -134,7 +134,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
void resetProperty(Pid id) override;
|
||||
Sid getPropertyStyle(Pid id) const override;
|
||||
|
||||
|
|
|
@ -1543,7 +1543,7 @@ void BarLine::undoChangeProperty(Pid id, const QVariant& v, PropertyFlags ps)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant BarLine::propertyDefault(Pid propertyId) const
|
||||
PropertyValue BarLine::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::BARLINE_TYPE:
|
||||
|
@ -1551,7 +1551,7 @@ QVariant BarLine::propertyDefault(Pid propertyId) const
|
|||
// wrong values on read (as the default may be different on read)
|
||||
// if (segment() && segment()->measure() && !segment()->measure()->nextMeasure())
|
||||
// return QVariant::fromValue(BarLineType::END);
|
||||
return QVariant::fromValue(BarLineType::NORMAL);
|
||||
return PropertyValue::fromValue(BarLineType::NORMAL);
|
||||
|
||||
case Pid::BARLINE_SPAN:
|
||||
return staff() ? staff()->barLineSpan() : false;
|
||||
|
|
|
@ -151,7 +151,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid propertyId) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid propertyId) const override;
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
void undoChangeProperty(Pid id, const QVariant&, PropertyFlags ps) override;
|
||||
using EngravingObject::undoChangeProperty;
|
||||
|
|
|
@ -2538,16 +2538,16 @@ bool Beam::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Beam::propertyDefault(Pid id) const
|
||||
PropertyValue Beam::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
// case Pid::SUB_STYLE: return int(Tid::BEAM);
|
||||
case Pid::STEM_DIRECTION: return QVariant::fromValue<Direction>(Direction::AUTO);
|
||||
case Pid::STEM_DIRECTION: return PropertyValue::fromValue<Direction>(Direction::AUTO);
|
||||
case Pid::DISTRIBUTE: return false;
|
||||
case Pid::GROW_LEFT: return 1.0;
|
||||
case Pid::GROW_RIGHT: return 1.0;
|
||||
case Pid::USER_MODIFIED: return false;
|
||||
case Pid::BEAM_POS: return QVariant::fromValue(beamPos());
|
||||
case Pid::BEAM_POS: return PropertyValue::fromValue(beamPos());
|
||||
default: return EngravingItem::propertyDefault(id);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -175,7 +175,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
|
||||
bool isGrace() const { return _isGrace; } // for debugger
|
||||
bool cross() const { return _cross; }
|
||||
|
|
|
@ -460,7 +460,7 @@ bool Bend::setProperty(Pid id, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Bend::propertyDefault(Pid id) const
|
||||
PropertyValue Bend::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::PLAY:
|
||||
|
@ -468,7 +468,7 @@ QVariant Bend::propertyDefault(Pid id) const
|
|||
case Pid::BEND_TYPE:
|
||||
return static_cast<int>(BendType::BEND);
|
||||
case Pid::BEND_CURVE:
|
||||
return QVariant::fromValue(BEND_CURVE);
|
||||
return PropertyValue::fromValue(BEND_CURVE);
|
||||
default:
|
||||
return EngravingItem::propertyDefault(id);
|
||||
}
|
||||
|
|
|
@ -72,7 +72,7 @@ public:
|
|||
// property methods
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
private:
|
||||
|
||||
|
|
|
@ -443,7 +443,7 @@ bool Box::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Box::propertyDefault(Pid id) const
|
||||
PropertyValue Box::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::BOX_HEIGHT:
|
||||
|
@ -757,7 +757,7 @@ bool HBox::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant HBox::propertyDefault(Pid id) const
|
||||
PropertyValue HBox::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::CREATE_SYSTEM_HEADER:
|
||||
|
|
|
@ -96,9 +96,10 @@ public:
|
|||
void copyValues(Box* origin);
|
||||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
virtual bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
virtual QVariant propertyDefault(Pid) const override;
|
||||
virtual QString accessibleExtraInfo() const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
QString accessibleExtraInfo() const override;
|
||||
|
||||
// TODO: add a grip for moving the entire box
|
||||
EditBehavior normalModeEditBehavior() const override { return EditBehavior::Edit; }
|
||||
|
@ -138,7 +139,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
std::vector<mu::PointF> gripsPositions(const EditData&) const override;
|
||||
};
|
||||
|
|
|
@ -480,12 +480,12 @@ bool Bracket::setProperty(Pid id, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Bracket::propertyDefault(Pid id) const
|
||||
PropertyValue Bracket::propertyDefault(Pid id) const
|
||||
{
|
||||
if (id == Pid::BRACKET_COLUMN) {
|
||||
return 0;
|
||||
}
|
||||
QVariant v = EngravingItem::propertyDefault(id);
|
||||
PropertyValue v = EngravingItem::propertyDefault(id);
|
||||
if (!v.isValid()) {
|
||||
v = _bi->propertyDefault(id);
|
||||
}
|
||||
|
|
|
@ -113,7 +113,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
void undoChangeProperty(Pid id, const QVariant& v, PropertyFlags ps) override;
|
||||
using EngravingObject::undoChangeProperty;
|
||||
|
|
|
@ -76,7 +76,7 @@ bool BracketItem::setProperty(Pid id, const QVariant& v)
|
|||
return true;
|
||||
}
|
||||
|
||||
QVariant BracketItem::propertyDefault(Pid id) const
|
||||
engraving::PropertyValue BracketItem::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::SYSTEM_BRACKET:
|
||||
|
|
|
@ -52,7 +52,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid) const override;
|
||||
bool setProperty(Pid, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
|
||||
int bracketSpan() const { return _bracketSpan; }
|
||||
BracketType bracketType() const { return _bracketType; }
|
||||
|
|
|
@ -220,7 +220,7 @@ bool Breath::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Breath::propertyDefault(Pid id) const
|
||||
PropertyValue Breath::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::PAUSE:
|
||||
|
|
|
@ -75,7 +75,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
EngravingItem* nextSegmentElement() override;
|
||||
EngravingItem* prevSegmentElement() override;
|
||||
|
|
|
@ -2782,12 +2782,12 @@ PropertyValue Chord::getProperty(Pid propertyId) const
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Chord::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Chord::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::NO_STEM: return false;
|
||||
case Pid::SMALL: return false;
|
||||
case Pid::STEM_DIRECTION: return QVariant::fromValue<Direction>(Direction::AUTO);
|
||||
case Pid::STEM_DIRECTION: return PropertyValue::fromValue<Direction>(Direction::AUTO);
|
||||
case Pid::PLAY: return true;
|
||||
default:
|
||||
return ChordRest::propertyDefault(propertyId);
|
||||
|
|
|
@ -243,7 +243,7 @@ public:
|
|||
void localSpatiumChanged(qreal oldValue, qreal newValue) override;
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
void reset() override;
|
||||
|
||||
|
|
|
@ -466,7 +466,7 @@ bool ChordLine::setProperty(Pid propertyId, const QVariant& val)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant ChordLine::propertyDefault(Pid pid) const
|
||||
PropertyValue ChordLine::propertyDefault(Pid pid) const
|
||||
{
|
||||
switch (pid) {
|
||||
case Pid::CHORD_LINE_STRAIGHT:
|
||||
|
|
|
@ -83,7 +83,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
|
||||
EngravingItem::EditBehavior normalModeEditBehavior() const override { return EngravingItem::EditBehavior::Edit; }
|
||||
|
|
|
@ -937,7 +937,7 @@ bool ChordRest::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant ChordRest::propertyDefault(Pid propertyId) const
|
||||
PropertyValue ChordRest::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::SMALL:
|
||||
|
|
|
@ -183,7 +183,7 @@ public:
|
|||
void localSpatiumChanged(qreal oldValue, qreal newValue) override;
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
bool isGrace() const;
|
||||
bool isGraceBefore() const;
|
||||
bool isGraceAfter() const;
|
||||
|
|
|
@ -561,7 +561,7 @@ bool Clef::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Clef::propertyDefault(Pid id) const
|
||||
PropertyValue Clef::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::CLEF_TYPE_CONCERT: return int(ClefType::INVALID);
|
||||
|
|
|
@ -201,7 +201,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
|
||||
EngravingItem* nextSegmentElement() override;
|
||||
EngravingItem* prevSegmentElement() override;
|
||||
|
|
|
@ -615,7 +615,7 @@ bool Dynamic::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Dynamic::propertyDefault(Pid id) const
|
||||
PropertyValue Dynamic::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::SUB_STYLE:
|
||||
|
@ -628,7 +628,7 @@ QVariant Dynamic::propertyDefault(Pid id) const
|
|||
if (isVelocityChangeAvailable()) {
|
||||
return dynList[int(dynamicType())].changeInVelocity;
|
||||
} else {
|
||||
return QVariant();
|
||||
return PropertyValue();
|
||||
}
|
||||
case Pid::VELO_CHANGE_SPEED:
|
||||
return int(Speed::NORMAL);
|
||||
|
|
|
@ -108,7 +108,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
QString propertyUserValue(Pid) const override;
|
||||
|
||||
|
|
|
@ -1394,7 +1394,7 @@ void EngravingItem::undoChangeProperty(Pid pid, const QVariant& val, PropertyFla
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant EngravingItem::propertyDefault(Pid pid) const
|
||||
PropertyValue EngravingItem::propertyDefault(Pid pid) const
|
||||
{
|
||||
switch (pid) {
|
||||
case Pid::GENERATED:
|
||||
|
@ -1402,9 +1402,9 @@ QVariant EngravingItem::propertyDefault(Pid pid) const
|
|||
case Pid::VISIBLE:
|
||||
return true;
|
||||
case Pid::COLOR:
|
||||
return QVariant::fromValue(engravingConfiguration()->defaultColor());
|
||||
return PropertyValue::fromValue(engravingConfiguration()->defaultColor());
|
||||
case Pid::PLACEMENT: {
|
||||
QVariant v = EngravingObject::propertyDefault(pid);
|
||||
PropertyValue v = EngravingObject::propertyDefault(pid);
|
||||
if (v.isValid()) { // if it's a styled property
|
||||
return v;
|
||||
}
|
||||
|
@ -1413,14 +1413,14 @@ QVariant EngravingItem::propertyDefault(Pid pid) const
|
|||
case Pid::SELECTED:
|
||||
return false;
|
||||
case Pid::OFFSET: {
|
||||
QVariant v = EngravingObject::propertyDefault(pid);
|
||||
PropertyValue v = EngravingObject::propertyDefault(pid);
|
||||
if (v.isValid()) { // if it's a styled property
|
||||
return v;
|
||||
}
|
||||
return QVariant::fromValue(PointF());
|
||||
return PropertyValue::fromValue(PointF());
|
||||
}
|
||||
case Pid::MIN_DISTANCE: {
|
||||
QVariant v = EngravingObject::propertyDefault(pid);
|
||||
PropertyValue v = EngravingObject::propertyDefault(pid);
|
||||
if (v.isValid()) {
|
||||
return v;
|
||||
}
|
||||
|
@ -1431,7 +1431,7 @@ QVariant EngravingItem::propertyDefault(Pid pid) const
|
|||
case Pid::Z:
|
||||
return int(type()) * 100;
|
||||
default: {
|
||||
QVariant v = EngravingObject::propertyDefault(pid);
|
||||
PropertyValue v = EngravingObject::propertyDefault(pid);
|
||||
|
||||
if (v.isValid()) {
|
||||
return v;
|
||||
|
@ -1441,7 +1441,7 @@ QVariant EngravingItem::propertyDefault(Pid pid) const
|
|||
return parent()->propertyDefault(pid);
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
return PropertyValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -533,7 +533,7 @@ public:
|
|||
bool setProperty(Pid, const QVariant&) override;
|
||||
void undoChangeProperty(Pid id, const QVariant&, PropertyFlags ps) override;
|
||||
using EngravingObject::undoChangeProperty;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
QString propertyUserValue(Pid) const override;
|
||||
virtual EngravingItem* propertyDelegate(Pid) { return 0; } // return Spanner for SpannerSegment for some properties
|
||||
|
|
|
@ -183,28 +183,28 @@ void EngravingObject::scanElements(void* data, void (* func)(void*, EngravingIte
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant EngravingObject::propertyDefault(Pid pid, Tid tid) const
|
||||
PropertyValue EngravingObject::propertyDefault(Pid pid, Tid tid) const
|
||||
{
|
||||
for (const StyledProperty& spp : *textStyle(tid)) {
|
||||
if (spp.pid == pid) {
|
||||
return styleValue(pid, spp.sid);
|
||||
}
|
||||
}
|
||||
return QVariant();
|
||||
return PropertyValue();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant EngravingObject::propertyDefault(Pid pid) const
|
||||
PropertyValue EngravingObject::propertyDefault(Pid pid) const
|
||||
{
|
||||
Sid sid = getPropertyStyle(pid);
|
||||
if (sid != Sid::NOSTYLE) {
|
||||
return styleValue(pid, sid);
|
||||
}
|
||||
// qDebug("<%s>(%d) not found in <%s>", propertyQmlName(pid), int(pid), name());
|
||||
return QVariant();
|
||||
return PropertyValue();
|
||||
}
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
@ -901,7 +901,7 @@ bool EngravingObject::isTextBase() const
|
|||
// styleValue
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant EngravingObject::styleValue(Pid pid, Sid sid) const
|
||||
PropertyValue EngravingObject::styleValue(Pid pid, Sid sid) const
|
||||
{
|
||||
switch (propertyType(pid)) {
|
||||
case P_TYPE::SP_REAL:
|
||||
|
|
|
@ -268,9 +268,9 @@ public:
|
|||
|
||||
virtual mu::engraving::PropertyValue getProperty(Pid) const = 0;
|
||||
virtual bool setProperty(Pid, const QVariant&) = 0;
|
||||
virtual QVariant propertyDefault(Pid) const;
|
||||
virtual mu::engraving::PropertyValue propertyDefault(Pid) const;
|
||||
virtual void resetProperty(Pid id);
|
||||
QVariant propertyDefault(Pid pid, Tid tid) const;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid pid, Tid tid) const;
|
||||
virtual bool sizeIsSpatiumDependent() const { return true; }
|
||||
virtual bool offsetIsSpatiumDependent() const { return true; }
|
||||
|
||||
|
@ -285,7 +285,7 @@ public:
|
|||
virtual PropertyFlags* propertyFlagsList() const { return _propertyFlagsList; }
|
||||
virtual PropertyFlags propertyFlags(Pid) const;
|
||||
bool isStyled(Pid pid) const;
|
||||
QVariant styleValue(Pid, Sid) const;
|
||||
mu::engraving::PropertyValue styleValue(Pid, Sid) const;
|
||||
|
||||
void setPropertyFlags(Pid, PropertyFlags);
|
||||
|
||||
|
|
|
@ -315,7 +315,7 @@ bool Fermata::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Fermata::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Fermata::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::PLACEMENT:
|
||||
|
|
|
@ -77,7 +77,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
void resetProperty(Pid id) override;
|
||||
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
|
|
|
@ -770,7 +770,7 @@ bool FiguredBassItem::setProperty(Pid propertyId, const QVariant& v)
|
|||
return true;
|
||||
}
|
||||
|
||||
QVariant FiguredBassItem::propertyDefault(Pid id) const
|
||||
PropertyValue FiguredBassItem::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::FBPREFIX:
|
||||
|
@ -1461,7 +1461,7 @@ bool FiguredBass::setProperty(Pid propertyId, const QVariant& v)
|
|||
return TextBase::setProperty(propertyId, v);
|
||||
}
|
||||
|
||||
QVariant FiguredBass::propertyDefault(Pid id) const
|
||||
PropertyValue FiguredBass::propertyDefault(Pid id) const
|
||||
{
|
||||
return TextBase::propertyDefault(id);
|
||||
}
|
||||
|
|
|
@ -219,7 +219,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
};
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
@ -328,7 +328,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
void appendItem(FiguredBassItem* item) { items.push_back(item); }
|
||||
};
|
||||
|
|
|
@ -267,7 +267,7 @@ QString Fingering::accessibleInfo() const
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Fingering::propertyDefault(Pid id) const
|
||||
engraving::PropertyValue Fingering::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::PLACEMENT:
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
void draw(mu::draw::Painter*) const override;
|
||||
void layout() override;
|
||||
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
|
||||
QString accessibleInfo() const override;
|
||||
};
|
||||
|
|
|
@ -1411,11 +1411,11 @@ bool FretDiagram::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant FretDiagram::propertyDefault(Pid pid) const
|
||||
PropertyValue FretDiagram::propertyDefault(Pid pid) const
|
||||
{
|
||||
// We shouldn't style the fret offset
|
||||
if (pid == Pid::FRET_OFFSET) {
|
||||
return QVariant(0);
|
||||
return PropertyValue(0);
|
||||
}
|
||||
|
||||
for (const StyledProperty& p : *styledProperties()) {
|
||||
|
|
|
@ -257,7 +257,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
qreal userMag() const { return _userMag; }
|
||||
void setUserMag(qreal m) { _userMag = m; }
|
||||
|
|
|
@ -747,7 +747,7 @@ bool Glissando::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Glissando::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Glissando::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::GLISS_TYPE:
|
||||
|
|
|
@ -93,7 +93,7 @@ public:
|
|||
// property/style methods
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
};
|
||||
} // namespace Ms
|
||||
|
|
|
@ -809,7 +809,7 @@ bool Hairpin::setProperty(Pid id, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Hairpin::propertyDefault(Pid id) const
|
||||
PropertyValue Hairpin::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::HAIRPIN_CIRCLEDTIP:
|
||||
|
@ -853,7 +853,7 @@ QVariant Hairpin::propertyDefault(Pid id) const
|
|||
case Pid::BEGIN_TEXT_OFFSET:
|
||||
case Pid::CONTINUE_TEXT_OFFSET:
|
||||
case Pid::END_TEXT_OFFSET:
|
||||
return QVariant::fromValue(PointF());
|
||||
return PropertyValue::fromValue(PointF());
|
||||
|
||||
case Pid::BEGIN_HOOK_TYPE:
|
||||
case Pid::END_HOOK_TYPE:
|
||||
|
|
|
@ -153,7 +153,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid id) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
|
||||
QString accessibleInfo() const override;
|
||||
|
|
|
@ -2269,9 +2269,9 @@ bool Harmony::setProperty(Pid pid, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Harmony::propertyDefault(Pid id) const
|
||||
PropertyValue Harmony::propertyDefault(Pid id) const
|
||||
{
|
||||
QVariant v;
|
||||
PropertyValue v;
|
||||
switch (id) {
|
||||
case Pid::HARMONY_TYPE:
|
||||
v = int(HarmonyType::STANDARD);
|
||||
|
@ -2292,7 +2292,7 @@ QVariant Harmony::propertyDefault(Pid id) const
|
|||
break;
|
||||
case Pid::OFFSET:
|
||||
if (parent() && parent()->isFretDiagram()) {
|
||||
v = QVariant::fromValue(PointF(0.0, 0.0));
|
||||
v = PropertyValue::fromValue(PointF(0.0, 0.0));
|
||||
break;
|
||||
}
|
||||
// fall-through
|
||||
|
|
|
@ -228,7 +228,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant& v) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
};
|
||||
} // namespace Ms
|
||||
#endif
|
||||
|
|
|
@ -655,13 +655,13 @@ bool Image::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Image::propertyDefault(Pid id) const
|
||||
PropertyValue Image::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::AUTOSCALE:
|
||||
return defaultAutoScale;
|
||||
case Pid::SIZE:
|
||||
return QVariant::fromValue(pixel2size(imageSize()));
|
||||
return PropertyValue::fromValue(pixel2size(imageSize()));
|
||||
case Pid::IMAGE_HEIGHT:
|
||||
return pixel2size(imageSize()).height();
|
||||
case Pid::IMAGE_WIDTH:
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
|
||||
mu::SizeF imageSize() const;
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ bool InstrumentName::setProperty(Pid id, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant InstrumentName::propertyDefault(Pid id) const
|
||||
PropertyValue InstrumentName::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::INAME_LAYOUT_POSITION:
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
bool isEditable() const override { return false; }
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
};
|
||||
} // namespace Ms
|
||||
#endif
|
||||
|
|
|
@ -238,7 +238,7 @@ void InstrumentChange::read(XmlReader& e)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant InstrumentChange::propertyDefault(Pid propertyId) const
|
||||
engraving::PropertyValue InstrumentChange::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::SUB_STYLE:
|
||||
|
|
|
@ -67,7 +67,7 @@ public:
|
|||
|
||||
Segment* segment() const { return toSegment(parent()); }
|
||||
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
bool placeMultiple() const override { return false; }
|
||||
};
|
||||
|
|
|
@ -241,7 +241,7 @@ bool Jump::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Jump::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Jump::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::JUMP_TO:
|
||||
|
|
|
@ -86,7 +86,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
EngravingItem* nextSegmentElement() override;
|
||||
EngravingItem* prevSegmentElement() override;
|
||||
|
|
|
@ -712,7 +712,7 @@ bool KeySig::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant KeySig::propertyDefault(Pid id) const
|
||||
PropertyValue KeySig::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::KEY:
|
||||
|
|
|
@ -94,7 +94,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
|
||||
EngravingItem* nextSegmentElement() override;
|
||||
EngravingItem* prevSegmentElement() override;
|
||||
|
|
|
@ -320,11 +320,11 @@ bool LayoutBreak::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant LayoutBreak::propertyDefault(Pid id) const
|
||||
PropertyValue LayoutBreak::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::LAYOUT_BREAK:
|
||||
return QVariant(); // LAYOUT_BREAK_LINE;
|
||||
return PropertyValue(); // LAYOUT_BREAK_LINE;
|
||||
case Pid::PAUSE:
|
||||
return score()->styleD(Sid::SectionPause);
|
||||
case Pid::START_WITH_LONG_NAMES:
|
||||
|
|
|
@ -76,7 +76,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
|
||||
private:
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "score.h"
|
||||
|
||||
using namespace mu;
|
||||
using namespace mu::engraving;
|
||||
|
||||
namespace Ms {
|
||||
static const ElementStyle letRingStyle {
|
||||
|
@ -152,14 +153,14 @@ LineSegment* LetRing::createLineSegment(System* parent)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant LetRing::propertyDefault(Pid propertyId) const
|
||||
PropertyValue LetRing::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::LINE_WIDTH:
|
||||
return score()->styleV(Sid::letRingLineWidth);
|
||||
|
||||
case Pid::ALIGN:
|
||||
return QVariant::fromValue(Align::LEFT | Align::BASELINE);
|
||||
return PropertyValue::fromValue(Align::LEFT | Align::BASELINE);
|
||||
|
||||
case Pid::LINE_STYLE:
|
||||
return score()->styleV(Sid::letRingLineStyle);
|
||||
|
@ -169,7 +170,7 @@ QVariant LetRing::propertyDefault(Pid propertyId) const
|
|||
|
||||
case Pid::CONTINUE_TEXT_OFFSET:
|
||||
case Pid::END_TEXT_OFFSET:
|
||||
return QVariant::fromValue(PointF(0, 0));
|
||||
return PropertyValue::fromValue(PointF(0, 0));
|
||||
|
||||
case Pid::BEGIN_FONT_STYLE:
|
||||
return score()->styleV(Sid::letRingFontStyle);
|
||||
|
|
|
@ -64,7 +64,7 @@ public:
|
|||
// virtual void write(XmlWriter& xml) const override;
|
||||
LineSegment* createLineSegment(System* parent) override;
|
||||
|
||||
QVariant propertyDefault(Pid propertyId) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid propertyId) const override;
|
||||
Sid getPropertyStyle(Pid) const override;
|
||||
};
|
||||
} // namespace Ms
|
||||
|
|
|
@ -1506,13 +1506,13 @@ bool SLine::setProperty(Pid id, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant SLine::propertyDefault(Pid pid) const
|
||||
PropertyValue SLine::propertyDefault(Pid pid) const
|
||||
{
|
||||
switch (pid) {
|
||||
case Pid::DIAGONAL:
|
||||
return false;
|
||||
case Pid::COLOR:
|
||||
return QVariant::fromValue(engravingConfiguration()->defaultColor());
|
||||
return PropertyValue::fromValue(engravingConfiguration()->defaultColor());
|
||||
case Pid::LINE_WIDTH:
|
||||
if (propertyFlags(pid) != PropertyFlags::NOSTYLE) {
|
||||
return Spanner::propertyDefault(pid);
|
||||
|
|
|
@ -143,7 +143,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid id) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
|
||||
friend class LineSegment;
|
||||
};
|
||||
|
|
|
@ -609,7 +609,7 @@ bool Lyrics::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Lyrics::propertyDefault(Pid id) const
|
||||
PropertyValue Lyrics::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::SUB_STYLE:
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
};
|
||||
|
||||
//---------------------------------------------------------
|
||||
|
|
|
@ -297,7 +297,7 @@ bool Marker::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Marker::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Marker::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::LABEL:
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
EngravingItem* nextSegmentElement() override;
|
||||
EngravingItem* prevSegmentElement() override;
|
||||
|
|
|
@ -2852,12 +2852,12 @@ bool Measure::setProperty(Pid propertyId, const QVariant& value)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Measure::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Measure::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::TIMESIG_NOMINAL:
|
||||
case Pid::TIMESIG_ACTUAL:
|
||||
return QVariant();
|
||||
return PropertyValue();
|
||||
case Pid::MEASURE_NUMBER_MODE:
|
||||
return int(MeasureNumberMode::AUTO);
|
||||
case Pid::BREAK_MMR:
|
||||
|
|
|
@ -296,7 +296,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
bool hasMMRest() const { return m_mmRest != 0; }
|
||||
bool isMMRest() const { return m_mmRestCount > 0; }
|
||||
|
|
|
@ -433,7 +433,7 @@ bool MeasureBase::setProperty(Pid id, const QVariant& value)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant MeasureBase::propertyDefault(Pid propertyId) const
|
||||
PropertyValue MeasureBase::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::REPEAT_END:
|
||||
|
|
|
@ -155,7 +155,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid) const override;
|
||||
bool setProperty(Pid, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
void clearElements();
|
||||
ElementList takeElements();
|
||||
|
|
|
@ -63,7 +63,7 @@ MeasureNumber::MeasureNumber(const MeasureNumber& other)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant MeasureNumber::propertyDefault(Pid id) const
|
||||
engraving::PropertyValue MeasureNumber::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::SUB_STYLE:
|
||||
|
|
|
@ -38,7 +38,7 @@ public:
|
|||
|
||||
virtual MeasureNumber* clone() const override { return new MeasureNumber(*this); }
|
||||
|
||||
virtual QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
};
|
||||
} // namespace Ms
|
||||
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "staff.h"
|
||||
|
||||
using namespace mu;
|
||||
using namespace mu::engraving;
|
||||
|
||||
namespace Ms {
|
||||
//---------------------------------------------------------
|
||||
|
@ -86,7 +87,7 @@ bool MeasureNumberBase::setProperty(Pid id, const QVariant& val)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant MeasureNumberBase::propertyDefault(Pid id) const
|
||||
PropertyValue MeasureNumberBase::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::SUB_STYLE:
|
||||
|
|
|
@ -42,7 +42,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid id) const override;
|
||||
bool setProperty(Pid id, const QVariant& val) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
|
||||
bool readProperties(XmlReader&) override;
|
||||
|
||||
|
|
|
@ -210,7 +210,7 @@ void MeasureRepeat::read(XmlReader& e)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant MeasureRepeat::propertyDefault(Pid propertyId) const
|
||||
PropertyValue MeasureRepeat::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::MEASURE_REPEAT_NUMBER_POS:
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
void read(XmlReader&) override;
|
||||
void write(XmlWriter& xml) const override;
|
||||
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
bool setProperty(Pid, const QVariant&) override;
|
||||
mu::engraving::PropertyValue getProperty(Pid) const override;
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ void MMRest::write(XmlWriter& xml) const
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant MMRest::propertyDefault(Pid propertyId) const
|
||||
PropertyValue MMRest::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::MMREST_NUMBER_POS:
|
||||
|
|
|
@ -51,7 +51,7 @@ public:
|
|||
|
||||
void write(XmlWriter&) const override;
|
||||
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
bool setProperty(Pid, const QVariant&) override;
|
||||
mu::engraving::PropertyValue getProperty(Pid) const override;
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ bool MMRestRange::setProperty(Pid id, const QVariant& val)
|
|||
}
|
||||
}
|
||||
|
||||
QVariant MMRestRange::propertyDefault(Pid id) const
|
||||
PropertyValue MMRestRange::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::SUB_STYLE:
|
||||
|
|
|
@ -44,7 +44,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid id) const override;
|
||||
bool setProperty(Pid id, const QVariant& val) override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
|
||||
bool readProperties(XmlReader&) override;
|
||||
|
||||
|
|
|
@ -3133,7 +3133,7 @@ bool Note::setProperty(Pid propertyId, const QVariant& v)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Note::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Note::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::GHOST:
|
||||
|
@ -3142,7 +3142,7 @@ QVariant Note::propertyDefault(Pid propertyId) const
|
|||
case Pid::MIRROR_HEAD:
|
||||
return int(MScore::DirectionH::AUTO);
|
||||
case Pid::DOT_POSITION:
|
||||
return QVariant::fromValue<Direction>(Direction::AUTO);
|
||||
return PropertyValue::fromValue<Direction>(Direction::AUTO);
|
||||
case Pid::HEAD_SCHEME:
|
||||
return int(NoteHead::Scheme::HEAD_AUTO);
|
||||
case Pid::HEAD_GROUP:
|
||||
|
@ -3168,7 +3168,7 @@ QVariant Note::propertyDefault(Pid propertyId) const
|
|||
return getProperty(Pid::TPC1);
|
||||
case Pid::PITCH:
|
||||
case Pid::TPC1:
|
||||
return QVariant();
|
||||
return PropertyValue();
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -538,7 +538,7 @@ public:
|
|||
void localSpatiumChanged(qreal oldValue, qreal newValue) override;
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
QString propertyUserValue(Pid) const override;
|
||||
|
||||
bool mark() const { return _mark; }
|
||||
|
|
|
@ -410,11 +410,11 @@ bool Ottava::setProperty(Pid propertyId, const QVariant& val)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Ottava::propertyDefault(Pid pid) const
|
||||
PropertyValue Ottava::propertyDefault(Pid pid) const
|
||||
{
|
||||
switch (pid) {
|
||||
case Pid::OTTAVA_TYPE:
|
||||
return QVariant();
|
||||
return PropertyValue();
|
||||
case Pid::END_HOOK_TYPE:
|
||||
return int(HookType::HOOK_90);
|
||||
case Pid::LINE_VISIBLE:
|
||||
|
@ -422,7 +422,7 @@ QVariant Ottava::propertyDefault(Pid pid) const
|
|||
case Pid::BEGIN_TEXT_OFFSET:
|
||||
case Pid::CONTINUE_TEXT_OFFSET:
|
||||
case Pid::END_TEXT_OFFSET:
|
||||
return QVariant::fromValue(PointF());
|
||||
return PropertyValue::fromValue(PointF());
|
||||
case Pid::BEGIN_TEXT_PLACE:
|
||||
case Pid::CONTINUE_TEXT_PLACE:
|
||||
case Pid::END_TEXT_PLACE:
|
||||
|
|
|
@ -130,7 +130,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
Pid propertyId(const QStringRef& xmlName) const override;
|
||||
|
||||
QString accessibleInfo() const override;
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
#include "score.h"
|
||||
|
||||
using namespace mu;
|
||||
using namespace mu::engraving;
|
||||
|
||||
namespace Ms {
|
||||
static const ElementStyle palmMuteStyle {
|
||||
|
@ -173,14 +174,14 @@ LineSegment* PalmMute::createLineSegment(System* parent)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant PalmMute::propertyDefault(Pid propertyId) const
|
||||
PropertyValue PalmMute::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::LINE_WIDTH:
|
||||
return score()->styleV(Sid::palmMuteLineWidth);
|
||||
|
||||
case Pid::ALIGN:
|
||||
return QVariant::fromValue(Align::LEFT | Align::BASELINE);
|
||||
return PropertyValue::fromValue(Align::LEFT | Align::BASELINE);
|
||||
|
||||
case Pid::LINE_STYLE:
|
||||
return score()->styleV(Sid::palmMuteLineStyle);
|
||||
|
@ -190,7 +191,7 @@ QVariant PalmMute::propertyDefault(Pid propertyId) const
|
|||
|
||||
case Pid::CONTINUE_TEXT_OFFSET:
|
||||
case Pid::END_TEXT_OFFSET:
|
||||
return QVariant::fromValue(PointF(0, 0));
|
||||
return PropertyValue::fromValue(PointF(0, 0));
|
||||
|
||||
//TODOws case Pid::BEGIN_FONT_ITALIC:
|
||||
// return score()->styleV(Sid::palmMuteFontItalic);
|
||||
|
|
|
@ -68,7 +68,7 @@ public:
|
|||
// virtual void write(XmlWriter& xml) const override;
|
||||
|
||||
LineSegment* createLineSegment(System* parent) override;
|
||||
QVariant propertyDefault(Pid propertyId) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid propertyId) const override;
|
||||
|
||||
friend class PalmMuteLine;
|
||||
};
|
||||
|
|
|
@ -187,7 +187,7 @@ LineSegment* Pedal::createLineSegment(System* parent)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Pedal::propertyDefault(Pid propertyId) const
|
||||
engraving::PropertyValue Pedal::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::LINE_WIDTH:
|
||||
|
|
|
@ -69,7 +69,7 @@ public:
|
|||
void write(XmlWriter& xml) const override;
|
||||
|
||||
LineSegment* createLineSegment(System* parent) override;
|
||||
QVariant propertyDefault(Pid propertyId) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid propertyId) const override;
|
||||
|
||||
friend class PedalLine;
|
||||
};
|
||||
|
|
|
@ -95,7 +95,7 @@ void RehearsalMark::layout()
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant RehearsalMark::propertyDefault(Pid id) const
|
||||
engraving::PropertyValue RehearsalMark::propertyDefault(Pid id) const
|
||||
{
|
||||
switch (id) {
|
||||
case Pid::SUB_STYLE:
|
||||
|
|
|
@ -39,7 +39,7 @@ public:
|
|||
|
||||
Segment* segment() const { return (Segment*)parent(); }
|
||||
void layout() override;
|
||||
QVariant propertyDefault(Pid id) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid id) const override;
|
||||
};
|
||||
} // namespace Ms
|
||||
#endif
|
||||
|
|
|
@ -995,7 +995,7 @@ void Rest::localSpatiumChanged(qreal oldValue, qreal newValue)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Rest::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Rest::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::GAP:
|
||||
|
|
|
@ -94,7 +94,7 @@ public:
|
|||
qreal rightEdge() const override;
|
||||
|
||||
void localSpatiumChanged(qreal oldValue, qreal newValue) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
void resetProperty(Pid id) override;
|
||||
bool setProperty(Pid propertyId, const QVariant& v) override;
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
|
|
|
@ -4951,9 +4951,9 @@ bool Score::setProperty(Pid /*id*/, const QVariant& /*v*/)
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Score::propertyDefault(Pid /*id*/) const
|
||||
PropertyValue Score::propertyDefault(Pid /*id*/) const
|
||||
{
|
||||
return QVariant();
|
||||
return PropertyValue();
|
||||
}
|
||||
|
||||
void Score::resetStyleValue(Sid styleToReset)
|
||||
|
|
|
@ -1218,7 +1218,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid) const override;
|
||||
bool setProperty(Pid, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
virtual QQueue<MidiInputEvent>* midiInputQueue();
|
||||
virtual std::list<MidiInputEvent>* activeMidiPitches();
|
||||
|
|
|
@ -967,7 +967,7 @@ PropertyValue Segment::getProperty(Pid propertyId) const
|
|||
// propertyDefault
|
||||
//---------------------------------------------------------
|
||||
|
||||
QVariant Segment::propertyDefault(Pid propertyId) const
|
||||
PropertyValue Segment::propertyDefault(Pid propertyId) const
|
||||
{
|
||||
switch (propertyId) {
|
||||
case Pid::LEADING_SPACE:
|
||||
|
|
|
@ -215,7 +215,7 @@ public:
|
|||
|
||||
mu::engraving::PropertyValue getProperty(Pid propertyId) const override;
|
||||
bool setProperty(Pid propertyId, const QVariant&) override;
|
||||
QVariant propertyDefault(Pid) const override;
|
||||
mu::engraving::PropertyValue propertyDefault(Pid) const override;
|
||||
|
||||
bool operator<(const Segment&) const;
|
||||
bool operator>(const Segment&) const;
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue