Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce "Small accidental" option #17685

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -37,6 +37,7 @@ AccidentalSettingsModel::AccidentalSettingsModel(QObject* parent, IElementReposi
void AccidentalSettingsModel::createProperties()
{
m_bracketType = buildPropertyItem(mu::engraving::Pid::ACCIDENTAL_BRACKET);
m_isSmall = buildPropertyItem(mu::engraving::Pid::SMALL);
}

void AccidentalSettingsModel::requestElements()
Expand All @@ -47,6 +48,7 @@ void AccidentalSettingsModel::requestElements()
void AccidentalSettingsModel::loadProperties()
{
loadPropertyItem(m_bracketType);
loadPropertyItem(m_isSmall);
}

void AccidentalSettingsModel::resetProperties()
Expand All @@ -58,3 +60,8 @@ PropertyItem* AccidentalSettingsModel::bracketType() const
{
return m_bracketType;
}

PropertyItem* AccidentalSettingsModel::isSmall() const
{
return m_isSmall;
}
Expand Up @@ -30,6 +30,8 @@ class AccidentalSettingsModel : public AbstractInspectorModel
Q_OBJECT

Q_PROPERTY(PropertyItem * bracketType READ bracketType CONSTANT)
Q_PROPERTY(PropertyItem * isSmall READ isSmall CONSTANT)

public:
explicit AccidentalSettingsModel(QObject* parent, IElementRepositoryService* repository);

Expand All @@ -39,9 +41,11 @@ class AccidentalSettingsModel : public AbstractInspectorModel
void resetProperties() override;

PropertyItem* bracketType() const;
PropertyItem* isSmall() const;

private:
PropertyItem* m_bracketType = nullptr;
PropertyItem* m_isSmall = nullptr;
};
}

Expand Down
Expand Up @@ -58,4 +58,15 @@ Column {
{ iconCode: IconCode.BRACKET_PARENTHESES_SQUARE, value: AccidentalTypes.BRACKET_TYPE_SQUARE, title: qsTrc("inspector", "Brackets") }
]
}

CheckBoxPropertyView {
id: smallAccidentalCheckBox

text: qsTrc("inspector", "Small accidental")
propertyItem: root.model ? root.model.isSmall : null

navigation.name: "SmallAccidentalBox"
navigation.panel: root.navigationPanel
navigation.row: bracketType.navigation.row + 1
}
}