Skip to content

Add the existing "First system indentation'"property to system break inspector (4.3.0) #22309

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

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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ void SectionBreakSettingsModel::createProperties()
m_shouldStartWithLongInstrNames = buildPropertyItem(mu::engraving::Pid::START_WITH_LONG_NAMES);
m_shouldResetBarNums = buildPropertyItem(mu::engraving::Pid::START_WITH_MEASURE_ONE);
m_pauseDuration = buildPropertyItem(mu::engraving::Pid::PAUSE);
m_firstSystemIndent = buildPropertyItem(mu::engraving::Pid::FIRST_SYSTEM_INDENTATION);
}

void SectionBreakSettingsModel::requestElements()
Expand All @@ -52,13 +53,15 @@ void SectionBreakSettingsModel::loadProperties()
loadPropertyItem(m_shouldStartWithLongInstrNames);
loadPropertyItem(m_shouldResetBarNums);
loadPropertyItem(m_pauseDuration, formatDoubleFunc);
loadPropertyItem(m_firstSystemIndent);
}

void SectionBreakSettingsModel::resetProperties()
{
m_shouldStartWithLongInstrNames->resetToDefault();
m_shouldResetBarNums->resetToDefault();
m_pauseDuration->resetToDefault();
m_firstSystemIndent->resetToDefault();
}

PropertyItem* SectionBreakSettingsModel::shouldStartWithLongInstrNames() const
Expand All @@ -75,3 +78,8 @@ PropertyItem* SectionBreakSettingsModel::pauseDuration() const
{
return m_pauseDuration;
}

PropertyItem* SectionBreakSettingsModel::firstSystemIndent() const
{
return m_firstSystemIndent;
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class SectionBreakSettingsModel : public AbstractInspectorModel
Q_PROPERTY(PropertyItem * shouldStartWithLongInstrNames READ shouldStartWithLongInstrNames CONSTANT)
Q_PROPERTY(PropertyItem * shouldResetBarNums READ shouldResetBarNums CONSTANT)
Q_PROPERTY(PropertyItem * pauseDuration READ pauseDuration CONSTANT)
Q_PROPERTY(PropertyItem * firstSystemIndent READ firstSystemIndent CONSTANT)

public:
explicit SectionBreakSettingsModel(QObject* parent, IElementRepositoryService* repository);
Expand All @@ -44,11 +45,13 @@ class SectionBreakSettingsModel : public AbstractInspectorModel
PropertyItem* shouldStartWithLongInstrNames() const;
PropertyItem* shouldResetBarNums() const;
PropertyItem* pauseDuration() const;
PropertyItem* firstSystemIndent() const;

private:
PropertyItem* m_shouldStartWithLongInstrNames = nullptr;
PropertyItem* m_shouldResetBarNums = nullptr;
PropertyItem* m_pauseDuration = nullptr;
PropertyItem* m_firstSystemIndent = nullptr;
};
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,22 @@ Column {
}

PropertyCheckBox {
id: shouldResetBarNums
text: qsTrc("inspector", "Reset measure numbers for new section")
propertyItem: root.model ? root.model.shouldResetBarNums : null

navigation.name: "ResetBarNumbers"
navigation.panel: root.navigationPanel
navigation.row: startWithLongInstrNames.navigation.row + 1
}

PropertyCheckBox {
id: startWithfirstSystemIndented
text: qsTrc("inspector", "Start new section with first system indented")
propertyItem: root.model ? root.model.firstSystemIndent : null

navigation.name: "FirstSystemIndent"
navigation.panel: root.navigationPanel
navigation.row: shouldResetBarNums.navigation.row + 1
}
}