From cb0740479af44d3220966d0c10d849f18ceb2884 Mon Sep 17 00:00:00 2001
From: Casper Jeukendrup <48658420+cbjeukendrup@users.noreply.github.com>
Date: Wed, 8 Jul 2026 19:44:58 +0200
Subject: [PATCH 1/3] Move some types out of notationtypes.h to avoid
transitive include in projecttypes.h -> inotationproject.h ->
iglobalcontext.h
---
.../MuseScore/AppShell/notationpagemodel.cpp | 18 +-
.../AppShell/notationstatusbarmodel.h | 3 -
.../internal/compat/notationmeta.cpp | 1 +
src/converter/internal/convertercontroller.h | 1 +
src/engraving/api/v1/score.h | 3 +
.../Engraving/devtools/engravingstylemodel.h | 3 +
.../devtools/engravingundostackmodel.h | 1 -
src/engraving/style/styledef.h | 1 +
.../internal/abstractlayoutpaneltreeitem.h | 4 +
.../internal/instrumentlistmodel.cpp | 1 +
.../internal/instrumentsettingsmodel.h | 2 +-
.../internal/layoutpaneltreemodel.cpp | 6 +-
.../internal/layoutpaneltreemodel.h | 6 +-
.../internal/parttreeitem.cpp | 3 +
.../internal/roottreeitem.cpp | 2 +
.../internal/sharedparttreeitem.cpp | 2 +
.../internal/staffsettingsmodel.h | 2 +-
.../internal/systemobjectslayertreeitem.cpp | 1 +
src/notation/CMakeLists.txt | 6 +
src/notation/iinstrumentsrepository.h | 3 +-
src/notation/inotationinteraction.h | 6 +-
src/notation/inotationparts.h | 7 +-
src/notation/inotationplayback.h | 21 +-
src/notation/inotationselectionfilter.h | 6 +-
src/notation/inotationselectionrange.h | 21 +-
src/notation/internal/masternotation.cpp | 1 +
src/notation/internal/notationinteraction.h | 6 +-
src/notation/internal/notationnoteinput.cpp | 1 +
src/notation/internal/notationplayback.h | 12 +-
.../internal/notationselectionfilter.cpp | 3 +-
.../internal/notationselectionfilter.h | 5 +-
.../internal/notationselectionrange.cpp | 7 +-
.../internal/notationselectionrange.h | 14 +-
src/notation/notationtypes.h | 250 +-----------------
.../tests/mocks/notationinteractionmock.h | 6 +-
.../tests/mocks/notationselectionrangemock.h | 12 +-
src/notation/types/instrumentstypes.h | 148 +++++++++++
src/notation/types/loopboundaries.h | 58 ++++
src/notation/types/scorecreateoptions.h | 50 ++++
src/notation/types/staffparttypes.h | 72 +++++
src/notation/types/stringtunings.h | 40 +++
src/notation/types/tempo.h | 39 +++
.../internal/notationactioncontroller.cpp | 2 +-
src/notationscene/iselectinstrumentscenario.h | 11 +-
.../NotationScene/abstractelementpopupmodel.h | 6 +-
.../elementpopups/caposettingsmodel.cpp | 3 +
.../elementpopups/dynamicpopupmodel.h | 2 +
.../elementpopups/harppedalpopupmodel.cpp | 6 +-
.../elementpopups/partialtiepopupmodel.h | 3 +-
.../percussionnotepopupcontentmodel.cpp | 12 +-
.../percussionnotepopupcontentmodel.h | 9 +-
.../elementpopups/shadownotepopupmodel.cpp | 1 +
.../elementpopups/shadownotepopupmodel.h | 6 +-
.../staffvisibilitypopupmodel.cpp | 6 +-
.../MuseScore/NotationScene/loopmarker.cpp | 2 +
.../qml/MuseScore/NotationScene/loopmarker.h | 4 +-
.../notationautomationcontroller.cpp | 2 +
.../notationcontextmenumodel.cpp | 8 +-
.../MuseScore/NotationScene/notationruler.cpp | 5 +-
.../notationviewinputcontroller.cpp | 3 +-
.../NotationScene/noteinputbarmodel.h | 1 -
.../NotationScene/noteinputcursor.cpp | 2 +
.../NotationScene/playbackcursor.cpp | 1 +
.../abstractselectionfiltermodel.cpp | 1 +
.../abstractselectionfiltermodel.h | 20 +-
.../elementsselectionfiltermodel.h | 6 +-
.../notesinchordselectionfiltermodel.h | 12 +-
.../voicesselectionfiltermodel.h | 6 +-
src/notationscene/widgets/editstaff.h | 9 +-
src/notationscene/widgets/editstafftype.h | 4 +-
src/notationscene/widgets/editstringdata.cpp | 1 +
src/notationscene/widgets/editstringdata.h | 6 +-
src/notationscene/widgets/editstyle.h | 20 +-
src/notationscene/widgets/pagesettings.cpp | 1 +
src/notationscene/widgets/pagesettings.h | 13 +-
src/notationscene/widgets/selectdialog.h | 7 +-
src/notationscene/widgets/selectnotedialog.h | 2 +
src/notationscene/widgets/timeline.h | 26 +-
src/notationscene/widgets/tupletdialog.h | 2 +
src/palette/widgets/customizekitdialog.h | 7 +-
src/playback/internal/playbackcontroller.h | 17 +-
src/playback/iplaybackcontroller.h | 19 +-
.../Playback/onlinesoundsstatusmodel.cpp | 4 +-
.../Playback/onlinesoundsstatusmodel.h | 4 +-
.../Playback/playbacktoolbarmodel.cpp | 4 +-
.../MuseScore/Playback/playbacktoolbarmodel.h | 4 +-
.../tests/mocks/playbackcontrollermock.h | 10 +-
src/project/CMakeLists.txt | 1 +
src/project/inotationproject.h | 2 +
src/project/internal/notationproject.cpp | 1 +
src/project/internal/notationproject.h | 1 +
.../internal/NewScore/newscoremodel.cpp | 7 +-
src/project/types/projectcreateoptions.h | 40 +++
src/project/types/projecttypes.h | 16 +-
.../modelwithvoiceandpositionoptions.cpp | 4 +
.../accidentals/accidentalsettingsmodel.cpp | 7 +-
.../barlines/barlinesettingsmodel.cpp | 2 +
.../notation/bends/bendsettingsmodel.cpp | 7 +-
.../notation/lines/hairpinlinesettingsmodel.h | 3 +
.../notation/lines/ottavasettingsmodel.cpp | 2 +
.../lines/slurandtiesettingsmodel.cpp | 6 +-
.../notes/noteheads/noteheadsettingsmodel.cpp | 3 +
.../notes/stems/stemsettingsmodel.cpp | 2 +
.../notation/tuplets/tupletsettingsmodel.cpp | 4 +-
.../parts/partssettingsmodel.cpp | 2 +
.../propertiespanellistmodel.h | 3 +-
.../score/scoreappearancesettingsmodel.cpp | 2 +
.../textstylepopup/textstylepopupmodel.cpp | 2 +-
.../selectinstrumentscenariostub.cpp | 3 +
src/stubs/playback/playbackcontrollerstub.cpp | 10 +-
src/stubs/playback/playbackcontrollerstub.h | 10 +-
.../appshell/view/notationstatusbarmodel.h | 2 -
112 files changed, 807 insertions(+), 489 deletions(-)
create mode 100644 src/notation/types/instrumentstypes.h
create mode 100644 src/notation/types/loopboundaries.h
create mode 100644 src/notation/types/scorecreateoptions.h
create mode 100644 src/notation/types/staffparttypes.h
create mode 100644 src/notation/types/stringtunings.h
create mode 100644 src/notation/types/tempo.h
create mode 100644 src/project/types/projectcreateoptions.h
diff --git a/src/appshell/qml/MuseScore/AppShell/notationpagemodel.cpp b/src/appshell/qml/MuseScore/AppShell/notationpagemodel.cpp
index ef1755cff835b..293f555b70725 100644
--- a/src/appshell/qml/MuseScore/AppShell/notationpagemodel.cpp
+++ b/src/appshell/qml/MuseScore/AppShell/notationpagemodel.cpp
@@ -19,22 +19,26 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include "notationpagemodel.h"
-#include "internal/applicationuiactions.h"
-#include "dockwindow/idockwindow.h"
+#include "notationpagemodel.h"
#include "async/async.h"
+#include "log.h"
+
+#include "engraving/dom/part.h"
+#include "engraving/dom/staff.h"
#include "notation/inotationelements.h" // IWYU pragma: keep
#include "notation/inotationinteraction.h"
#include "notation/inotationnoteinput.h"
#include "notation/inotationselection.h"
-#include "log.h"
+#include "internal/applicationuiactions.h"
+#include "dockwindow/idockwindow.h"
using namespace mu::appshell;
using namespace mu::notation;
+using namespace mu::engraving;
using namespace muse::actions;
NotationPageModel::NotationPageModel(QObject* parent)
@@ -253,10 +257,10 @@ void NotationPageModel::doUpdatePercussionPanelVisibility()
return;
}
- const mu::engraving::Score* score = notation->elements()->msScore();
+ const Score* score = notation->elements()->msScore();
if (score) {
- const mu::engraving::InputState& inputState = score->inputState();
- const mu::engraving::Staff* staff = inputState.staff();
+ const InputState& inputState = score->inputState();
+ const Staff* staff = inputState.staff();
if (inputState.noteEntryMode() && staff && staff->isDrumStaff(inputState.tick())) {
setPercussionPanelOpen(true);
return;
diff --git a/src/appshell/qml/MuseScore/AppShell/notationstatusbarmodel.h b/src/appshell/qml/MuseScore/AppShell/notationstatusbarmodel.h
index 4251b3e564040..3132fc06d182b 100644
--- a/src/appshell/qml/MuseScore/AppShell/notationstatusbarmodel.h
+++ b/src/appshell/qml/MuseScore/AppShell/notationstatusbarmodel.h
@@ -38,9 +38,6 @@
#include "workspace/iworkspaceconfiguration.h"
#include "notation/inotationconfiguration.h"
#include "context/iglobalcontext.h"
-
-#include "notation/notationtypes.h"
-
#include "global/iglobalconfiguration.h"
namespace mu::appshell {
diff --git a/src/converter/internal/compat/notationmeta.cpp b/src/converter/internal/compat/notationmeta.cpp
index aade5243aa3e0..541bdaf61d988 100644
--- a/src/converter/internal/compat/notationmeta.cpp
+++ b/src/converter/internal/compat/notationmeta.cpp
@@ -30,6 +30,7 @@
#include "audio/common/audioutils.h"
#include "audio/common/audiotypes.h"
+#include "engraving/dom/part.h"
#include "engraving/dom/tempotext.h"
#include "engraving/dom/text.h"
diff --git a/src/converter/internal/convertercontroller.h b/src/converter/internal/convertercontroller.h
index 592342bfaa788..c7f51e80acf41 100644
--- a/src/converter/internal/convertercontroller.h
+++ b/src/converter/internal/convertercontroller.h
@@ -26,6 +26,7 @@
#include "../iconvertercontroller.h"
#include "modularity/ioc.h"
+#include "notation/notationtypes.h"
#include "project/iprojectcreator.h"
#include "project/inotationwritersregister.h"
#include "context/iglobalcontext.h"
diff --git a/src/engraving/api/v1/score.h b/src/engraving/api/v1/score.h
index afc09320759c5..e2177572624f1 100644
--- a/src/engraving/api/v1/score.h
+++ b/src/engraving/api/v1/score.h
@@ -27,6 +27,9 @@
#include "modularity/ioc.h"
#include "context/iglobalcontext.h"
+#include "engraving/dom/score.h"
+#include "engraving/dom/segment.h"
+
// api
#include "excerpt.h"
#include "apistructs.h"
diff --git a/src/engraving/qml/MuseScore/Engraving/devtools/engravingstylemodel.h b/src/engraving/qml/MuseScore/Engraving/devtools/engravingstylemodel.h
index 9ef48c90f10b9..ca2a05bcd9b32 100644
--- a/src/engraving/qml/MuseScore/Engraving/devtools/engravingstylemodel.h
+++ b/src/engraving/qml/MuseScore/Engraving/devtools/engravingstylemodel.h
@@ -19,6 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#pragma once
#include
@@ -30,6 +31,8 @@
#include "context/iglobalcontext.h"
#include "modularity/ioc.h"
+#include "types/propertyvalue.h"
+
namespace mu::engraving {
class EngravingStyleModel : public QAbstractListModel, public muse::async::Asyncable, public muse::Contextable
{
diff --git a/src/engraving/qml/MuseScore/Engraving/devtools/engravingundostackmodel.h b/src/engraving/qml/MuseScore/Engraving/devtools/engravingundostackmodel.h
index af628a50751e3..9197e6d562e67 100644
--- a/src/engraving/qml/MuseScore/Engraving/devtools/engravingundostackmodel.h
+++ b/src/engraving/qml/MuseScore/Engraving/devtools/engravingundostackmodel.h
@@ -85,7 +85,6 @@ class EngravingUndoStackModel : public QAbstractItemModel, public muse::async::A
Item* createItem(Item* parent, const engraving::UndoableTransaction* transaction, bool isCurrent = false);
Item* createItem(Item* parent, const engraving::UndoableCommand* command, bool isCurrent = false);
Item* itemByModelIndex(const QModelIndex& index) const;
- QVariantMap makeData(const mu::engraving::EngravingObject* el) const;
void load(const engraving::UndoableTransaction* transaction, Item* parent);
diff --git a/src/engraving/style/styledef.h b/src/engraving/style/styledef.h
index cb41782749a79..5cac33544ecae 100644
--- a/src/engraving/style/styledef.h
+++ b/src/engraving/style/styledef.h
@@ -2270,6 +2270,7 @@ Q_ENUM_NS(Sid)
using _Sid::Sid;
#endif
+using StyleId = Sid;
using StyleIdSet = std::unordered_set;
//---------------------------------------------------------
diff --git a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/abstractlayoutpaneltreeitem.h b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/abstractlayoutpaneltreeitem.h
index dba88d208e2b9..275ad44ab4dd7 100644
--- a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/abstractlayoutpaneltreeitem.h
+++ b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/abstractlayoutpaneltreeitem.h
@@ -34,6 +34,10 @@
#include "layoutpanelitemtype.h"
+namespace mu::engraving {
+struct ScoreChanges;
+}
+
namespace mu::instrumentsscene {
struct MoveParams {
muse::IDList objectIdListToMove;
diff --git a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/instrumentlistmodel.cpp b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/instrumentlistmodel.cpp
index 74bed9617f2ee..22ac63c74e163 100644
--- a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/instrumentlistmodel.cpp
+++ b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/instrumentlistmodel.cpp
@@ -19,6 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include "instrumentlistmodel.h"
#include "translation.h"
diff --git a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/instrumentsettingsmodel.h b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/instrumentsettingsmodel.h
index 7bbfe822c06be..49a1752f99dea 100644
--- a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/instrumentsettingsmodel.h
+++ b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/instrumentsettingsmodel.h
@@ -30,7 +30,7 @@
#include "modularity/ioc.h"
#include "context/iglobalcontext.h"
-#include "notation/notationtypes.h"
+#include "notation/types/instrumentstypes.h"
namespace mu::instrumentsscene {
class InstrumentSettingsModel : public QObject, public muse::async::Asyncable, public muse::Contextable
diff --git a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/layoutpaneltreemodel.cpp b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/layoutpaneltreemodel.cpp
index 8b321cffe430f..a7befbcb6f9c2 100644
--- a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/layoutpaneltreemodel.cpp
+++ b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/layoutpaneltreemodel.cpp
@@ -453,12 +453,12 @@ void LayoutPanelTreeModel::toggleStaveSharing(bool on)
updateIsStaveSharingEnabled();
}
-void LayoutPanelTreeModel::sortParts(notation::PartList& parts, notation::PartList& referenceParts)
+void LayoutPanelTreeModel::sortParts(PartList& parts, const PartList& referenceParts)
{
// First collect ids of referenceParts to use in sorting further
std::vector referenceIdOrder;
- referenceParts.reserve(referenceParts.size());
+ referenceIdOrder.reserve(referenceParts.size());
for (const Part* part : referenceParts) {
referenceIdOrder.push_back(part->id());
@@ -493,7 +493,7 @@ void LayoutPanelTreeModel::setLayoutPanelVisible(bool visible)
updateSelectedRows();
if (m_scoreChanged) {
- onScoreChanged();
+ onScoreChanged({});
m_shouldUpdateSystemObjectLayers = true;
updateSystemObjectLayers();
}
diff --git a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/layoutpaneltreemodel.h b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/layoutpaneltreemodel.h
index 4906662b15d8b..0e91b750a0d04 100644
--- a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/layoutpaneltreemodel.h
+++ b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/layoutpaneltreemodel.h
@@ -25,7 +25,6 @@
#include
#include
#include
-#include
#include
#include "abstractlayoutpaneltreeitem.h"
@@ -161,14 +160,15 @@ private slots:
void onBeforeChangeNotation();
void setLoadingBlocked(bool blocked);
- static void sortParts(notation::PartList& parts, notation::PartList& referenceParts);
+ using PartList = std::vector;
+ static void sortParts(PartList& parts, const PartList& referenceParts);
void setupPartsConnections();
void setupStavesConnections(const muse::ID& partId);
void setupNotationConnections();
void updateSelectedRows();
- void onScoreChanged(const mu::engraving::ScoreChanges& changes = {});
+ void onScoreChanged(const mu::engraving::ScoreChanges& changes);
void clear();
void deleteItems();
diff --git a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/parttreeitem.cpp b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/parttreeitem.cpp
index efe4a2b9f1965..90bfe3fbb99f1 100644
--- a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/parttreeitem.cpp
+++ b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/parttreeitem.cpp
@@ -23,6 +23,8 @@
#include "async/notifylist.h"
+#include "engraving/dom/sharedpart.h"
+
#include "notation/inotation.h"
#include "notation/inotationparts.h"
@@ -30,6 +32,7 @@
using namespace mu::instrumentsscene;
using namespace mu::notation;
+using namespace mu::engraving;
using namespace muse;
PartTreeItem::PartTreeItem(IMasterNotationPtr masterNotation, INotationPtr notation, QObject* parent, LayoutPanelItemType::ItemType type)
diff --git a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/roottreeitem.cpp b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/roottreeitem.cpp
index 23938bf879227..22a18115cfe94 100644
--- a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/roottreeitem.cpp
+++ b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/roottreeitem.cpp
@@ -21,6 +21,8 @@
*/
#include "roottreeitem.h"
+#include "engraving/dom/score.h"
+
#include "parttreeitem.h"
#include "systemobjectslayertreeitem.h"
diff --git a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/sharedparttreeitem.cpp b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/sharedparttreeitem.cpp
index dad85177b8cf6..50d45405fc98c 100644
--- a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/sharedparttreeitem.cpp
+++ b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/sharedparttreeitem.cpp
@@ -21,6 +21,8 @@
*/
#include "sharedparttreeitem.h"
+#include "engraving/dom/sharedpart.h"
+
#include "notation/inotation.h"
using namespace mu::instrumentsscene;
diff --git a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/staffsettingsmodel.h b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/staffsettingsmodel.h
index 5cca8ca8f2e00..4c2d0c2673f9a 100644
--- a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/staffsettingsmodel.h
+++ b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/staffsettingsmodel.h
@@ -27,7 +27,7 @@
#include "modularity/ioc.h"
#include "context/iglobalcontext.h"
-#include "notation/notationtypes.h"
+#include "notation/types/staffparttypes.h"
namespace mu::instrumentsscene {
class StaffSettingsModel : public QObject, public muse::Contextable
diff --git a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/systemobjectslayertreeitem.cpp b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/systemobjectslayertreeitem.cpp
index 88f6639dd0e5e..3d3c7d35a802d 100644
--- a/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/systemobjectslayertreeitem.cpp
+++ b/src/instrumentsscene/qml/MuseScore/InstrumentsScene/internal/systemobjectslayertreeitem.cpp
@@ -22,6 +22,7 @@
#include "systemobjectslayertreeitem.h"
+#include "engraving/dom/score.h"
#include "engraving/dom/timesig.h"
#include "engraving/editing/transaction/undoablecommand.h"
diff --git a/src/notation/CMakeLists.txt b/src/notation/CMakeLists.txt
index e0d14b95e0903..0e4a6d7accdf7 100644
--- a/src/notation/CMakeLists.txt
+++ b/src/notation/CMakeLists.txt
@@ -50,6 +50,12 @@ target_sources(notation PRIVATE
iinstrumentsrepository.h
notationtypes.h
+ types/instrumentstypes.h
+ types/loopboundaries.h
+ types/scorecreateoptions.h
+ types/staffparttypes.h
+ types/stringtunings.h
+ types/tempo.h
types/viewmode.h
types/zoomtype.h
diff --git a/src/notation/iinstrumentsrepository.h b/src/notation/iinstrumentsrepository.h
index 6f2c1ff537418..e271c681a52c9 100644
--- a/src/notation/iinstrumentsrepository.h
+++ b/src/notation/iinstrumentsrepository.h
@@ -24,7 +24,8 @@
#include "modularity/imoduleinterface.h"
-#include "notationtypes.h"
+#include "types/instrumentstypes.h"
+#include "types/stringtunings.h"
namespace mu::notation {
class IInstrumentsRepository : MODULE_GLOBAL_INTERFACE
diff --git a/src/notation/inotationinteraction.h b/src/notation/inotationinteraction.h
index 1f86f5c71ee90..b579d8839f307 100644
--- a/src/notation/inotationinteraction.h
+++ b/src/notation/inotationinteraction.h
@@ -57,12 +57,12 @@ class INotationInteraction
// Hit
virtual EngravingItem* hitElement(const muse::PointF& pos, float width) const = 0;
virtual std::vector hitElements(const muse::PointF& pos, float width) const = 0;
- virtual Staff* hitStaff(const muse::PointF& pos) const = 0;
+ virtual engraving::Staff* hitStaff(const muse::PointF& pos) const = 0;
struct HitElementContext
{
- notation::EngravingItem* element = nullptr;
- notation::Staff* staff = nullptr;
+ engraving::EngravingItem* element = nullptr;
+ engraving::Staff* staff = nullptr;
bool operator ==(const HitElementContext& other) const
{
diff --git a/src/notation/inotationparts.h b/src/notation/inotationparts.h
index 73ef540b46055..f2867fe945561 100644
--- a/src/notation/inotationparts.h
+++ b/src/notation/inotationparts.h
@@ -24,7 +24,8 @@
#include "async/notification.h"
-#include "notationtypes.h"
+#include "types/instrumentstypes.h"
+#include "types/staffparttypes.h"
namespace muse::async {
template
@@ -48,7 +49,7 @@ class INotationParts
virtual const Staff* staff(const muse::ID& staffId) const = 0;
virtual bool staffExists(const muse::ID& staffId) const = 0;
- virtual StaffConfig staffConfig(const muse::ID& staffId, Fraction tick = Fraction(0, 1)) const = 0;
+ virtual StaffConfig staffConfig(const muse::ID& staffId, engraving::Fraction tick = { 0, 1 }) const = 0;
virtual ScoreOrder scoreOrder() const = 0;
virtual void setParts(const PartInstrumentList& instruments, const ScoreOrder& order) = 0;
@@ -63,7 +64,7 @@ class INotationParts
const QString& shortName) = 0;
virtual void setInstrumentNumber(const InstrumentKey& instrumentKey, int v) = 0;
virtual void setStaffType(const muse::ID& staffId, StaffTypeId type) = 0;
- virtual void setStaffConfig(const muse::ID& staffId, const StaffConfig& config, Fraction tick = Fraction(0, 1)) = 0;
+ virtual void setStaffConfig(const muse::ID& staffId, const StaffConfig& config, engraving::Fraction tick = { 0, 1 }) = 0;
virtual void setSharedPartEnabled(const muse::ID& partId, bool enable) = 0;
virtual void removeParts(const muse::IDList& partsIds) = 0;
diff --git a/src/notation/inotationplayback.h b/src/notation/inotationplayback.h
index 03398f01abb85..99ddc32b4632f 100644
--- a/src/notation/inotationplayback.h
+++ b/src/notation/inotationplayback.h
@@ -29,7 +29,13 @@
#include "mpe/events.h"
#include "engraving/types/types.h"
-#include "notationtypes.h"
+#include "types/loopboundaries.h"
+#include "types/tempo.h"
+
+namespace mu::engraving {
+class EngravingItem;
+class StaffText;
+}
namespace mu::notation {
class INotationPlayback
@@ -40,10 +46,10 @@ class INotationPlayback
virtual void init() = 0;
virtual void reload() = 0;
- virtual void setSendEventsOnScoreChange(const InstrumentTrackId& trackId, bool send) = 0;
+ virtual void setSendEventsOnScoreChange(const engraving::InstrumentTrackId& trackId, bool send) = 0;
virtual void sendEventsForChangedTracks() = 0;
- virtual muse::async::Channel tracksDataChanged() const = 0;
+ virtual muse::async::Channel tracksDataChanged() const = 0;
virtual const engraving::InstrumentTrackId& metronomeTrackId() const = 0;
virtual engraving::InstrumentTrackId chordSymbolsTrackId(const muse::ID& partId) const = 0;
@@ -51,10 +57,11 @@ class INotationPlayback
virtual const muse::mpe::PlaybackData& trackPlaybackData(const engraving::InstrumentTrackId& trackId) const = 0;
- virtual void triggerEventsForItems(const std::vector& items, muse::mpe::duration_t duration, bool flushSound) = 0;
+ virtual void triggerEventsForItems(const std::vector& items, muse::mpe::duration_t duration,
+ bool flushSound) = 0;
virtual void triggerMetronome(muse::midi::tick_t tick) = 0;
virtual void triggerCountIn(muse::midi::tick_t tick, muse::secs_t& countInDuration) = 0;
- virtual void triggerControllers(const muse::mpe::ControllerChangeEventList& list, notation::staff_idx_t staffIdx, int tick) = 0;
+ virtual void triggerControllers(const muse::mpe::ControllerChangeEventList& list, engraving::staff_idx_t staffIdx, int tick) = 0;
virtual engraving::InstrumentTrackIdSet existingTrackIdSet() const = 0;
virtual muse::async::Channel trackAdded() const = 0;
@@ -68,7 +75,7 @@ class INotationPlayback
virtual muse::midi::tick_t secToTick(muse::audio::secs_t sec) const = 0;
virtual muse::RetVal playPositionTickByRawTick(muse::midi::tick_t tick) const = 0;
- virtual muse::RetVal playPositionTickByElement(const EngravingItem* element) const = 0;
+ virtual muse::RetVal playPositionTickByElement(const engraving::EngravingItem* element) const = 0;
enum BoundaryTick {
FirstScoreTick = 0,
@@ -84,7 +91,7 @@ class INotationPlayback
virtual muse::async::Notification loopBoundariesChanged() const = 0;
virtual const Tempo& multipliedTempo(muse::midi::tick_t tick) const = 0;
- virtual MeasureBeat beat(muse::midi::tick_t tick) const = 0;
+ virtual engraving::MeasureBeat beat(muse::midi::tick_t tick) const = 0;
virtual muse::midi::tick_t beatToRawTick(int measureIndex, int beatIndex) const = 0;
virtual double tempoMultiplier() const = 0;
diff --git a/src/notation/inotationselectionfilter.h b/src/notation/inotationselectionfilter.h
index 2336d26d42d6f..794a70e1d7e0d 100644
--- a/src/notation/inotationselectionfilter.h
+++ b/src/notation/inotationselectionfilter.h
@@ -22,7 +22,7 @@
#pragma once
-#include "notationtypes.h"
+#include "engraving/dom/selectionfilter.h"
namespace mu::notation {
class INotationSelectionFilter
@@ -30,8 +30,8 @@ class INotationSelectionFilter
public:
virtual ~INotationSelectionFilter() = default;
- virtual bool isSelectionTypeFiltered(const SelectionFilterTypesVariant& variant) const = 0;
- virtual void setSelectionTypeFiltered(const SelectionFilterTypesVariant& variant, bool filtered) = 0;
+ virtual bool isSelectionTypeFiltered(const engraving::SelectionFilterTypesVariant& variant) const = 0;
+ virtual void setSelectionTypeFiltered(const engraving::SelectionFilterTypesVariant& variant, bool filtered) = 0;
virtual bool includeSingleNotes() const = 0;
virtual void setIncludeSingleNotes(bool include) = 0;
diff --git a/src/notation/inotationselectionrange.h b/src/notation/inotationselectionrange.h
index d44a98d487f2e..0b62aa99b3a30 100644
--- a/src/notation/inotationselectionrange.h
+++ b/src/notation/inotationselectionrange.h
@@ -24,7 +24,14 @@
#include
-#include "notationtypes.h"
+#include "engraving/types/types.h"
+
+namespace mu::engraving {
+class EngravingItem;
+class Measure;
+class Part;
+class Segment;
+}
namespace mu::notation {
class INotationSelectionRange
@@ -34,24 +41,24 @@ class INotationSelectionRange
virtual engraving::staff_idx_t startStaffIndex() const = 0;
virtual engraving::Segment* rangeStartSegment() const = 0;
- virtual Fraction startTick() const = 0;
+ virtual engraving::Fraction startTick() const = 0;
virtual engraving::staff_idx_t endStaffIndex() const = 0;
virtual engraving::Segment* rangeEndSegment() const = 0;
- virtual Fraction endTick() const = 0;
+ virtual engraving::Fraction endTick() const = 0;
struct MeasureRange {
- Measure* startMeasure = nullptr;
- Measure* endMeasure = nullptr;
+ engraving::Measure* startMeasure = nullptr;
+ engraving::Measure* endMeasure = nullptr;
};
virtual MeasureRange measureRange() const = 0;
- virtual std::vector selectedParts() const = 0;
+ virtual std::vector selectedParts() const = 0;
virtual std::vector boundingArea() const = 0;
virtual bool containsPoint(const muse::PointF& point) const = 0;
- virtual bool containsItem(const EngravingItem* item, engraving::staff_idx_t staffIdx = muse::nidx) const = 0;
+ virtual bool containsItem(const engraving::EngravingItem* item, engraving::staff_idx_t staffIdx = muse::nidx) const = 0;
virtual bool containsMultiNoteChords() const = 0;
};
diff --git a/src/notation/internal/masternotation.cpp b/src/notation/internal/masternotation.cpp
index a26adf3818d6e..97817b3b1bc91 100644
--- a/src/notation/internal/masternotation.cpp
+++ b/src/notation/internal/masternotation.cpp
@@ -51,6 +51,7 @@
#include "excerptnotation.h"
#include "masternotationparts.h"
#include "notationautomation.h"
+#include "types/scorecreateoptions.h"
#ifdef MUE_BUILD_ENGRAVING_PLAYBACK
#include "notationplayback.h"
diff --git a/src/notation/internal/notationinteraction.h b/src/notation/internal/notationinteraction.h
index 796b6dcb42937..514ec03179aaf 100644
--- a/src/notation/internal/notationinteraction.h
+++ b/src/notation/internal/notationinteraction.h
@@ -91,7 +91,7 @@ class NotationInteraction : public INotationInteraction, public muse::Contextabl
// Hit
EngravingItem* hitElement(const muse::PointF& pos, float width) const override;
std::vector hitElements(const muse::PointF& pos, float width) const override;
- Staff* hitStaff(const muse::PointF& pos) const override;
+ engraving::Staff* hitStaff(const muse::PointF& pos) const override;
const HitElementContext& hitElementContext() const override;
void setHitElementContext(const HitElementContext& context) override;
@@ -492,8 +492,8 @@ private slots:
struct HitMeasureData
{
- Measure* measure = nullptr;
- Staff* staff = nullptr;
+ engraving::Measure* measure = nullptr;
+ engraving::Staff* staff = nullptr;
};
HitMeasureData hitMeasure(const muse::PointF& pos) const;
diff --git a/src/notation/internal/notationnoteinput.cpp b/src/notation/internal/notationnoteinput.cpp
index 455a7a21d6f05..ed19ddc6bae38 100644
--- a/src/notation/internal/notationnoteinput.cpp
+++ b/src/notation/internal/notationnoteinput.cpp
@@ -28,6 +28,7 @@
#include "engraving/dom/masterscore.h"
#include "engraving/dom/mscore.h"
#include "engraving/dom/note.h"
+#include "engraving/dom/part.h"
#include "engraving/dom/segment.h"
#include "engraving/dom/slur.h"
#include "engraving/dom/staff.h"
diff --git a/src/notation/internal/notationplayback.h b/src/notation/internal/notationplayback.h
index 039b267de8fb9..5be8b95db54db 100644
--- a/src/notation/internal/notationplayback.h
+++ b/src/notation/internal/notationplayback.h
@@ -19,8 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef MU_NOTATION_NOTATIONPLAYBACK_H
-#define MU_NOTATION_NOTATIONPLAYBACK_H
+
+#pragma once
#include "modularity/ioc.h"
#include "async/asyncable.h"
@@ -45,10 +45,10 @@ class NotationPlayback : public INotationPlayback, public muse::async::Asyncable
void init() override;
void reload() override;
- void setSendEventsOnScoreChange(const InstrumentTrackId& trackId, bool send) override;
+ void setSendEventsOnScoreChange(const engraving::InstrumentTrackId& trackId, bool send) override;
void sendEventsForChangedTracks() override;
- muse::async::Channel tracksDataChanged() const override;
+ muse::async::Channel tracksDataChanged() const override;
const engraving::InstrumentTrackId& metronomeTrackId() const override;
engraving::InstrumentTrackId chordSymbolsTrackId(const muse::ID& partId) const override;
@@ -83,7 +83,7 @@ class NotationPlayback : public INotationPlayback, public muse::async::Asyncable
muse::async::Notification loopBoundariesChanged() const override;
const Tempo& multipliedTempo(muse::midi::tick_t tick) const override;
- MeasureBeat beat(muse::midi::tick_t tick) const override;
+ engraving::MeasureBeat beat(muse::midi::tick_t tick) const override;
muse::midi::tick_t beatToRawTick(int measureIndex, int beatIndex) const override;
double tempoMultiplier() const override;
@@ -122,5 +122,3 @@ class NotationPlayback : public INotationPlayback, public muse::async::Asyncable
mutable engraving::PlaybackModel m_playbackModel;
};
}
-
-#endif // MU_NOTATION_NOTATIONPLAYBACK_H
diff --git a/src/notation/internal/notationselectionfilter.cpp b/src/notation/internal/notationselectionfilter.cpp
index 0c9090b849e21..dc616a1660537 100644
--- a/src/notation/internal/notationselectionfilter.cpp
+++ b/src/notation/internal/notationselectionfilter.cpp
@@ -22,10 +22,11 @@
#include "notationselectionfilter.h"
-#include "log.h"
+#include "engraving/dom/score.h"
using namespace muse;
using namespace mu::notation;
+using namespace mu::engraving;
NotationSelectionFilter::NotationSelectionFilter(const IGetScore* getScore, const std::function& selectionChangedCallback)
: m_getScore(getScore), m_selectionChangedCallback(selectionChangedCallback)
diff --git a/src/notation/internal/notationselectionfilter.h b/src/notation/internal/notationselectionfilter.h
index b51cdcb62c50f..3d7815d456da7 100644
--- a/src/notation/internal/notationselectionfilter.h
+++ b/src/notation/internal/notationselectionfilter.h
@@ -25,7 +25,6 @@
#include "../inotationselectionfilter.h"
#include "igetscore.h"
-#include "inotationinteraction.h"
namespace mu::notation {
class NotationSelectionFilter : public INotationSelectionFilter
@@ -33,8 +32,8 @@ class NotationSelectionFilter : public INotationSelectionFilter
public:
NotationSelectionFilter(const IGetScore* getScore, const std::function& selectionChangedCallback);
- bool isSelectionTypeFiltered(const SelectionFilterTypesVariant& variant) const override;
- void setSelectionTypeFiltered(const SelectionFilterTypesVariant& variant, bool filtered) override;
+ bool isSelectionTypeFiltered(const engraving::SelectionFilterTypesVariant& variant) const override;
+ void setSelectionTypeFiltered(const engraving::SelectionFilterTypesVariant& variant, bool filtered) override;
bool includeSingleNotes() const override;
void setIncludeSingleNotes(bool include) override;
diff --git a/src/notation/internal/notationselectionrange.cpp b/src/notation/internal/notationselectionrange.cpp
index 7a30c5501819e..2eb25ea98cc64 100644
--- a/src/notation/internal/notationselectionrange.cpp
+++ b/src/notation/internal/notationselectionrange.cpp
@@ -19,15 +19,18 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include
#include "notationselectionrange.h"
#include "utilities/scorerangeutilities.h"
-#include "engraving/dom/segment.h"
-#include "engraving/dom/measure.h"
#include "engraving/dom/chordrest.h"
+#include "engraving/dom/measure.h"
+#include "engraving/dom/score.h"
+#include "engraving/dom/segment.h"
+#include "engraving/dom/select.h"
#include "engraving/dom/staff.h"
using namespace mu::notation;
diff --git a/src/notation/internal/notationselectionrange.h b/src/notation/internal/notationselectionrange.h
index 8db7d37e41387..d6e717f811698 100644
--- a/src/notation/internal/notationselectionrange.h
+++ b/src/notation/internal/notationselectionrange.h
@@ -19,8 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef MU_NOTATION_NOTATIONSELECTIONRANGE_H
-#define MU_NOTATION_NOTATIONSELECTIONRANGE_H
+
+#pragma once
#include "inotationselectionrange.h"
@@ -38,19 +38,19 @@ class NotationSelectionRange : public INotationSelectionRange
engraving::staff_idx_t startStaffIndex() const override;
engraving::Segment* rangeStartSegment() const override;
- Fraction startTick() const override;
+ engraving::Fraction startTick() const override;
engraving::staff_idx_t endStaffIndex() const override;
engraving::Segment* rangeEndSegment() const override;
- Fraction endTick() const override;
+ engraving::Fraction endTick() const override;
MeasureRange measureRange() const override;
- std::vector selectedParts() const override;
+ std::vector selectedParts() const override;
std::vector boundingArea() const override;
bool containsPoint(const muse::PointF& point) const override;
- bool containsItem(const EngravingItem* item, engraving::staff_idx_t staffIdx = muse::nidx) const override;
+ bool containsItem(const engraving::EngravingItem* item, engraving::staff_idx_t staffIdx = muse::nidx) const override;
bool containsMultiNoteChords() const override;
@@ -60,5 +60,3 @@ class NotationSelectionRange : public INotationSelectionRange
IGetScore* m_getScore = nullptr;
};
}
-
-#endif // MU_NOTATION_NOTATIONSELECTIONRANGE_H
diff --git a/src/notation/notationtypes.h b/src/notation/notationtypes.h
index 72caea203d3d7..71910428591f8 100644
--- a/src/notation/notationtypes.h
+++ b/src/notation/notationtypes.h
@@ -19,16 +19,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#pragma once
#include
#include
-#include "translation.h"
-
-#include "types/id.h"
-#include "types/translatablestring.h"
-
#include "engraving/dom/articulation.h"
#include "engraving/dom/chord.h"
#include "engraving/dom/durationtype.h"
@@ -37,23 +33,16 @@
#include "engraving/dom/hairpin.h"
#include "engraving/dom/harmony.h"
#include "engraving/dom/hook.h"
-#include "engraving/dom/instrtemplate.h"
-#include "engraving/dom/instrtemplate.h"
-#include "engraving/dom/instrument.h"
#include "engraving/dom/key.h"
#include "engraving/dom/measure.h"
#include "engraving/dom/mscore.h"
#include "engraving/dom/note.h"
#include "engraving/dom/ottava.h"
#include "engraving/dom/page.h"
-#include "engraving/dom/part.h"
-#include "engraving/dom/sharedpart.h"
#include "engraving/dom/realizedharmony.h"
#include "engraving/dom/rest.h"
#include "engraving/dom/score.h"
#include "engraving/dom/slur.h"
-#include "engraving/dom/staff.h"
-#include "engraving/dom/stafftype.h"
#include "engraving/dom/stem.h"
#include "engraving/dom/system.h"
#include "engraving/dom/timesig.h"
@@ -81,16 +70,11 @@ using Key = mu::engraving::Key;
using KeyMode = mu::engraving::KeyMode;
using TimeSigType = mu::engraving::TimeSigType;
using TimeSignature = mu::engraving::TimeSig;
-using Part = mu::engraving::Part;
-using SharedPart = mu::engraving::SharedPart;
-using Staff = mu::engraving::Staff;
using NoteHead = mu::engraving::NoteHead;
-using SharpFlat = mu::engraving::PreferSharpFlat;
using TransposeMode = mu::engraving::TransposeMode;
using TransposeDirection = mu::engraving::TransposeDirection;
using Fraction = mu::engraving::Fraction;
using ElementPattern = mu::engraving::ElementPattern;
-using SelectionFilterTypesVariant = mu::engraving::SelectionFilterTypesVariant;
using Chord = mu::engraving::Chord;
using ChordRest = mu::engraving::ChordRest;
using Harmony = mu::engraving::Harmony;
@@ -113,47 +97,19 @@ using GraceNoteType = mu::engraving::NoteType;
using BeamMode = mu::engraving::BeamMode;
using LayoutBreakType = mu::engraving::LayoutBreakType;
using Interval = mu::engraving::Interval;
-using Drumset = mu::engraving::Drumset;
-using StringData = mu::engraving::StringData;
-using Clef = mu::engraving::Clef;
-using ClefType = mu::engraving::ClefType;
-using ClefTypeList = mu::engraving::ClefTypeList;
using BracketType = mu::engraving::BracketType;
-using StaffGroup = mu::engraving::StaffGroup;
-using StaffType = mu::engraving::StaffType;
-using StaffTypeId = mu::engraving::StaffTypes;
-using StaffLabel = mu::engraving::StaffLabel;
-using InstrumentLabel = mu::engraving::InstrumentLabel;
using Segment = mu::engraving::Segment;
using TextStyleType = mu::engraving::TextStyleType;
-using TraitType = mu::engraving::TraitType;
using HarmonyDurationType = mu::engraving::HDuration;
using Voicing = mu::engraving::Voicing;
-using Instrument = mu::engraving::Instrument;
-using InstrumentTemplate = mu::engraving::InstrumentTemplate;
-using InstrumentTrait = mu::engraving::Trait;
-using ScoreOrder = mu::engraving::ScoreOrder;
-using InstrumentGenre = mu::engraving::InstrumentGenre;
-using InstrumentGroup = mu::engraving::InstrumentGroup;
using PageList = std::vector;
-using PartList = std::vector;
-using InstrumentTemplateList = std::vector;
-using InstrumentGenreList = std::vector;
-using ScoreOrderList = std::vector;
-using InstrumentGroupList = std::vector;
-using InstrumentTrackId = mu::engraving::InstrumentTrackId;
-using InstrumentTrackIdSet = mu::engraving::InstrumentTrackIdSet;
using voice_idx_t = mu::engraving::voice_idx_t;
using track_idx_t = mu::engraving::track_idx_t;
using staff_idx_t = mu::engraving::staff_idx_t;
using ScoreChanges = mu::engraving::ScoreChanges;
using GuitarBendType = mu::engraving::GuitarBendType;
-using engraving::LoopBoundaryType;
using Pid = mu::engraving::Pid;
using VoiceAssignment = mu::engraving::VoiceAssignment;
-using MeasureBeat = mu::engraving::MeasureBeat;
-
-static const muse::String COMMON_GENRE_ID("common");
enum class DragMode : unsigned char
{
@@ -252,102 +208,6 @@ enum class NoteFilter : unsigned char
WithSlur
};
-struct Tempo
-{
- int valueBpm = 0;
- DurationType duration = DurationType::V_QUARTER;
- bool withDot = false;
-
- bool operator==(const Tempo& other) const
- {
- return valueBpm == other.valueBpm && duration == other.duration && withDot == other.withDot;
- }
-};
-
-static constexpr int MAX_STAVES = 4;
-
-struct InstrumentKey
-{
- muse::String instrumentId;
- muse::ID partId;
- Fraction tick = mu::engraving::Fraction(0, 1);
-};
-
-inline bool isMainInstrumentForPart(const InstrumentKey& instrumentKey, const Part* part)
-{
- return instrumentKey.instrumentId == part->instrumentId() && instrumentKey.tick == Part::MAIN_INSTRUMENT_TICK;
-}
-
-inline QString formatInstrumentTitle(const QString& instrumentName, const InstrumentTrait& trait)
-{
- // Comments for translators start with //:
- switch (trait.type) {
- case TraitType::Tuning:
- //: %1=tuning ("D"), %2=name ("Tin Whistle"). Example: "D Tin Whistle"
- return muse::qtrc("notation", "%1 %2", "Tuned instrument displayed in the UI")
- .arg(trait.name, instrumentName);
- case TraitType::Transposition:
- //: %1=name ("Horn"), %2=transposition ("C alto"). Example: "Horn in C alto"
- return muse::qtrc("notation", "%1 in %2", "Transposing instrument displayed in the UI")
- .arg(instrumentName, trait.name);
- case TraitType::Course:
- //: %1=name ("Tenor Lute"), %2=course/strings ("7-course"). Example: "Tenor Lute (7-course)"
- return muse::qtrc("notation", "%1 (%2)", "String instrument displayed in the UI")
- .arg(instrumentName, trait.name);
- case TraitType::Unknown:
- return instrumentName; // Example: "Flute"
- }
- Q_UNREACHABLE();
-}
-
-inline QString formatInstrumentTitle(const QString& instrumentName, const InstrumentTrait& trait, int instrumentNumber)
-{
- if (instrumentNumber == 0) {
- // Only one instance of this instrument in the score
- return formatInstrumentTitle(instrumentName, trait);
- }
-
- QString number = QString::number(instrumentNumber);
-
- // Comments for translators start with //:
- switch (trait.type) {
- case TraitType::Tuning:
- //: %1=tuning ("D"), %2=name ("Tin Whistle"), %3=number ("2"). Example: "D Tin Whistle 2"
- return muse::qtrc("notation", "%1 %2 %3", "One of several tuned instruments displayed in the UI")
- .arg(trait.name, instrumentName, number);
- case TraitType::Transposition:
- //: %1=name ("Horn"), %2=transposition ("C alto"), %3=number ("2"). Example: "Horn in C alto 2"
- return muse::qtrc("notation", "%1 in %2 %3", "One of several transposing instruments displayed in the UI")
- .arg(instrumentName, trait.name, number);
- case TraitType::Course:
- //: %1=name ("Tenor Lute"), %2=course/strings ("7-course"), %3=number ("2"). Example: "Tenor Lute (7-course) 2"
- return muse::qtrc("notation", "%1 (%2) %3", "One of several string instruments displayed in the UI")
- .arg(instrumentName, trait.name, number);
- case TraitType::Unknown:
- //: %1=name ("Flute"), %2=number ("2"). Example: "Flute 2"
- return muse::qtrc("notation", "%1 %2", "One of several instruments displayed in the UI")
- .arg(instrumentName, number);
- }
- Q_UNREACHABLE();
-}
-
-struct PartInstrument
-{
- muse::ID partId;
- InstrumentTemplate instrumentTemplate;
-
- bool isExistingPart = false;
- bool isSoloist = false;
-};
-
-using PartInstrumentList = QList;
-
-struct PartInstrumentListScoreOrder
-{
- PartInstrumentList instruments;
- ScoreOrder scoreOrder;
-};
-
struct FilterElementsOptions
{
ElementType elementType = ElementType::INVALID;
@@ -380,37 +240,6 @@ struct FilterNotesOptions : FilterElementsOptions
mu::engraving::NoteType noteType = mu::engraving::NoteType::INVALID;
};
-struct StaffConfig
-{
- bool visible = false;
- engraving::Spatium userDistance = engraving::Spatium(0.0);
- bool cutaway = false;
- bool hideSystemBarline = false;
- engraving::AutoOnOff mergeMatchingRests = engraving::AutoOnOff::AUTO;
- bool reflectTranspositionInLinkedTab = false;
- ClefTypeList clefTypeList;
- engraving::StaffType staffType;
-
- bool operator==(const StaffConfig& conf) const
- {
- bool equal = visible == conf.visible;
- equal &= userDistance == conf.userDistance;
- equal &= cutaway == conf.cutaway;
- equal &= hideSystemBarline == conf.hideSystemBarline;
- equal &= mergeMatchingRests == conf.mergeMatchingRests;
- equal &= clefTypeList == conf.clefTypeList;
- equal &= staffType == conf.staffType;
- equal &= reflectTranspositionInLinkedTab == conf.reflectTranspositionInLinkedTab;
-
- return equal;
- }
-
- bool operator!=(const StaffConfig& conf) const
- {
- return !(*this == conf);
- }
-};
-
struct TransposeOptions
{
TransposeMode mode = TransposeMode::UNKNOWN;
@@ -430,34 +259,6 @@ struct TupletOptions
bool autoBaseLen = false;
};
-struct LoopBoundaries
-{
- Fraction loopInTick;
- Fraction loopOutTick;
- bool enabled = false;
-
- bool isNull() const
- {
- return loopInTick.isZero() && loopOutTick.isZero();
- }
-
- bool operator==(const LoopBoundaries& boundaries) const
- {
- bool equals = true;
-
- equals &= loopInTick == boundaries.loopInTick;
- equals &= loopOutTick == boundaries.loopOutTick;
- equals &= enabled == boundaries.enabled;
-
- return equals;
- }
-
- bool operator!=(const LoopBoundaries& boundaries) const
- {
- return !(*this == boundaries);
- }
-};
-
enum class ScoreConfigType : unsigned char
{
ShowInvisibleElements,
@@ -490,12 +291,6 @@ struct ScoreConfig
}
};
-inline QString staffTypeToString(StaffTypeId type)
-{
- const StaffType* preset = StaffType::preset(type);
- return preset ? preset->staffTypeName().toQString() : QString();
-}
-
enum class BracketsType : unsigned char
{
Brackets,
@@ -503,34 +298,6 @@ enum class BracketsType : unsigned char
Parentheses
};
-struct ScoreCreateOptions
-{
- bool withTempo = false;
- Tempo tempo;
-
- Fraction globalTimesig;
- TimeSigType timesigType = TimeSigType::NORMAL;
-
- Key key = Key::C;
-
- int totalMeasures = 0;
-
- bool withPickupMeasure = false;
- Fraction pickupTimesig;
-
- PartInstrumentList parts;
- ScoreOrder order;
-};
-
-inline const ScoreOrder& customOrder()
-{
- static ScoreOrder order;
- order.id = "custom";
- order.name = muse::TranslatableString("engraving/scoreorder", "Custom");
-
- return order;
-}
-
static constexpr int MIN_NOTES_INTERVAL = -10;
static constexpr int MAX_NOTES_INTERVAL = 10;
@@ -560,21 +327,6 @@ inline bool isVerticalBoxTextStyle(TextStyleType type)
return muse::contains(types, type);
}
-struct StringTuningPreset
-{
- std::string name;
- std::vector value;
- bool useFlats = false;
-};
-
-struct StringTuningsInfo
-{
- size_t number = 0;
- std::vector presets;
-};
-
-using InstrumentStringTuningsMap = std::map >;
-
static const mu::engraving::ElementTypeSet NOTE_REST_TYPES {
mu::engraving::ElementType::NOTE,
mu::engraving::ElementType::REST,
diff --git a/src/notation/tests/mocks/notationinteractionmock.h b/src/notation/tests/mocks/notationinteractionmock.h
index 8269962de6366..15a9be018da5e 100644
--- a/src/notation/tests/mocks/notationinteractionmock.h
+++ b/src/notation/tests/mocks/notationinteractionmock.h
@@ -42,9 +42,9 @@ class NotationInteractionMock : public INotationInteraction
MOCK_METHOD(void, toggleVisible, (), (override));
MOCK_METHOD(void, setSelectionVisible, (bool), (override));
- MOCK_METHOD(EngravingItem*, hitElement, (const muse::PointF&, float), (const, override));
- MOCK_METHOD(std::vector, hitElements, (const muse::PointF&, float), (const, override));
- MOCK_METHOD(Staff*, hitStaff, (const muse::PointF&), (const, override));
+ MOCK_METHOD(engraving::EngravingItem*, hitElement, (const muse::PointF&, float), (const, override));
+ MOCK_METHOD(std::vector, hitElements, (const muse::PointF&, float), (const, override));
+ MOCK_METHOD(engraving::Staff*, hitStaff, (const muse::PointF&), (const, override));
MOCK_METHOD(const HitElementContext&, hitElementContext, (), (const, override));
MOCK_METHOD(void, setHitElementContext, (const HitElementContext&), (override));
diff --git a/src/notation/tests/mocks/notationselectionrangemock.h b/src/notation/tests/mocks/notationselectionrangemock.h
index 8bf8926f83837..7a8db9ac74715 100644
--- a/src/notation/tests/mocks/notationselectionrangemock.h
+++ b/src/notation/tests/mocks/notationselectionrangemock.h
@@ -19,8 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef MU_NOTATION_NOTATIONSELECTIONRANGEMOCK_H
-#define MU_NOTATION_NOTATIONSELECTIONRANGEMOCK_H
+
+#pragma once
#include
@@ -32,15 +32,15 @@ class NotationSelectionRangeMock : public INotationSelectionRange
public:
MOCK_METHOD(engraving::staff_idx_t, startStaffIndex, (), (const, override));
MOCK_METHOD(engraving::Segment*, rangeStartSegment, (), (const, override));
- MOCK_METHOD(Fraction, startTick, (), (const, override));
+ MOCK_METHOD(engraving::Fraction, startTick, (), (const, override));
MOCK_METHOD(engraving::staff_idx_t, endStaffIndex, (), (const, override));
MOCK_METHOD(engraving::Segment*, rangeEndSegment, (), (const, override));
- MOCK_METHOD(Fraction, endTick, (), (const, override));
+ MOCK_METHOD(engraving::Fraction, endTick, (), (const, override));
MOCK_METHOD(MeasureRange, measureRange, (), (const, override));
- MOCK_METHOD(std::vector, selectedParts, (), (const, override));
+ MOCK_METHOD(std::vector, selectedParts, (), (const, override));
MOCK_METHOD(std::vector, boundingArea, (), (const, override));
MOCK_METHOD(bool, containsPoint, (const muse::PointF&), (const, override));
@@ -49,5 +49,3 @@ class NotationSelectionRangeMock : public INotationSelectionRange
MOCK_METHOD(bool, containsMultiNoteChords, (), (const, override));
};
}
-
-#endif // MU_NOTATION_NOTATIONSELECTIONRANGEMOCK_H
diff --git a/src/notation/types/instrumentstypes.h b/src/notation/types/instrumentstypes.h
new file mode 100644
index 0000000000000..3b8d6f0eceeb5
--- /dev/null
+++ b/src/notation/types/instrumentstypes.h
@@ -0,0 +1,148 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-only
+ * MuseScore-Studio-CLA-applies
+ *
+ * MuseScore Studio
+ * Music Composition & Notation
+ *
+ * Copyright (C) 2026 MuseScore Limited and others
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#pragma once
+
+#include "types/id.h"
+
+#include "engraving/dom/instrtemplate.h"
+#include "engraving/dom/instrument.h"
+#include "engraving/dom/part.h"
+#include "engraving/dom/scoreorder.h"
+#include "engraving/types/types.h"
+
+namespace mu::notation {
+static constexpr int MAX_STAVES = 4;
+
+using Instrument = mu::engraving::Instrument;
+using InstrumentTemplate = mu::engraving::InstrumentTemplate;
+using InstrumentTrait = mu::engraving::Trait;
+using TraitType = mu::engraving::TraitType;
+using ScoreOrder = mu::engraving::ScoreOrder;
+using InstrumentGenre = mu::engraving::InstrumentGenre;
+using InstrumentGroup = mu::engraving::InstrumentGroup;
+
+using Drumset = mu::engraving::Drumset;
+using StringData = mu::engraving::StringData;
+
+using SharpFlat = mu::engraving::PreferSharpFlat;
+
+using InstrumentTemplateList = std::vector;
+using InstrumentGenreList = std::vector;
+using ScoreOrderList = std::vector;
+using InstrumentGroupList = std::vector;
+using InstrumentTrackId = mu::engraving::InstrumentTrackId;
+using InstrumentTrackIdSet = mu::engraving::InstrumentTrackIdSet;
+
+static const muse::String COMMON_GENRE_ID(u"common");
+
+struct InstrumentKey
+{
+ muse::String instrumentId;
+ muse::ID partId;
+ engraving::Fraction tick = engraving::Fraction(0, 1);
+};
+
+inline bool isMainInstrumentForPart(const InstrumentKey& instrumentKey, const engraving::Part* part)
+{
+ return instrumentKey.instrumentId == part->instrumentId() && instrumentKey.tick == engraving::Part::MAIN_INSTRUMENT_TICK;
+}
+
+inline QString formatInstrumentTitle(const QString& instrumentName, const InstrumentTrait& trait)
+{
+ // Comments for translators start with //:
+ switch (trait.type) {
+ case TraitType::Tuning:
+ //: %1=tuning ("D"), %2=name ("Tin Whistle"). Example: "D Tin Whistle"
+ return muse::qtrc("notation", "%1 %2", "Tuned instrument displayed in the UI")
+ .arg(trait.name, instrumentName);
+ case TraitType::Transposition:
+ //: %1=name ("Horn"), %2=transposition ("C alto"). Example: "Horn in C alto"
+ return muse::qtrc("notation", "%1 in %2", "Transposing instrument displayed in the UI")
+ .arg(instrumentName, trait.name);
+ case TraitType::Course:
+ //: %1=name ("Tenor Lute"), %2=course/strings ("7-course"). Example: "Tenor Lute (7-course)"
+ return muse::qtrc("notation", "%1 (%2)", "String instrument displayed in the UI")
+ .arg(instrumentName, trait.name);
+ case TraitType::Unknown:
+ return instrumentName; // Example: "Flute"
+ }
+ Q_UNREACHABLE();
+}
+
+inline QString formatInstrumentTitle(const QString& instrumentName, const InstrumentTrait& trait, int instrumentNumber)
+{
+ if (instrumentNumber == 0) {
+ // Only one instance of this instrument in the score
+ return formatInstrumentTitle(instrumentName, trait);
+ }
+
+ QString number = QString::number(instrumentNumber);
+
+ // Comments for translators start with //:
+ switch (trait.type) {
+ case TraitType::Tuning:
+ //: %1=tuning ("D"), %2=name ("Tin Whistle"), %3=number ("2"). Example: "D Tin Whistle 2"
+ return muse::qtrc("notation", "%1 %2 %3", "One of several tuned instruments displayed in the UI")
+ .arg(trait.name, instrumentName, number);
+ case TraitType::Transposition:
+ //: %1=name ("Horn"), %2=transposition ("C alto"), %3=number ("2"). Example: "Horn in C alto 2"
+ return muse::qtrc("notation", "%1 in %2 %3", "One of several transposing instruments displayed in the UI")
+ .arg(instrumentName, trait.name, number);
+ case TraitType::Course:
+ //: %1=name ("Tenor Lute"), %2=course/strings ("7-course"), %3=number ("2"). Example: "Tenor Lute (7-course) 2"
+ return muse::qtrc("notation", "%1 (%2) %3", "One of several string instruments displayed in the UI")
+ .arg(instrumentName, trait.name, number);
+ case TraitType::Unknown:
+ //: %1=name ("Flute"), %2=number ("2"). Example: "Flute 2"
+ return muse::qtrc("notation", "%1 %2", "One of several instruments displayed in the UI")
+ .arg(instrumentName, number);
+ }
+ Q_UNREACHABLE();
+}
+
+struct PartInstrument
+{
+ muse::ID partId;
+ InstrumentTemplate instrumentTemplate;
+
+ bool isExistingPart = false;
+ bool isSoloist = false;
+};
+
+using PartInstrumentList = QList;
+
+struct PartInstrumentListScoreOrder
+{
+ PartInstrumentList instruments;
+ ScoreOrder scoreOrder;
+};
+
+inline const ScoreOrder& customOrder()
+{
+ static ScoreOrder order;
+ order.id = "custom";
+ order.name = muse::TranslatableString("engraving/scoreorder", "Custom");
+
+ return order;
+}
+}
diff --git a/src/notation/types/loopboundaries.h b/src/notation/types/loopboundaries.h
new file mode 100644
index 0000000000000..7df2d4bd68a6c
--- /dev/null
+++ b/src/notation/types/loopboundaries.h
@@ -0,0 +1,58 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-only
+ * MuseScore-Studio-CLA-applies
+ *
+ * MuseScore Studio
+ * Music Composition & Notation
+ *
+ * Copyright (C) 2026 MuseScore Limited and others
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#pragma once
+
+#include "engraving/dom/score.h"
+#include "engraving/types/fraction.h"
+
+namespace mu::notation {
+using engraving::LoopBoundaryType;
+
+struct LoopBoundaries
+{
+ engraving::Fraction loopInTick;
+ engraving::Fraction loopOutTick;
+ bool enabled = false;
+
+ bool isNull() const
+ {
+ return loopInTick.isZero() && loopOutTick.isZero();
+ }
+
+ bool operator==(const LoopBoundaries& boundaries) const
+ {
+ bool equals = true;
+
+ equals &= loopInTick == boundaries.loopInTick;
+ equals &= loopOutTick == boundaries.loopOutTick;
+ equals &= enabled == boundaries.enabled;
+
+ return equals;
+ }
+
+ bool operator!=(const LoopBoundaries& boundaries) const
+ {
+ return !(*this == boundaries);
+ }
+};
+}
diff --git a/src/notation/types/scorecreateoptions.h b/src/notation/types/scorecreateoptions.h
new file mode 100644
index 0000000000000..78b68b1cfe9d4
--- /dev/null
+++ b/src/notation/types/scorecreateoptions.h
@@ -0,0 +1,50 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-only
+ * MuseScore-Studio-CLA-applies
+ *
+ * MuseScore Studio
+ * Music Composition & Notation
+ *
+ * Copyright (C) 2026 MuseScore Limited and others
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#pragma once
+
+#include "engraving/dom/timesig.h"
+#include "engraving/types/types.h"
+
+#include "instrumentstypes.h"
+#include "tempo.h"
+
+namespace mu::notation {
+struct ScoreCreateOptions
+{
+ bool withTempo = false;
+ Tempo tempo;
+
+ engraving::Fraction globalTimesig;
+ engraving::TimeSigType timesigType = engraving::TimeSigType::NORMAL;
+
+ engraving::Key key = engraving::Key::C;
+
+ int totalMeasures = 0;
+
+ bool withPickupMeasure = false;
+ engraving::Fraction pickupTimesig;
+
+ PartInstrumentList parts;
+ engraving::ScoreOrder order;
+};
+}
diff --git a/src/notation/types/staffparttypes.h b/src/notation/types/staffparttypes.h
new file mode 100644
index 0000000000000..ec546ccdb2f7f
--- /dev/null
+++ b/src/notation/types/staffparttypes.h
@@ -0,0 +1,72 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-only
+ * MuseScore-Studio-CLA-applies
+ *
+ * MuseScore Studio
+ * Music Composition & Notation
+ *
+ * Copyright (C) 2026 MuseScore Limited and others
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#pragma once
+
+#include "engraving/dom/part.h"
+#include "engraving/dom/staff.h"
+
+namespace mu::notation {
+using Part = mu::engraving::Part;
+using SharedPart = mu::engraving::SharedPart;
+using Staff = mu::engraving::Staff;
+using StaffGroup = mu::engraving::StaffGroup;
+using StaffType = mu::engraving::StaffType;
+using StaffTypeId = mu::engraving::StaffTypes;
+
+struct StaffConfig
+{
+ bool visible = false;
+ engraving::Spatium userDistance = engraving::Spatium(0.0);
+ bool cutaway = false;
+ bool hideSystemBarline = false;
+ engraving::AutoOnOff mergeMatchingRests = engraving::AutoOnOff::AUTO;
+ bool reflectTranspositionInLinkedTab = false;
+ engraving::ClefTypeList clefTypeList;
+ engraving::StaffType staffType;
+
+ bool operator==(const StaffConfig& conf) const
+ {
+ bool equal = visible == conf.visible;
+ equal &= userDistance == conf.userDistance;
+ equal &= cutaway == conf.cutaway;
+ equal &= hideSystemBarline == conf.hideSystemBarline;
+ equal &= mergeMatchingRests == conf.mergeMatchingRests;
+ equal &= clefTypeList == conf.clefTypeList;
+ equal &= staffType == conf.staffType;
+ equal &= reflectTranspositionInLinkedTab == conf.reflectTranspositionInLinkedTab;
+
+ return equal;
+ }
+
+ bool operator!=(const StaffConfig& conf) const
+ {
+ return !(*this == conf);
+ }
+};
+
+inline QString staffTypeToString(StaffTypeId type)
+{
+ const StaffType* preset = StaffType::preset(type);
+ return preset ? preset->staffTypeName().toQString() : QString();
+}
+}
diff --git a/src/notation/types/stringtunings.h b/src/notation/types/stringtunings.h
new file mode 100644
index 0000000000000..e78389f622bf6
--- /dev/null
+++ b/src/notation/types/stringtunings.h
@@ -0,0 +1,40 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-only
+ * MuseScore-Studio-CLA-applies
+ *
+ * MuseScore Studio
+ * Music Composition & Notation
+ *
+ * Copyright (C) 2026 MuseScore Limited and others
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#pragma once
+
+namespace mu::notation {
+struct StringTuningPreset
+{
+ std::string name;
+ std::vector value;
+ bool useFlats = false;
+};
+
+struct StringTuningsInfo
+{
+ size_t number = 0;
+ std::vector presets;
+};
+
+using InstrumentStringTuningsMap = std::map >;
+}
diff --git a/src/notation/types/tempo.h b/src/notation/types/tempo.h
new file mode 100644
index 0000000000000..b2386fb5c6261
--- /dev/null
+++ b/src/notation/types/tempo.h
@@ -0,0 +1,39 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-only
+ * MuseScore-Studio-CLA-applies
+ *
+ * MuseScore Studio
+ * Music Composition & Notation
+ *
+ * Copyright (C) 2026 MuseScore Limited and others
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#pragma once
+
+#include "engraving/types/types.h"
+
+namespace mu::notation {
+struct Tempo
+{
+ int valueBpm = 0;
+ engraving::DurationType duration = engraving::DurationType::V_QUARTER;
+ bool withDot = false;
+
+ bool operator==(const Tempo& other) const
+ {
+ return valueBpm == other.valueBpm && duration == other.duration && withDot == other.withDot;
+ }
+};
+}
diff --git a/src/notationscene/internal/notationactioncontroller.cpp b/src/notationscene/internal/notationactioncontroller.cpp
index 19b59d361cb10..8e24c2e705a63 100644
--- a/src/notationscene/internal/notationactioncontroller.cpp
+++ b/src/notationscene/internal/notationactioncontroller.cpp
@@ -1505,7 +1505,7 @@ muse::Ret NotationActionController::moveWithRet(MoveDirection direction, bool qu
case MoveDirection::Right:
case MoveDirection::Left:
if (globalContext()->playbackState()->isPlaying()) {
- MeasureBeat beat = playbackController()->currentBeat();
+ engraving::MeasureBeat beat = playbackController()->currentBeat();
int targetBeatIdx = static_cast(beat.beat);
int targetMeasureIdx = beat.measureIndex;
int increment = (direction == MoveDirection::Right ? 1 : -1);
diff --git a/src/notationscene/iselectinstrumentscenario.h b/src/notationscene/iselectinstrumentscenario.h
index dbd9cec6af370..498f5130d53aa 100644
--- a/src/notationscene/iselectinstrumentscenario.h
+++ b/src/notationscene/iselectinstrumentscenario.h
@@ -19,12 +19,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef MU_NOTATION_ISELECTINSTRUMENTSSCENARIO_H
-#define MU_NOTATION_ISELECTINSTRUMENTSSCENARIO_H
+#pragma once
+
+#include "async/promise.h"
#include "modularity/imoduleinterface.h"
-#include "notation/notationtypes.h"
-#include "global/async/promise.h"
+
+#include "notation/types/instrumentstypes.h"
namespace mu::notation {
class ISelectInstrumentsScenario : MODULE_CONTEXT_INTERFACE
@@ -39,5 +40,3 @@ class ISelectInstrumentsScenario : MODULE_CONTEXT_INTERFACE
const InstrumentKey& currentInstrumentKey = InstrumentKey()) const = 0;
};
}
-
-#endif // MU_NOTATION_ISELECTINSTRUMENTSSCENARIO_H
diff --git a/src/notationscene/qml/MuseScore/NotationScene/abstractelementpopupmodel.h b/src/notationscene/qml/MuseScore/NotationScene/abstractelementpopupmodel.h
index a441ac6424926..9c8db2cd39ebc 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/abstractelementpopupmodel.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/abstractelementpopupmodel.h
@@ -92,10 +92,10 @@ class AbstractElementPopupModel : public QObject, public muse::Contextable, publ
notation::INotationPtr currentNotation() const;
INotationInteractionPtr interaction() const;
- void changeItemProperty(engraving::Pid id, const PropertyValue& value);
- void changeItemProperty(engraving::Pid id, const PropertyValue& value, engraving::PropertyFlags flags);
+ void changeItemProperty(engraving::Pid id, const engraving::PropertyValue& value);
+ void changeItemProperty(engraving::Pid id, const engraving::PropertyValue& value, engraving::PropertyFlags flags);
- EngravingItem* m_item = nullptr;
+ engraving::EngravingItem* m_item = nullptr;
QRect m_itemRect;
private:
diff --git a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/caposettingsmodel.cpp b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/caposettingsmodel.cpp
index 127a3a0eb14c5..13f6486eedf54 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/caposettingsmodel.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/caposettingsmodel.cpp
@@ -23,6 +23,9 @@
#include "caposettingsmodel.h"
#include "engraving/dom/capo.h"
+#include "engraving/dom/part.h"
+#include "engraving/dom/staff.h"
+#include "engraving/dom/stringdata.h"
using namespace mu::notation;
diff --git a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/dynamicpopupmodel.h b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/dynamicpopupmodel.h
index 8455ce1bb4a4a..d5638bffa04e4 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/dynamicpopupmodel.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/dynamicpopupmodel.h
@@ -27,6 +27,8 @@
#include
#include
+#include "engraving/iengravingfont.h"
+
#include "../abstractelementpopupmodel.h"
namespace mu::notation {
diff --git a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/harppedalpopupmodel.cpp b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/harppedalpopupmodel.cpp
index e561760c4e9e6..a496cf915af3b 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/harppedalpopupmodel.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/harppedalpopupmodel.cpp
@@ -21,10 +21,12 @@
*/
#include "harppedalpopupmodel.h"
-#include "engraving/dom/stafflines.h"
-#include "log.h"
+#include "engraving/dom/measure.h"
+#include "engraving/dom/part.h"
+#include "engraving/dom/stafflines.h"
+using namespace mu::engraving;
using namespace mu::notation;
HarpPedalPopupModel::HarpPedalPopupModel(QObject* parent)
diff --git a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/partialtiepopupmodel.h b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/partialtiepopupmodel.h
index 25b523b4cbcd5..a3664b74d3a29 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/partialtiepopupmodel.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/partialtiepopupmodel.h
@@ -29,6 +29,7 @@
#include "../abstractelementpopupmodel.h"
namespace mu::engraving {
+class EngravingItem;
class Tie;
class TieJumpPoint;
}
@@ -48,7 +49,7 @@ class PartialTiePopupModel : public AbstractElementPopupModel
QVariantList items() const;
bool tieDirection() const;
- static bool canOpen(const EngravingItem* element);
+ static bool canOpen(const engraving::EngravingItem* element);
QPointF dialogPosition() const;
Q_INVOKABLE void init() override;
diff --git a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/percussionnotepopupcontentmodel.cpp b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/percussionnotepopupcontentmodel.cpp
index 7b5cdd3bd7737..49e11c9e4fd23 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/percussionnotepopupcontentmodel.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/percussionnotepopupcontentmodel.cpp
@@ -23,12 +23,14 @@
#include "percussionnotepopupcontentmodel.h"
#include "engraving/dom/drumset.h"
+#include "engraving/dom/part.h"
#include "engraving/dom/shadownote.h"
#include "notation/inotationinteraction.h"
#include "notation/inotationnoteinput.h"
using namespace mu::notation;
+using namespace mu::engraving;
PercussionNotePopupContentModel::PercussionNotePopupContentModel(QObject* parent)
: QObject{parent}, muse::Contextable(muse::iocCtxForQmlObject(this))
@@ -47,7 +49,7 @@ void PercussionNotePopupContentModel::init()
void PercussionNotePopupContentModel::prevDrumNote()
{
const Drumset* ds = currentDrumset();
- const mu::engraving::ShadowNote* shadowNote = currentShadowNote();
+ const ShadowNote* shadowNote = currentShadowNote();
IF_ASSERT_FAILED(ds && shadowNote) {
return;
}
@@ -77,7 +79,7 @@ void PercussionNotePopupContentModel::prevDrumNote()
void PercussionNotePopupContentModel::nextDrumNote()
{
const Drumset* ds = currentDrumset();
- const mu::engraving::ShadowNote* shadowNote = currentShadowNote();
+ const ShadowNote* shadowNote = currentShadowNote();
IF_ASSERT_FAILED(ds && shadowNote) {
return;
}
@@ -161,14 +163,14 @@ INotationNoteInputPtr PercussionNotePopupContentModel::noteInput() const
return interaction() ? interaction()->noteInput() : nullptr;
}
-const mu::engraving::ShadowNote* PercussionNotePopupContentModel::currentShadowNote() const
+const ShadowNote* PercussionNotePopupContentModel::currentShadowNote() const
{
return interaction() ? interaction()->shadowNote() : nullptr;
}
const Drumset* PercussionNotePopupContentModel::currentDrumset() const
{
- const mu::engraving::ShadowNote* shadowNote = currentShadowNote();
+ const ShadowNote* shadowNote = currentShadowNote();
if (!shadowNote) {
return nullptr;
}
@@ -185,7 +187,7 @@ const Drumset* PercussionNotePopupContentModel::currentDrumset() const
int PercussionNotePopupContentModel::currentDrumPitch() const
{
const Drumset* ds = currentDrumset();
- const mu::engraving::ShadowNote* shadowNote = currentShadowNote();
+ const ShadowNote* shadowNote = currentShadowNote();
if (!noteInput() || !ds || !shadowNote) {
return -1;
}
diff --git a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/percussionnotepopupcontentmodel.h b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/percussionnotepopupcontentmodel.h
index 3de6350b27d27..aa09b29194ad7 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/percussionnotepopupcontentmodel.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/percussionnotepopupcontentmodel.h
@@ -30,6 +30,11 @@
#include "async/asyncable.h"
+namespace mu::engraving {
+class Drumset;
+class ShadowNote;
+}
+
namespace mu::notation {
class PercussionNotePopupContentModel : public QObject, public muse::Contextable, public muse::async::Asyncable
{
@@ -63,8 +68,8 @@ class PercussionNotePopupContentModel : public QObject, public muse::Contextable
INotationInteractionPtr interaction() const;
INotationNoteInputPtr noteInput() const;
- const mu::engraving::ShadowNote* currentShadowNote() const;
- const Drumset* currentDrumset() const;
+ const engraving::ShadowNote* currentShadowNote() const;
+ const engraving::Drumset* currentDrumset() const;
int currentDrumPitch() const;
};
diff --git a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/shadownotepopupmodel.cpp b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/shadownotepopupmodel.cpp
index 0e34ff951b6ec..10009f6e47433 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/shadownotepopupmodel.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/shadownotepopupmodel.cpp
@@ -23,6 +23,7 @@
#include "shadownotepopupmodel.h"
#include "engraving/dom/shadownote.h"
+#include "engraving/dom/staff.h"
#include "notation/inotationinteraction.h" // IWYU pragma: keep
diff --git a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/shadownotepopupmodel.h b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/shadownotepopupmodel.h
index e034c831c5ac6..c09dc6fa0f361 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/shadownotepopupmodel.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/shadownotepopupmodel.h
@@ -27,6 +27,10 @@
#include "../abstractelementpopupmodel.h"
+namespace mu::engraving {
+class EngravingItem;
+}
+
namespace mu::notation {
namespace ShadowNotePopupContent {
Q_NAMESPACE;
@@ -52,7 +56,7 @@ class ShadowNotePopupModel : public AbstractElementPopupModel
public:
explicit ShadowNotePopupModel(QObject* parent = nullptr);
- static bool canOpen(const EngravingItem* shadowNote);
+ static bool canOpen(const engraving::EngravingItem* shadowNote);
Q_INVOKABLE void init() override;
diff --git a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/staffvisibilitypopupmodel.cpp b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/staffvisibilitypopupmodel.cpp
index acfe8fd241a21..476687040fa32 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/elementpopups/staffvisibilitypopupmodel.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/elementpopups/staffvisibilitypopupmodel.cpp
@@ -30,6 +30,7 @@
#include "containers.h"
#include "engraving/dom/measure.h"
+#include "engraving/dom/part.h"
#include "engraving/dom/staff.h"
#include "engraving/dom/staffvisibilityindicator.h"
#include "engraving/dom/system.h"
@@ -43,6 +44,7 @@
#include "log.h"
using namespace mu::notation;
+using namespace mu::engraving;
using mu::engraving::rendering::score::SystemLayout;
StaffVisibilityPopupModel::StaffVisibilityPopupModel(QObject* parent)
@@ -103,7 +105,7 @@ EmptyStavesVisibilityModel::EmptyStavesVisibilityModel(QObject* parent)
EmptyStavesVisibilityModel::~EmptyStavesVisibilityModel() = default;
-void EmptyStavesVisibilityModel::load(INotationPtr notation, engraving::System* system)
+void EmptyStavesVisibilityModel::load(INotationPtr notation, System* system)
{
m_notation = notation;
m_system = system;
@@ -113,7 +115,7 @@ void EmptyStavesVisibilityModel::load(INotationPtr notation, engraving::System*
void EmptyStavesVisibilityModel::reload()
{
- engraving::Fraction tick = m_system->tick();
+ Fraction tick = m_system->tick();
assert(m_system && m_system->staves().size() == m_system->score()->nstaves());
diff --git a/src/notationscene/qml/MuseScore/NotationScene/loopmarker.cpp b/src/notationscene/qml/MuseScore/NotationScene/loopmarker.cpp
index a1189754e49fd..0e1c314a23767 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/loopmarker.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/loopmarker.cpp
@@ -25,6 +25,7 @@
#include "draw/painter.h"
#include "draw/types/pen.h"
+#include "engraving/dom/staff.h"
#include "engraving/iengravingfont.h"
#include "notation/inotationelements.h" // IWYU pragma: keep
@@ -33,6 +34,7 @@
using namespace muse;
using namespace mu;
using namespace mu::notation;
+using namespace mu::engraving;
LoopMarker::LoopMarker(LoopBoundaryType type, const modularity::ContextPtr& iocCtx)
: muse::Contextable(iocCtx), m_type(type)
diff --git a/src/notationscene/qml/MuseScore/NotationScene/loopmarker.h b/src/notationscene/qml/MuseScore/NotationScene/loopmarker.h
index 8153f59fa8a95..3f656f75aa89e 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/loopmarker.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/loopmarker.h
@@ -35,7 +35,7 @@ class LoopMarker : public muse::Contextable
muse::GlobalInject configuration;
public:
- LoopMarker(LoopBoundaryType type, const muse::modularity::ContextPtr& iocCtx);
+ LoopMarker(engraving::LoopBoundaryType type, const muse::modularity::ContextPtr& iocCtx);
void setNotation(INotationPtr notation);
void setVisible(bool visible);
@@ -47,7 +47,7 @@ class LoopMarker : public muse::Contextable
private:
muse::RectF resolveMarkerRectByTick(engraving::Fraction tick) const;
- LoopBoundaryType m_type = LoopBoundaryType::Unknown;
+ engraving::LoopBoundaryType m_type = engraving::LoopBoundaryType::Unknown;
muse::RectF m_rect;
bool m_visible = false;
INotationPtr m_notation;
diff --git a/src/notationscene/qml/MuseScore/NotationScene/notationautomationcontroller.cpp b/src/notationscene/qml/MuseScore/NotationScene/notationautomationcontroller.cpp
index f2002b0c97840..75c6a162dcdca 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/notationautomationcontroller.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/notationautomationcontroller.cpp
@@ -26,6 +26,7 @@
#include "engraving/automation/iautomation.h"
#include "engraving/dom/masterscore.h"
+#include "engraving/dom/staff.h"
#include "notation/inotationautomation.h"
#include "notation/inotationelements.h"
@@ -33,6 +34,7 @@
#include "defer.h"
using namespace mu::notation;
+using namespace mu::engraving;
using namespace muse::uicomponents;
static bool polylinePointIndexIsValid(const PolylinePlot* polyline, int pointIdx)
diff --git a/src/notationscene/qml/MuseScore/NotationScene/notationcontextmenumodel.cpp b/src/notationscene/qml/MuseScore/NotationScene/notationcontextmenumodel.cpp
index 88f80a2a350a9..dfaf4c5e97ea2 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/notationcontextmenumodel.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/notationcontextmenumodel.cpp
@@ -26,13 +26,15 @@
#include "ui/view/iconcodes.h"
-#include "widgets/editstyleutils.h"
-
-#include "engraving/dom/gradualtempochange.h"
#include "engraving/dom/fret.h"
+#include "engraving/dom/gradualtempochange.h"
+#include "engraving/dom/part.h"
+#include "engraving/dom/staff.h"
#include "notation/inotationselection.h"
+#include "widgets/editstyleutils.h"
+
using namespace mu::notation;
using namespace muse;
using namespace muse::uicomponents;
diff --git a/src/notationscene/qml/MuseScore/NotationScene/notationruler.cpp b/src/notationscene/qml/MuseScore/NotationScene/notationruler.cpp
index 9d3c19a3d7f4a..14a71636ba4b7 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/notationruler.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/notationruler.cpp
@@ -23,9 +23,12 @@
#include "notationruler.h"
#include "draw/types/drawtypes.h"
-#include "notation/notationtypes.h"
+
+#include "engraving/dom/staff.h"
#include "engraving/dom/sig.h"
+#include "notation/notationtypes.h"
+
#include "ui/view/iconcodes.h"
#include "draw/painter.h"
#include "draw/types/color.h"
diff --git a/src/notationscene/qml/MuseScore/NotationScene/notationviewinputcontroller.cpp b/src/notationscene/qml/MuseScore/NotationScene/notationviewinputcontroller.cpp
index efd844bbe0363..b033aed1b1d7d 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/notationviewinputcontroller.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/notationviewinputcontroller.cpp
@@ -35,9 +35,10 @@
#include "abstractelementpopupmodel.h"
#include "engraving/dom/drumset.h"
-#include "engraving/dom/mscore.h"
#include "engraving/dom/fret.h"
+#include "engraving/dom/mscore.h"
#include "engraving/dom/shadownote.h"
+#include "engraving/dom/staff.h"
#include "notation/inotationelements.h" // IWYU pragma: keep
#include "notation/inotationnoteinput.h"
diff --git a/src/notationscene/qml/MuseScore/NotationScene/noteinputbarmodel.h b/src/notationscene/qml/MuseScore/NotationScene/noteinputbarmodel.h
index 8cda49fc2bde3..609e09f676b08 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/noteinputbarmodel.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/noteinputbarmodel.h
@@ -24,7 +24,6 @@
#include
#include
-#include "notation/inotation.h"
#include "uicomponents/qml/Muse/UiComponents/abstractmenumodel.h"
#include "modularity/ioc.h"
diff --git a/src/notationscene/qml/MuseScore/NotationScene/noteinputcursor.cpp b/src/notationscene/qml/MuseScore/NotationScene/noteinputcursor.cpp
index d7f40dd8a6934..d5e0c454e206f 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/noteinputcursor.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/noteinputcursor.cpp
@@ -24,6 +24,8 @@
#include "draw/painter.h"
+#include "engraving/dom/staff.h"
+
#include "notation/inotationinteraction.h" // IWYU pragma: keep
#include "notation/inotationnoteinput.h"
diff --git a/src/notationscene/qml/MuseScore/NotationScene/playbackcursor.cpp b/src/notationscene/qml/MuseScore/NotationScene/playbackcursor.cpp
index 5a6e5f1449ce2..26a57b9e4f613 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/playbackcursor.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/playbackcursor.cpp
@@ -24,6 +24,7 @@
#include "draw/painter.h"
+#include "engraving/dom/staff.h"
#include "engraving/dom/system.h"
#include "notation/inotation.h"
diff --git a/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/abstractselectionfiltermodel.cpp b/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/abstractselectionfiltermodel.cpp
index e17394a8635ad..2e6b8e49ec4f8 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/abstractselectionfiltermodel.cpp
+++ b/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/abstractselectionfiltermodel.cpp
@@ -28,6 +28,7 @@
#include "notation/inotationselectionfilter.h"
using namespace mu::notation;
+using namespace mu::engraving;
AbstractSelectionFilterModel::AbstractSelectionFilterModel(QObject* parent)
: QAbstractListModel(parent), muse::Contextable(muse::iocCtxForQmlObject(this))
diff --git a/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/abstractselectionfiltermodel.h b/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/abstractselectionfiltermodel.h
index 5658b2e51dd5b..424bc269efe1d 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/abstractselectionfiltermodel.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/abstractselectionfiltermodel.h
@@ -30,6 +30,8 @@
#include "modularity/ioc.h"
#include "context/iglobalcontext.h"
+#include "engraving/dom/selectionfilter.h"
+
namespace mu::notation {
class AbstractSelectionFilterModel : public QAbstractListModel, public muse::Contextable, public muse::async::Asyncable
{
@@ -75,24 +77,24 @@ class AbstractSelectionFilterModel : public QAbstractListModel, public muse::Con
virtual bool isAllSelected() const;
virtual bool isNoneSelected() const;
- virtual SelectionFilterTypesVariant getAllMask() const = 0;
- virtual SelectionFilterTypesVariant getNoneMask() const = 0;
+ virtual engraving::SelectionFilterTypesVariant getAllMask() const = 0;
+ virtual engraving::SelectionFilterTypesVariant getNoneMask() const = 0;
INotationInteractionPtr currentNotationInteraction() const;
INotationSelectionFilterPtr currentNotationSelectionFilter() const;
- virtual bool isFiltered(const SelectionFilterTypesVariant& variant) const;
- virtual void setFiltered(const SelectionFilterTypesVariant& variant, bool filtered);
+ virtual bool isFiltered(const engraving::SelectionFilterTypesVariant& variant) const;
+ virtual void setFiltered(const engraving::SelectionFilterTypesVariant& variant, bool filtered);
- virtual bool isAllowed(const SelectionFilterTypesVariant&) const { return true; }
- virtual QString titleForType(const SelectionFilterTypesVariant& variant) const = 0;
- bool isIndeterminate(const SelectionFilterTypesVariant& variant) const;
+ virtual bool isAllowed(const engraving::SelectionFilterTypesVariant&) const { return true; }
+ virtual QString titleForType(const engraving::SelectionFilterTypesVariant& variant) const = 0;
+ bool isIndeterminate(const engraving::SelectionFilterTypesVariant& variant) const;
virtual void onSelectionChanged();
virtual void onNotationChanged();
- void notifyAboutDataChanged(const QModelIndex& index, const SelectionFilterTypesVariant& variant);
+ void notifyAboutDataChanged(const QModelIndex& index, const engraving::SelectionFilterTypesVariant& variant);
- QList m_types;
+ QList m_types;
private:
INotationPtr currentNotation() const;
diff --git a/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/elementsselectionfiltermodel.h b/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/elementsselectionfiltermodel.h
index 0ff4639cc2016..0038b6615e60a 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/elementsselectionfiltermodel.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/elementsselectionfiltermodel.h
@@ -39,9 +39,9 @@ class ElementsSelectionFilterModel : public AbstractSelectionFilterModel
private:
void loadTypes() override;
- SelectionFilterTypesVariant getAllMask() const override { return engraving::ElementsSelectionFilterTypes::ALL; }
- SelectionFilterTypesVariant getNoneMask() const override { return engraving::ElementsSelectionFilterTypes::NONE; }
+ engraving::SelectionFilterTypesVariant getAllMask() const override { return engraving::ElementsSelectionFilterTypes::ALL; }
+ engraving::SelectionFilterTypesVariant getNoneMask() const override { return engraving::ElementsSelectionFilterTypes::NONE; }
- QString titleForType(const SelectionFilterTypesVariant& variant) const override;
+ QString titleForType(const engraving::SelectionFilterTypesVariant& variant) const override;
};
}
diff --git a/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/notesinchordselectionfiltermodel.h b/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/notesinchordselectionfiltermodel.h
index 30f76854022fc..60b2d674201c1 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/notesinchordselectionfiltermodel.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/notesinchordselectionfiltermodel.h
@@ -52,20 +52,20 @@ class NotesInChordSelectionFilterModel : public AbstractSelectionFilterModel
void loadTypes() override;
- bool isFiltered(const SelectionFilterTypesVariant& variant) const override;
- void setFiltered(const SelectionFilterTypesVariant& variant, bool filtered) override;
+ bool isFiltered(const engraving::SelectionFilterTypesVariant& variant) const override;
+ void setFiltered(const engraving::SelectionFilterTypesVariant& variant, bool filtered) override;
- bool isAllowed(const SelectionFilterTypesVariant& variant) const override;
+ bool isAllowed(const engraving::SelectionFilterTypesVariant& variant) const override;
- SelectionFilterTypesVariant getAllMask() const override { return engraving::NotesInChordSelectionFilterTypes::ALL; }
- SelectionFilterTypesVariant getNoneMask() const override { return engraving::NotesInChordSelectionFilterTypes::NONE; }
+ engraving::SelectionFilterTypesVariant getAllMask() const override { return engraving::NotesInChordSelectionFilterTypes::ALL; }
+ engraving::SelectionFilterTypesVariant getNoneMask() const override { return engraving::NotesInChordSelectionFilterTypes::NONE; }
bool includeSingleNotes() const;
void setIncludeSingleNotes(bool include);
bool multipleIndicesSelected() const;
- QString titleForType(const SelectionFilterTypesVariant& variant) const override;
+ QString titleForType(const engraving::SelectionFilterTypesVariant& variant) const override;
size_t noteIdxForType(const engraving::NotesInChordSelectionFilterTypes& type) const;
engraving::NotesInChordSelectionFilterTypes typeForNoteIdx(size_t noteIdx) const;
void updateTopNoteIdx();
diff --git a/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/voicesselectionfiltermodel.h b/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/voicesselectionfiltermodel.h
index ce249dfa52ce5..78a35444a23d9 100644
--- a/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/voicesselectionfiltermodel.h
+++ b/src/notationscene/qml/MuseScore/NotationScene/selectionfilter/voicesselectionfiltermodel.h
@@ -39,9 +39,9 @@ class VoicesSelectionFilterModel : public AbstractSelectionFilterModel
private:
void loadTypes() override;
- SelectionFilterTypesVariant getAllMask() const override { return engraving::VoicesSelectionFilterTypes::ALL; }
- SelectionFilterTypesVariant getNoneMask() const override { return engraving::VoicesSelectionFilterTypes::NONE; }
+ engraving::SelectionFilterTypesVariant getAllMask() const override { return engraving::VoicesSelectionFilterTypes::ALL; }
+ engraving::SelectionFilterTypesVariant getNoneMask() const override { return engraving::VoicesSelectionFilterTypes::NONE; }
- QString titleForType(const SelectionFilterTypesVariant& variant) const override;
+ QString titleForType(const engraving::SelectionFilterTypesVariant& variant) const override;
};
}
diff --git a/src/notationscene/widgets/editstaff.h b/src/notationscene/widgets/editstaff.h
index bbacdf093f365..4a72b2a168311 100644
--- a/src/notationscene/widgets/editstaff.h
+++ b/src/notationscene/widgets/editstaff.h
@@ -25,7 +25,6 @@
#include "ui/view/widgetdialog.h"
#include "ui_editstaff.h"
-#include "engraving/dom/stafftype.h"
#include "global/async/asyncable.h"
@@ -97,7 +96,7 @@ private slots:
void initStaff();
- Staff* staff(int staffIndex) const;
+ engraving::Staff* staff(int staffIndex) const;
Instrument instrument() const;
std::vector otherInstrumentsInSameGroup() const;
@@ -107,13 +106,13 @@ private slots:
QString midiCodeToStr(int midiCode);
- mu::engraving::Staff* m_staff = nullptr;
- mu::engraving::Staff* m_orgStaff = nullptr;
+ engraving::Staff* m_staff = nullptr;
+ engraving::Staff* m_orgStaff = nullptr;
Instrument m_instrument;
Instrument m_orgInstrument;
InstrumentKey m_instrumentKey;
int m_minPitchA, m_maxPitchA, m_minPitchP, m_maxPitchP;
- mu::engraving::Fraction m_tick;
+ engraving::Fraction m_tick;
EditStaffType* editStaffTypeDialog = nullptr;
};
diff --git a/src/notationscene/widgets/editstafftype.h b/src/notationscene/widgets/editstafftype.h
index b92d6c339542a..fe1627b6c568a 100644
--- a/src/notationscene/widgets/editstafftype.h
+++ b/src/notationscene/widgets/editstafftype.h
@@ -29,8 +29,6 @@
#include "engraving/dom/stafftype.h"
-#include "notation/notationtypes.h"
-
namespace mu::notation {
class EditStaffType : public QDialog, private Ui::EditStaffType, public muse::Contextable
{
@@ -74,7 +72,7 @@ private slots:
void setStaffType(const mu::engraving::StaffType* staffType);
mu::engraving::StaffType getStaffType() const { return staffType; }
- void setInstrument(const Instrument& instrument);
+ void setInstrument(const engraving::Instrument& instrument);
private:
muse::Ret loadScore(mu::engraving::MasterScore* score, const muse::io::path_t& path);
diff --git a/src/notationscene/widgets/editstringdata.cpp b/src/notationscene/widgets/editstringdata.cpp
index c9af87b18f6de..a3cd153c53f94 100644
--- a/src/notationscene/widgets/editstringdata.cpp
+++ b/src/notationscene/widgets/editstringdata.cpp
@@ -29,6 +29,7 @@
#include "editpitch.h"
+#include "engraving/dom/staff.h"
#include "engraving/dom/stringdata.h"
#include "engraving/dom/stringtunings.h"
#include "engraving/editing/editpart.h"
diff --git a/src/notationscene/widgets/editstringdata.h b/src/notationscene/widgets/editstringdata.h
index d0e9fc842bca7..b45caae94051e 100644
--- a/src/notationscene/widgets/editstringdata.h
+++ b/src/notationscene/widgets/editstringdata.h
@@ -29,6 +29,10 @@
#include "modularity/ioc.h"
#include "context/iglobalcontext.h"
+namespace mu::engraving {
+class Instrument;
+}
+
namespace mu::notation {
//---------------------------------------------------------
// EditStringData
@@ -76,6 +80,6 @@ private slots:
std::vector _stringsLoc; // local working copy of string list
bool m_updateOnExit = false;
- Instrument* m_instrument = nullptr;
+ engraving::Instrument* m_instrument = nullptr;
};
}
diff --git a/src/notationscene/widgets/editstyle.h b/src/notationscene/widgets/editstyle.h
index 0a70096a4bee1..fa66895ef3569 100644
--- a/src/notationscene/widgets/editstyle.h
+++ b/src/notationscene/widgets/editstyle.h
@@ -87,7 +87,7 @@ public slots:
void setHeaderFooterMacroInfoText();
void adjustPagesStackSize(int currentPageIndex);
- bool isBoolStyleRepresentedByButtonGroup(StyleId id);
+ bool isBoolStyleRepresentedByButtonGroup(engraving::Sid id);
struct WidgetAndView {
QWidget* widget = nullptr;
@@ -102,14 +102,14 @@ public slots:
typedef QWidget* EditStyle::* EditStylePage;
struct StyleWidget {
- StyleId idx = StyleId::NOSTYLE;
+ engraving::Sid idx = engraving::Sid::NOSTYLE;
bool showPercent = false;
QObject* widget = nullptr;
QToolButton* reset = nullptr;
};
QVector styleWidgets;
- const StyleWidget& styleWidget(StyleId id) const;
+ const StyleWidget& styleWidget(engraving::Sid id) const;
class LineStyleSelect;
std::vector m_lineStyleSelects;
@@ -119,20 +119,20 @@ public slots:
QPushButton* buttonApplyToAllParts = nullptr;
void unhandledType(const StyleWidget);
- PropertyValue getValue(StyleId idx);
+ engraving::PropertyValue getValue(engraving::Sid idx);
void setValues();
- const PropertyValue& styleValue(StyleId id) const;
- const PropertyValue& defaultStyleValue(StyleId id) const;
- bool hasDefaultStyleValue(StyleId id) const;
+ const engraving::PropertyValue& styleValue(engraving::Sid id) const;
+ const engraving::PropertyValue& defaultStyleValue(engraving::Sid id) const;
+ bool hasDefaultStyleValue(engraving::Sid id) const;
bool dynamicsAndHairpinPosPropertiesHaveDefaultStyleValue() const;
- void setStyleQVariantValue(StyleId id, const QVariant& value);
- void setStyleValue(StyleId id, const PropertyValue& value);
+ void setStyleQVariantValue(engraving::Sid id, const QVariant& value);
+ void setStyleValue(engraving::Sid id, const engraving::PropertyValue& value);
private slots:
// void selectChordDescriptionFile();
// void setChordStyle(bool);
- void enableStyleWidget(const StyleId idx, bool enable);
+ void enableStyleWidget(const engraving::Sid idx, bool enable);
void enableVerticalSpreadClicked(bool);
void disableVerticalSpreadClicked(bool);
void toggleHeaderOddEven(bool);
diff --git a/src/notationscene/widgets/pagesettings.cpp b/src/notationscene/widgets/pagesettings.cpp
index 944a06c9cbeb7..ea86de325c82b 100644
--- a/src/notationscene/widgets/pagesettings.cpp
+++ b/src/notationscene/widgets/pagesettings.cpp
@@ -19,6 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include "pagesettings.h"
#include
diff --git a/src/notationscene/widgets/pagesettings.h b/src/notationscene/widgets/pagesettings.h
index 741ed7c41a858..d9e1ccce2d0e7 100644
--- a/src/notationscene/widgets/pagesettings.h
+++ b/src/notationscene/widgets/pagesettings.h
@@ -19,8 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef MU_NOTATION_PAGESETTINGS_H
-#define MU_NOTATION_PAGESETTINGS_H
+
+#pragma once
#include "ui/view/widgetdialog.h"
@@ -29,6 +29,8 @@
#include "context/iglobalcontext.h"
#include "framework/global/iglobalconfiguration.h"
+#include "engraving/style/styledef.h"
+
namespace mu::engraving {
class Score;
}
@@ -61,9 +63,9 @@ public slots:
void applyToScore(mu::engraving::Score*);
mu::engraving::Score* score() const;
- double styleValueDouble(StyleId styleId) const;
- bool styleValueBool(StyleId styleId) const;
- void setStyleValue(StyleId styleId, const PropertyValue& newValue) const;
+ double styleValueDouble(engraving::Sid styleId) const;
+ bool styleValueBool(engraving::Sid styleId) const;
+ void setStyleValue(engraving::Sid styleId, const engraving::PropertyValue& newValue) const;
bool mmUnit = false;
bool _changeFlag = false;
@@ -93,4 +95,3 @@ private slots:
void on_resetPageStyleButton_clicked();
};
}
-#endif // MU_NOTATION_PAGESETTINGS_H
diff --git a/src/notationscene/widgets/selectdialog.h b/src/notationscene/widgets/selectdialog.h
index ca6cbc02af39a..b5afe0e883183 100644
--- a/src/notationscene/widgets/selectdialog.h
+++ b/src/notationscene/widgets/selectdialog.h
@@ -28,7 +28,10 @@
#include "modularity/ioc.h"
#include "context/iglobalcontext.h"
+#include "notation/notationtypes.h"
+
namespace mu::engraving {
+class EngravingItem;
class System;
}
@@ -68,8 +71,8 @@ private slots:
void apply() const;
FilterElementsOptions elementOptions() const;
- mu::engraving::System* elementSystem(const EngravingItem* element) const;
+ engraving::System* elementSystem(const engraving::EngravingItem* element) const;
- const EngravingItem* m_element = nullptr;
+ const engraving::EngravingItem* m_element = nullptr;
};
}
diff --git a/src/notationscene/widgets/selectnotedialog.h b/src/notationscene/widgets/selectnotedialog.h
index eb7ee79913188..66ce483e15d74 100644
--- a/src/notationscene/widgets/selectnotedialog.h
+++ b/src/notationscene/widgets/selectnotedialog.h
@@ -28,6 +28,8 @@
#include "modularity/ioc.h"
#include "context/iglobalcontext.h"
+#include "notation/notationtypes.h"
+
namespace mu::engraving {
struct NotePattern;
class Note;
diff --git a/src/notationscene/widgets/timeline.h b/src/notationscene/widgets/timeline.h
index 43186907052ef..989ec2738598b 100644
--- a/src/notationscene/widgets/timeline.h
+++ b/src/notationscene/widgets/timeline.h
@@ -20,10 +20,12 @@
* along with this program. If not, see .
*/
-#ifndef MU_NOTATION_TIMELINE_H
-#define MU_NOTATION_TIMELINE_H
+#pragma once
-#include "engraving/dom/select.h"
+#include
+
+#include
+#include
#include "modularity/ioc.h"
#include "ui/iuiconfiguration.h"
@@ -32,13 +34,13 @@
#include "actions/iactionsdispatcher.h"
#include "playback/iplaybackcontroller.h"
-#include
-#include
-#include
-
namespace mu::engraving {
-class Score;
+class Measure;
class Page;
+class Part;
+class Score;
+class Staff;
+enum class SelState : char;
}
namespace mu::notation {
@@ -154,7 +156,7 @@ class Timeline : public QGraphicsView, public muse::Contextable, public muse::as
TimelineTheme _lightTheme, _darkTheme;
- std::tuple _repeatInfo;
+ std::tuple _repeatInfo;
std::tuple _oldHoverInfo;
std::map _barlines;
@@ -193,8 +195,8 @@ class Timeline : public QGraphicsView, public muse::Contextable, public muse::as
bool addMetaValue(int x, int pos, QString metaText, int row, engraving::ElementType elementType, engraving::EngravingItem* element,
engraving::Segment* seg, engraving::Measure* measure, QString tooltip = "");
- void setMetaData(QGraphicsItem* gi, int staff, engraving::ElementType et, Measure* m, bool full_measure, engraving::EngravingItem* e,
- QGraphicsItem* pairItem = nullptr, engraving::Segment* seg = nullptr);
+ void setMetaData(QGraphicsItem* gi, int staff, engraving::ElementType et, engraving::Measure* m, bool full_measure,
+ engraving::EngravingItem* e, QGraphicsItem* pairItem = nullptr, engraving::Segment* seg = nullptr);
unsigned getMetaRow(QString targetText);
int _globalMeasureNumber { 0 };
@@ -274,5 +276,3 @@ private slots:
void seekSelection();
};
}
-
-#endif // MU_NOTATION_TIMELINE_H
diff --git a/src/notationscene/widgets/tupletdialog.h b/src/notationscene/widgets/tupletdialog.h
index f4f72cc7e9c97..d7810716501ea 100644
--- a/src/notationscene/widgets/tupletdialog.h
+++ b/src/notationscene/widgets/tupletdialog.h
@@ -29,6 +29,8 @@
#include "context/iglobalcontext.h"
#include "actions/iactionsdispatcher.h"
+#include "notation/notationtypes.h"
+
namespace mu::notation {
class TupletDialog : public muse::ui::WidgetDialog, private Ui::TupletDialog
{
diff --git a/src/palette/widgets/customizekitdialog.h b/src/palette/widgets/customizekitdialog.h
index 39739e2190314..f0eaba89bb298 100644
--- a/src/palette/widgets/customizekitdialog.h
+++ b/src/palette/widgets/customizekitdialog.h
@@ -19,8 +19,8 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#ifndef MU_PALETTE_CUSTOMIZEKITDIALOG_H
-#define MU_PALETTE_CUSTOMIZEKITDIALOG_H
+
+#pragma once
#include "ui/view/widgetdialog.h"
@@ -36,6 +36,7 @@
#include "ui/iuiconfiguration.h"
#include "engraving/dom/drumset.h"
+#include "notation/types/instrumentstypes.h"
namespace mu::palette {
//---------------------------------------------------------
@@ -96,5 +97,3 @@ private slots:
engraving::Drumset m_editedDrumset;
};
}
-
-#endif // MU_PALETTE_CUSTOMIZEKITDIALOG_H
diff --git a/src/playback/internal/playbackcontroller.h b/src/playback/internal/playbackcontroller.h
index d7214d7d045b5..04a78f1397c81 100644
--- a/src/playback/internal/playbackcontroller.h
+++ b/src/playback/internal/playbackcontroller.h
@@ -30,7 +30,6 @@
#include "rcommand/commandable.h"
#include "actions/actionable.h"
#include "context/iglobalcontext.h"
-#include "notation/notationtypes.h"
#include "engraving/types/types.h"
#include "notation/inotationconfiguration.h"
#include "notation/inotationplayback.h"
@@ -94,15 +93,15 @@ class PlaybackController : public IPlaybackController, public muse::actions::Act
const SoloMuteState& trackSoloMuteState(const engraving::InstrumentTrackId& trackId) const override;
void setTrackSoloMuteState(const engraving::InstrumentTrackId& trackId, const SoloMuteState& state) override;
- void playElements(const std::vector& elements,
+ void playElements(const std::vector& elements,
const PlayParams& params = PlayParams(), bool isMidi = false) override;
- void playNotes(const notation::NoteValList& notes, notation::staff_idx_t staffIdx, const notation::Segment* segment,
+ void playNotes(const engraving::NoteValList& notes, engraving::staff_idx_t staffIdx, const engraving::Segment* segment,
const PlayParams& params = PlayParams()) override;
void playMetronome(int tick) override;
- void triggerControllers(const muse::mpe::ControllerChangeEventList& list, notation::staff_idx_t staffIdx, int tick) override;
+ void triggerControllers(const muse::mpe::ControllerChangeEventList& list, engraving::staff_idx_t staffIdx, int tick) override;
- void seekElement(const notation::EngravingItem* element, bool flushSound = true) override;
+ void seekElement(const engraving::EngravingItem* element, bool flushSound = true) override;
void seekBeat(int measureIndex, int beatIndex, bool flushSound = true) override;
bool actionChecked(const muse::actions::ActionCode& actionCode) const override;
@@ -114,7 +113,7 @@ class PlaybackController : public IPlaybackController, public muse::actions::Act
const notation::Tempo& currentTempo() const override;
muse::async::Notification currentTempoChanged() const override;
- notation::MeasureBeat currentBeat() const override;
+ engraving::MeasureBeat currentBeat() const override;
muse::audio::secs_t beatToSecs(int measureIndex, int beatIndex) const override;
double tempoMultiplier() const override;
@@ -186,7 +185,7 @@ class PlaybackController : public IPlaybackController, public muse::actions::Act
muse::audio::secs_t playbackStartSecs() const;
- notation::InstrumentTrackIdSet instrumentTrackIdSetForRangePlayback() const;
+ engraving::InstrumentTrackIdSet instrumentTrackIdSetForRangePlayback() const;
muse::Ret togglePlayRepeats();
muse::Ret togglePlayChordSymbols();
@@ -202,8 +201,8 @@ class PlaybackController : public IPlaybackController, public muse::actions::Act
muse::Ret showPlaybackSetup();
muse::Ret toggleLoopPlayback();
- muse::Ret addLoopBoundary(notation::LoopBoundaryType type);
- void addLoopBoundaryToTick(notation::LoopBoundaryType type, int tick);
+ muse::Ret addLoopBoundary(engraving::LoopBoundaryType type);
+ void addLoopBoundaryToTick(engraving::LoopBoundaryType type, int tick);
void updateLoop();
void enableLoop();
diff --git a/src/playback/iplaybackcontroller.h b/src/playback/iplaybackcontroller.h
index 2839427b0cb81..5e057f4857a77 100644
--- a/src/playback/iplaybackcontroller.h
+++ b/src/playback/iplaybackcontroller.h
@@ -30,12 +30,19 @@
#include "global/progress.h"
#include "modularity/imoduleinterface.h"
+#include "engraving/dom/noteval.h"
+
#include "notation/inotation_fwd.h"
#include "notation/inotationsolomutestate.h"
-#include "notation/notationtypes.h"
+#include "notation/types/tempo.h"
#include "playbacktypes.h"
+namespace mu::engraving {
+class EngravingItem;
+class Segment;
+}
+
namespace mu::playback {
class IPlaybackController : MODULE_CONTEXT_INTERFACE
{
@@ -83,15 +90,15 @@ class IPlaybackController : MODULE_CONTEXT_INTERFACE
bool flushSound = true;
};
- virtual void playElements(const std::vector& elements,
+ virtual void playElements(const std::vector& elements,
const PlayParams& params = PlayParams(), bool isMidi = false) = 0;
- virtual void playNotes(const notation::NoteValList& notes, notation::staff_idx_t staffIdx, const notation::Segment* segment,
+ virtual void playNotes(const engraving::NoteValList& notes, engraving::staff_idx_t staffIdx, const engraving::Segment* segment,
const PlayParams& params = PlayParams()) = 0;
virtual void playMetronome(int tick) = 0;
- virtual void triggerControllers(const muse::mpe::ControllerChangeEventList& list, notation::staff_idx_t staffIdx, int tick) = 0;
+ virtual void triggerControllers(const muse::mpe::ControllerChangeEventList& list, engraving::staff_idx_t staffIdx, int tick) = 0;
- virtual void seekElement(const notation::EngravingItem* element, bool flushSound = true) = 0;
+ virtual void seekElement(const engraving::EngravingItem* element, bool flushSound = true) = 0;
virtual void seekBeat(int measureIndex, int beatIndex, bool flushSound = true) = 0;
virtual bool actionChecked(const muse::actions::ActionCode& actionCode) const = 0;
@@ -103,7 +110,7 @@ class IPlaybackController : MODULE_CONTEXT_INTERFACE
virtual const notation::Tempo& currentTempo() const = 0;
virtual muse::async::Notification currentTempoChanged() const = 0;
- virtual notation::MeasureBeat currentBeat() const = 0;
+ virtual engraving::MeasureBeat currentBeat() const = 0;
virtual muse::audio::secs_t beatToSecs(int measureIndex, int beatIndex) const = 0;
virtual double tempoMultiplier() const = 0;
diff --git a/src/playback/qml/MuseScore/Playback/onlinesoundsstatusmodel.cpp b/src/playback/qml/MuseScore/Playback/onlinesoundsstatusmodel.cpp
index 6cc804597eef4..b1bdb12c713ed 100644
--- a/src/playback/qml/MuseScore/Playback/onlinesoundsstatusmodel.cpp
+++ b/src/playback/qml/MuseScore/Playback/onlinesoundsstatusmodel.cpp
@@ -178,8 +178,8 @@ void OnlineSoundsStatusModel::updateManualProcessingAllowed(bool enableByDefault
setManualProcessingAllowed(enableByDefault);
m_tracksDataChanged = master->playback()->tracksDataChanged();
- m_tracksDataChanged.onReceive(this, [this](const InstrumentTrackIdSet& changedTrackIdSet) {
- for (const InstrumentTrackId& trackId : changedTrackIdSet) {
+ m_tracksDataChanged.onReceive(this, [this](const engraving::InstrumentTrackIdSet& changedTrackIdSet) {
+ for (const engraving::InstrumentTrackId& trackId : changedTrackIdSet) {
if (muse::contains(m_onlineTrackIdSet, trackId)) {
setManualProcessingAllowed(true);
return;
diff --git a/src/playback/qml/MuseScore/Playback/onlinesoundsstatusmodel.h b/src/playback/qml/MuseScore/Playback/onlinesoundsstatusmodel.h
index c08a9a4a6bb88..c4adaea3249f5 100644
--- a/src/playback/qml/MuseScore/Playback/onlinesoundsstatusmodel.h
+++ b/src/playback/qml/MuseScore/Playback/onlinesoundsstatusmodel.h
@@ -90,11 +90,11 @@ class OnlineSoundsStatusModel : public QObject, public muse::async::Asyncable, p
void setManualProcessingAllowed(bool allowed);
void setStatus(Status status);
- notation::InstrumentTrackIdSet m_onlineTrackIdSet;
+ engraving::InstrumentTrackIdSet m_onlineTrackIdSet;
bool m_manualProcessingAllowed = false;
bool m_shouldNotifyToursThatManualProcessingAllowed = true;
Status m_status = Status::Success;
muse::Ret m_ret;
- muse::async::Channel m_tracksDataChanged;
+ muse::async::Channel m_tracksDataChanged;
};
}
diff --git a/src/playback/qml/MuseScore/Playback/playbacktoolbarmodel.cpp b/src/playback/qml/MuseScore/Playback/playbacktoolbarmodel.cpp
index 54906dc12ed19..2c01459664f76 100644
--- a/src/playback/qml/MuseScore/Playback/playbacktoolbarmodel.cpp
+++ b/src/playback/qml/MuseScore/Playback/playbacktoolbarmodel.cpp
@@ -28,7 +28,7 @@
#include "playback/playbackcommands.h"
using namespace mu::playback;
-using namespace mu::notation;
+using namespace mu::engraving;
using namespace muse;
using namespace muse::actions;
using namespace muse::ui;
@@ -345,7 +345,7 @@ QVariant PlaybackToolBarModel::tempo() const
{ DurationType::V_16TH, MusicalSymbolCodes::Code::SEMIQUAVER },
};
- const Tempo& tempo = playbackController()->currentTempo();
+ const notation::Tempo& tempo = playbackController()->currentTempo();
const MusicalSymbolCodes::Code noteIcon = muse::value(DURATION_TO_ICON, tempo.duration,
MusicalSymbolCodes::Code::CROTCHET);
diff --git a/src/playback/qml/MuseScore/Playback/playbacktoolbarmodel.h b/src/playback/qml/MuseScore/Playback/playbacktoolbarmodel.h
index fd2c7a612eca3..87f0fca3455b3 100644
--- a/src/playback/qml/MuseScore/Playback/playbacktoolbarmodel.h
+++ b/src/playback/qml/MuseScore/Playback/playbacktoolbarmodel.h
@@ -100,14 +100,14 @@ public slots:
bool isAdditionalAction(const muse::actions::ActionCode& actionCode) const;
muse::secs_t totalPlayTime() const;
- notation::MeasureBeat measureBeat() const;
+ engraving::MeasureBeat measureBeat() const;
muse::ui::UiAction playAction() const;
void updatePlayPosition(muse::audio::secs_t secs);
void rewind(muse::audio::secs_t secs);
- void rewindToBeat(const notation::MeasureBeat& beat);
+ void rewindToBeat(const engraving::MeasureBeat& beat);
bool m_isToolbarFloating = false;
muse::secs_t m_playbackPositionSecs = 0.0;
diff --git a/src/playback/tests/mocks/playbackcontrollermock.h b/src/playback/tests/mocks/playbackcontrollermock.h
index 37ab357eba273..866202c7dc82d 100644
--- a/src/playback/tests/mocks/playbackcontrollermock.h
+++ b/src/playback/tests/mocks/playbackcontrollermock.h
@@ -61,14 +61,14 @@ class PlaybackControllerMock : public IPlaybackController
MOCK_METHOD(void, setTrackSoloMuteState, (const engraving::InstrumentTrackId&, const SoloMuteState&),
(override));
- MOCK_METHOD(void, playElements, (const std::vector&, const PlayParams&, bool), (override));
- MOCK_METHOD(void, playNotes, (const notation::NoteValList&, notation::staff_idx_t, const notation::Segment*, const PlayParams&),
+ MOCK_METHOD(void, playElements, (const std::vector&, const PlayParams&, bool), (override));
+ MOCK_METHOD(void, playNotes, (const engraving::NoteValList&, engraving::staff_idx_t, const engraving::Segment*, const PlayParams&),
(override));
MOCK_METHOD(void, playMetronome, (int), (override));
- MOCK_METHOD(void, triggerControllers, (const muse::mpe::ControllerChangeEventList&, notation::staff_idx_t, int), (override));
+ MOCK_METHOD(void, triggerControllers, (const muse::mpe::ControllerChangeEventList&, engraving::staff_idx_t, int), (override));
- MOCK_METHOD(void, seekElement, (const notation::EngravingItem*, bool), (override));
+ MOCK_METHOD(void, seekElement, (const engraving::EngravingItem*, bool), (override));
MOCK_METHOD(void, seekBeat, (int, int, bool), (override));
MOCK_METHOD(bool, actionChecked, (const muse::actions::ActionCode&), (const, override));
@@ -80,7 +80,7 @@ class PlaybackControllerMock : public IPlaybackController
MOCK_METHOD(const notation::Tempo&, currentTempo, (), (const, override));
MOCK_METHOD(muse::async::Notification, currentTempoChanged, (), (const, override));
- MOCK_METHOD(notation::MeasureBeat, currentBeat, (), (const, override));
+ MOCK_METHOD(engraving::MeasureBeat, currentBeat, (), (const, override));
MOCK_METHOD(muse::audio::secs_t, beatToSecs, (int, int), (const, override));
MOCK_METHOD(double, tempoMultiplier, (), (const, override));
diff --git a/src/project/CMakeLists.txt b/src/project/CMakeLists.txt
index 1ed94a21bc7b6..40e4cff18fb7f 100644
--- a/src/project/CMakeLists.txt
+++ b/src/project/CMakeLists.txt
@@ -41,6 +41,7 @@ target_sources(project PRIVATE
imscmetareader.h
iprojectautosaver.h
+ types/projectcreateoptions.h
types/projecttypes.h
types/projectmeta.h
diff --git a/src/project/inotationproject.h b/src/project/inotationproject.h
index 5924509d94fd1..c387b5a841a15 100644
--- a/src/project/inotationproject.h
+++ b/src/project/inotationproject.h
@@ -33,6 +33,8 @@
#include "types/projecttypes.h"
namespace mu::project {
+struct ProjectCreateOptions;
+
class INotationProject
{
public:
diff --git a/src/project/internal/notationproject.cpp b/src/project/internal/notationproject.cpp
index 082417e7b11d7..31ed0e81f864a 100644
--- a/src/project/internal/notationproject.cpp
+++ b/src/project/internal/notationproject.cpp
@@ -54,6 +54,7 @@
#include "projectaudiosettings.h"
#include "projectfileinfoprovider.h"
#include "projecterrors.h"
+#include "types/projectcreateoptions.h"
#include "global/concurrency/concurrent.h"
diff --git a/src/project/internal/notationproject.h b/src/project/internal/notationproject.h
index dc24385b1d95b..a2c0823fa61f6 100644
--- a/src/project/internal/notationproject.h
+++ b/src/project/internal/notationproject.h
@@ -19,6 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#pragma once
#include "../inotationproject.h"
diff --git a/src/project/qml/MuseScore/Project/internal/NewScore/newscoremodel.cpp b/src/project/qml/MuseScore/Project/internal/NewScore/newscoremodel.cpp
index fa27d211bf582..851dcc85ffa7b 100644
--- a/src/project/qml/MuseScore/Project/internal/NewScore/newscoremodel.cpp
+++ b/src/project/qml/MuseScore/Project/internal/NewScore/newscoremodel.cpp
@@ -19,10 +19,15 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include "newscoremodel.h"
-#include "ui/view/musicalsymbolcodes.h"
+
#include "log.h"
+#include "ui/view/musicalsymbolcodes.h"
+
+#include "types/projectcreateoptions.h"
+
using namespace mu::project;
using namespace mu::notation;
using namespace muse;
diff --git a/src/project/types/projectcreateoptions.h b/src/project/types/projectcreateoptions.h
new file mode 100644
index 0000000000000..3f6add02b6e41
--- /dev/null
+++ b/src/project/types/projectcreateoptions.h
@@ -0,0 +1,40 @@
+/*
+ * SPDX-License-Identifier: GPL-3.0-only
+ * MuseScore-Studio-CLA-applies
+ *
+ * MuseScore Studio
+ * Music Composition & Notation
+ *
+ * Copyright (C) 2026 MuseScore Limited and others
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 3 as
+ * published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+#pragma once
+
+#include "notation/types/scorecreateoptions.h"
+
+namespace mu::project {
+struct ProjectCreateOptions
+{
+ QString title;
+ QString subtitle;
+ QString composer;
+ QString lyricist;
+ QString copyright;
+
+ muse::io::path_t templatePath;
+
+ notation::ScoreCreateOptions scoreOptions;
+};
+}
diff --git a/src/project/types/projecttypes.h b/src/project/types/projecttypes.h
index 0707e819cdcf8..1264ca9fa6342 100644
--- a/src/project/types/projecttypes.h
+++ b/src/project/types/projecttypes.h
@@ -34,24 +34,10 @@
#include "projectmeta.h"
#include "cloud/cloudtypes.h"
-#include "notation/inotation.h"
-#include "notation/notationtypes.h"
+#include "notation/inotation_fwd.h"
#include "../inotationwriter.h"
namespace mu::project {
-struct ProjectCreateOptions
-{
- QString title;
- QString subtitle;
- QString composer;
- QString lyricist;
- QString copyright;
-
- muse::io::path_t templatePath;
-
- notation::ScoreCreateOptions scoreOptions;
-};
-
struct OpenParams {
OpenParams() {}
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/modelwithvoiceandpositionoptions.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/modelwithvoiceandpositionoptions.cpp
index 12ad70d7d4e58..a8c41e02aa23d 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/modelwithvoiceandpositionoptions.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/modelwithvoiceandpositionoptions.cpp
@@ -19,8 +19,12 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include "modelwithvoiceandpositionoptions.h"
+#include "engraving/dom/part.h"
+#include "engraving/dom/staff.h"
+
using namespace mu::propertiespanel;
using namespace mu::engraving;
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/accidentals/accidentalsettingsmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/accidentals/accidentalsettingsmodel.cpp
index bed8946679c32..99e0bdde47cb0 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/accidentals/accidentalsettingsmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/accidentals/accidentalsettingsmodel.cpp
@@ -19,11 +19,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
-#include "accidentalsettingsmodel.h"
-#include "translation.h"
+#include "accidentalsettingsmodel.h"
#include "engraving/dom/accidental.h"
+#include "engraving/dom/note.h"
+#include "engraving/dom/segment.h"
+
+#include "translation.h"
using namespace mu::propertiespanel;
using namespace mu::engraving;
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/barlines/barlinesettingsmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/barlines/barlinesettingsmodel.cpp
index 773f42d480897..14f26c7593644 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/barlines/barlinesettingsmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/barlines/barlinesettingsmodel.cpp
@@ -19,11 +19,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include "barlinesettingsmodel.h"
#include "translation.h"
#include "engraving/dom/barline.h"
+#include "engraving/dom/staff.h"
#include "notation/inotationundostack.h"
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/bends/bendsettingsmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/bends/bendsettingsmodel.cpp
index 67f2de7b226da..63cb1ebdd27b1 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/bends/bendsettingsmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/bends/bendsettingsmodel.cpp
@@ -19,14 +19,15 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include "bendsettingsmodel.h"
+#include "engraving/dom/guitarbend.h"
+#include "engraving/dom/stafftype.h"
+
#include "translation.h"
#include "types/bendtypes.h"
-#include "engraving/dom/bend.h"
-#include "engraving/dom/guitarbend.h"
-
using namespace mu::engraving;
using namespace mu::propertiespanel;
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/hairpinlinesettingsmodel.h b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/hairpinlinesettingsmodel.h
index 388851d088013..0aab00e8b97e3 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/hairpinlinesettingsmodel.h
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/hairpinlinesettingsmodel.h
@@ -19,10 +19,13 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#pragma once
#include
+#include "engraving/dom/hairpin.h"
+
#include "textlinesettingsmodel.h"
namespace mu::propertiespanel {
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/ottavasettingsmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/ottavasettingsmodel.cpp
index e1dc2fdfd5b9c..ef077fa7317ec 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/ottavasettingsmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/ottavasettingsmodel.cpp
@@ -22,6 +22,8 @@
#include "ottavasettingsmodel.h"
+#include "engraving/dom/ottava.h"
+
#include "translation.h"
#include "ui/view/iconcodes.h"
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/slurandtiesettingsmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/slurandtiesettingsmodel.cpp
index 809682c40eb13..37a59485c232e 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/slurandtiesettingsmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/lines/slurandtiesettingsmodel.cpp
@@ -22,13 +22,13 @@
#include "slurandtiesettingsmodel.h"
-#include "types/linetypes.h"
-#include "types/commontypes.h"
-
+#include "engraving/style/style.h"
#include "engraving/types/types.h"
#include "translation.h"
+#include "types/commontypes.h"
+
using namespace mu::propertiespanel;
using namespace mu::engraving;
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/notes/noteheads/noteheadsettingsmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/notes/noteheads/noteheadsettingsmodel.cpp
index a29899469029a..ad41f23dcb467 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/notes/noteheads/noteheadsettingsmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/notes/noteheads/noteheadsettingsmodel.cpp
@@ -19,8 +19,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include "noteheadsettingsmodel.h"
+#include "engraving/dom/note.h"
+#include "engraving/dom/score.h"
#include "engraving/editing/editparentheses.h"
#include "engraving/editing/transaction/transaction.h"
#include "engraving/types/types.h"
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/notes/stems/stemsettingsmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/notes/stems/stemsettingsmodel.cpp
index a9f91fb9bc192..74e743f0602a8 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/notes/stems/stemsettingsmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/notes/stems/stemsettingsmodel.cpp
@@ -19,9 +19,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include "stemsettingsmodel.h"
#include "engraving/dom/beam.h"
+#include "engraving/dom/stem.h"
#include "translation.h"
#include "log.h"
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/tuplets/tupletsettingsmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/tuplets/tupletsettingsmodel.cpp
index 09e9b62a5257d..bc50c81dc61d3 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/tuplets/tupletsettingsmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/notation/tuplets/tupletsettingsmodel.cpp
@@ -22,10 +22,12 @@
#include "tupletsettingsmodel.h"
-#include "types/commontypes.h"
+#include "engraving/dom/tuplet.h"
#include "translation.h"
+#include "types/commontypes.h"
+
using namespace mu::propertiespanel;
using Icon = muse::ui::IconCode::Code;
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/parts/partssettingsmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/parts/partssettingsmodel.cpp
index 71bcae13b0208..05ed0ca40b876 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/parts/partssettingsmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/parts/partssettingsmodel.cpp
@@ -22,6 +22,8 @@
#include "partssettingsmodel.h"
+#include "engraving/dom/score.h"
+
#include "translation.h"
using namespace mu::propertiespanel;
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/propertiespanellistmodel.h b/src/propertiespanel/qml/MuseScore/PropertiesPanel/propertiespanellistmodel.h
index 2812692c04c67..de1a116be4d54 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/propertiespanellistmodel.h
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/propertiespanellistmodel.h
@@ -29,6 +29,7 @@
#include
#include "engraving/dom/engravingitem.h"
+#include "engraving/dom/select.h"
#include "modularity/ioc.h"
#include "async/asyncable.h"
@@ -74,7 +75,7 @@ class PropertiesPanelListModel : public QAbstractListModel, public QQmlParserSta
bool alwaysUpdateModelList(const QList& selectedElementList);
void setElementList(const QList& selectedElementList,
- notation::SelectionState selectionState = notation::SelectionState::NONE);
+ engraving::SelState selectionState = engraving::SelState::NONE);
void buildModelsForEmptySelection();
void buildModelsForSelectedElements(const ElementKeySet& selectedElementKeySet, bool isRangeSelection,
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/score/scoreappearancesettingsmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/score/scoreappearancesettingsmodel.cpp
index 41c869ab71f53..639fc89b5c8dc 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/score/scoreappearancesettingsmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/score/scoreappearancesettingsmodel.cpp
@@ -19,12 +19,14 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include "scoreappearancesettingsmodel.h"
#include "translation.h"
using namespace mu::propertiespanel;
using namespace mu::notation;
+using namespace mu::engraving;
ScoreAppearanceSettingsModel::ScoreAppearanceSettingsModel(QObject* parent, const muse::modularity::ContextPtr& iocCtx,
IElementRepositoryService* repository)
diff --git a/src/propertiespanel/qml/MuseScore/PropertiesPanel/text/textstylepopup/textstylepopupmodel.cpp b/src/propertiespanel/qml/MuseScore/PropertiesPanel/text/textstylepopup/textstylepopupmodel.cpp
index 452aa2797c6b4..c1d50935927c1 100644
--- a/src/propertiespanel/qml/MuseScore/PropertiesPanel/text/textstylepopup/textstylepopupmodel.cpp
+++ b/src/propertiespanel/qml/MuseScore/PropertiesPanel/text/textstylepopup/textstylepopupmodel.cpp
@@ -47,7 +47,7 @@ void TextStylePopupModel::doInit()
m_textSettingsModel = new TextSettingsModel(this, iocContext(), m_elementRepositoryService.get());
m_textSettingsModel->init();
- m_elementRepositoryService->updateElementList({ m_item }, notation::SelectionState::LIST);
+ m_elementRepositoryService->updateElementList({ m_item }, engraving::SelState::LIST);
}
void TextStylePopupModel::init()
diff --git a/src/stubs/instrumentsscene/selectinstrumentscenariostub.cpp b/src/stubs/instrumentsscene/selectinstrumentscenariostub.cpp
index e997d261f69c9..5fe95e51c2586 100644
--- a/src/stubs/instrumentsscene/selectinstrumentscenariostub.cpp
+++ b/src/stubs/instrumentsscene/selectinstrumentscenariostub.cpp
@@ -19,8 +19,11 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see .
*/
+
#include "selectinstrumentscenariostub.h"
+#include "types/ret.h"
+
using namespace mu::instrumentsscene;
using namespace mu::notation;
using namespace muse;
diff --git a/src/stubs/playback/playbackcontrollerstub.cpp b/src/stubs/playback/playbackcontrollerstub.cpp
index cb1238d7883cc..1a821783daaa1 100644
--- a/src/stubs/playback/playbackcontrollerstub.cpp
+++ b/src/stubs/playback/playbackcontrollerstub.cpp
@@ -113,11 +113,11 @@ void PlaybackControllerStub::setTrackSoloMuteState(const engraving::InstrumentTr
{
}
-void PlaybackControllerStub::playElements(const std::vector&, const PlayParams&, bool)
+void PlaybackControllerStub::playElements(const std::vector&, const PlayParams&, bool)
{
}
-void PlaybackControllerStub::playNotes(const notation::NoteValList&, notation::staff_idx_t, const notation::Segment*,
+void PlaybackControllerStub::playNotes(const engraving::NoteValList&, engraving::staff_idx_t, const engraving::Segment*,
const PlayParams&)
{
}
@@ -126,11 +126,11 @@ void PlaybackControllerStub::playMetronome(int)
{
}
-void PlaybackControllerStub::triggerControllers(const muse::mpe::ControllerChangeEventList&, notation::staff_idx_t, int)
+void PlaybackControllerStub::triggerControllers(const muse::mpe::ControllerChangeEventList&, engraving::staff_idx_t, int)
{
}
-void PlaybackControllerStub::seekElement(const notation::EngravingItem*, bool)
+void PlaybackControllerStub::seekElement(const engraving::EngravingItem*, bool)
{
}
@@ -169,7 +169,7 @@ muse::async::Notification PlaybackControllerStub::currentTempoChanged() const
return {};
}
-mu::notation::MeasureBeat PlaybackControllerStub::currentBeat() const
+mu::engraving::MeasureBeat PlaybackControllerStub::currentBeat() const
{
return {};
}
diff --git a/src/stubs/playback/playbackcontrollerstub.h b/src/stubs/playback/playbackcontrollerstub.h
index 59c3b249eb682..f9f1a6a6640c3 100644
--- a/src/stubs/playback/playbackcontrollerstub.h
+++ b/src/stubs/playback/playbackcontrollerstub.h
@@ -55,15 +55,15 @@ class PlaybackControllerStub : public IPlaybackController
const SoloMuteState& trackSoloMuteState(const engraving::InstrumentTrackId& trackId) const override;
void setTrackSoloMuteState(const engraving::InstrumentTrackId& trackId, const SoloMuteState& state) override;
- void playElements(const std::vector& elements,
+ void playElements(const std::vector& elements,
const PlayParams& params = PlayParams(), bool isMidi = false) override;
- void playNotes(const notation::NoteValList& notes, notation::staff_idx_t staffIdx, const notation::Segment* segment,
+ void playNotes(const engraving::NoteValList& notes, engraving::staff_idx_t staffIdx, const engraving::Segment* segment,
const PlayParams& params = PlayParams()) override;
void playMetronome(int tick) override;
- void triggerControllers(const muse::mpe::ControllerChangeEventList& list, notation::staff_idx_t staffIdx, int tick) override;
+ void triggerControllers(const muse::mpe::ControllerChangeEventList& list, engraving::staff_idx_t staffIdx, int tick) override;
- void seekElement(const notation::EngravingItem* element, bool flushSound = true) override;
+ void seekElement(const engraving::EngravingItem* element, bool flushSound = true) override;
void seekBeat(int measureIndex, int beatIndex, bool flushSound = true) override;
bool actionChecked(const muse::actions::ActionCode& actionCode) const override;
@@ -75,7 +75,7 @@ class PlaybackControllerStub : public IPlaybackController
const notation::Tempo& currentTempo() const override;
muse::async::Notification currentTempoChanged() const override;
- notation::MeasureBeat currentBeat() const override;
+ engraving::MeasureBeat currentBeat() const override;
muse::audio::secs_t beatToSecs(int measureIndex, int beatIndex) const override;
double tempoMultiplier() const override;
diff --git a/src/web/appshell/view/notationstatusbarmodel.h b/src/web/appshell/view/notationstatusbarmodel.h
index 729f71a9a2029..68fe0ead406b0 100644
--- a/src/web/appshell/view/notationstatusbarmodel.h
+++ b/src/web/appshell/view/notationstatusbarmodel.h
@@ -38,8 +38,6 @@
#include "notation/inotationconfiguration.h"
#include "context/iglobalcontext.h"
-#include "notation/notationtypes.h"
-
#include "global/iglobalconfiguration.h"
namespace mu::appshell {
From cad87ce8795a0efb8cf0cc17535b74882b7cedc5 Mon Sep 17 00:00:00 2001
From: Casper Jeukendrup <48658420+cbjeukendrup@users.noreply.github.com>
Date: Wed, 8 Jul 2026 19:58:38 +0200
Subject: [PATCH 2/3] Eliminate more notationtypes.h usages
---
.../AppShell/notationstatusbarmodel.cpp | 2 +
src/braille/internal/notationbraille.h | 12 ++--
src/engraving/dom/mscore.h | 8 ---
src/engraving/dom/realizedharmony.h | 6 +-
src/engraving/dom/score.h | 27 ---------
src/engraving/editing/editnote.h | 5 +-
src/engraving/editing/noteinput.h | 29 +++++++++-
.../devtools/engravingstylemodel.cpp | 1 +
.../systemobjectslayersettingsmodel.cpp | 2 +-
src/notation/CMakeLists.txt | 2 +
src/notation/inotationconfiguration.h | 2 +-
src/notation/inotationinteraction.h | 12 +++-
src/notation/inotationnoteinput.h | 14 ++---
src/notation/inotationstyle.h | 4 +-
src/notation/inotationundostack.h | 5 +-
.../internal/engravingfontscontroller.h | 4 +-
src/notation/internal/excerptnotation.h | 4 ++
src/notation/internal/masternotation.h | 1 +
src/notation/internal/notationaccessibility.h | 12 ++--
src/notation/internal/notationautomation.h | 8 +--
src/notation/internal/notationinteraction.cpp | 3 +-
src/notation/internal/notationinteraction.h | 12 ++--
src/notation/internal/notationplayback.cpp | 3 +-
src/notation/internal/notationplayback.h | 7 ++-
src/notation/internal/notationundostack.cpp | 4 +-
src/notation/internal/notationundostack.h | 4 +-
src/notation/internal/previewmeasure.cpp | 13 +++--
src/notation/notationtypes.h | 37 -------------
.../tests/mocks/notationinteractionmock.h | 2 +-
src/notation/types/noteinputtypes.h | 55 +++++++++++++++++++
src/notation/types/propertystyletypes.h | 33 +++++++++++
.../inotationcommandscontroller.h | 10 ++--
.../internal/notationactioncontroller.cpp | 12 ++--
.../internal/notationactioncontroller.h | 13 +++--
.../internal/notationcommandsstate.cpp | 11 ++--
.../abstractelementpopupmodel.cpp | 5 +-
.../MuseScore/NotationScene/loopmarker.cpp | 1 +
.../qml/MuseScore/NotationScene/loopmarker.h | 11 ++--
.../notationcontextmenumodel.cpp | 1 +
.../NotationScene/notationcontextmenumodel.h | 7 +--
.../MuseScore/NotationScene/notationruler.cpp | 13 +++--
.../MuseScore/NotationScene/notationruler.h | 2 +-
.../notationviewinputcontroller.cpp | 2 +
.../pianokeyboard/pianokeyboardcontroller.h | 6 +-
.../MuseScore/NotationScene/playbackcursor.h | 10 ++--
.../styledialog/abstractstyledialogmodel.h | 2 +-
.../styledialog/chordsymbolspagemodel.cpp | 22 ++++----
src/notationscene/widgets/editstafftype.h | 4 ++
src/notationscene/widgets/exampleview.cpp | 1 +
src/notationscene/widgets/exampleview.h | 7 ++-
.../widgets/realizeharmonydialog.cpp | 16 +++---
src/notationscene/widgets/tupletdialog.cpp | 3 +
src/notationscene/widgets/tupletdialog.h | 9 ++-
src/palette/widgets/notegroupsexampleview.cpp | 9 +--
.../notationregionsbeingprocessedmodel.cpp | 6 +-
src/project/internal/notationproject.cpp | 2 +
.../appearance/appearancesettingsmodel.cpp | 3 +
.../barlines/barlinesettingsmodel.cpp | 1 +
.../chordsymbols/chordsymbolsettingsmodel.cpp | 2 +
.../fretdiagrams/internal/fretcanvas.cpp | 3 +
60 files changed, 317 insertions(+), 210 deletions(-)
create mode 100644 src/notation/types/noteinputtypes.h
create mode 100644 src/notation/types/propertystyletypes.h
diff --git a/src/appshell/qml/MuseScore/AppShell/notationstatusbarmodel.cpp b/src/appshell/qml/MuseScore/AppShell/notationstatusbarmodel.cpp
index 964448f820e63..052817f928f2f 100644
--- a/src/appshell/qml/MuseScore/AppShell/notationstatusbarmodel.cpp
+++ b/src/appshell/qml/MuseScore/AppShell/notationstatusbarmodel.cpp
@@ -32,6 +32,8 @@
#include "workspace/qml/Muse/Workspace/workspacesmenumodel.h"
#endif
+#include "engraving/dom/score.h"
+
#include "notation/inotationaccessibility.h"
#include "notation/inotationstyle.h" // IWYU pragma: keep
#include "notation/inotationundostack.h" // IWYU pragma: keep
diff --git a/src/braille/internal/notationbraille.h b/src/braille/internal/notationbraille.h
index 623b83572d7cd..a88a2f6a5fd0e 100644
--- a/src/braille/internal/notationbraille.h
+++ b/src/braille/internal/notationbraille.h
@@ -20,8 +20,7 @@
* along with this program. If not, see .
*/
-#ifndef MU_BRAILLE_NOTATIONBRAILLE_H
-#define MU_BRAILLE_NOTATIONBRAILLE_H
+#pragma once
#include "accessibility/iaccessibilitycontroller.h"
#include "async/asyncable.h"
@@ -31,7 +30,7 @@
#include "ibrailleconfiguration.h"
#include "inotationbraille.h"
#include "modularity/ioc.h"
-#include "notation/notationtypes.h"
+#include "notation/types/noteinputtypes.h"
#include "playback/iplaybackcontroller.h"
#include "actions/iactionsdispatcher.h"
@@ -41,6 +40,7 @@
namespace mu::engraving {
class Score;
class Selection;
+class TDuration;
class NotationBraille : public mu::braille::INotationBraille, public muse::Contextable, public muse::async::Asyncable
{
@@ -69,8 +69,8 @@ class NotationBraille : public mu::braille::INotationBraille, public muse::Conte
bool incDuration();
bool decDuration();
bool setArticulation();
- void setInputNoteDuration(notation::Duration d);
- void setTupletDuration(int tuplet, notation::Duration d);
+ void setInputNoteDuration(engraving::TDuration d);
+ void setTupletDuration(int tuplet, engraving::TDuration d);
muse::ValCh brailleInfo() const override;
muse::ValCh cursorPosition() const override;
@@ -138,5 +138,3 @@ class NotationBraille : public mu::braille::INotationBraille, public muse::Conte
muse::async::Notification m_selectionChanged;
};
}
-
-#endif // MU_BRAILLE_NOTATIONBRAILLE_H
diff --git a/src/engraving/dom/mscore.h b/src/engraving/dom/mscore.h
index 4c69dca7ae52f..6ae45b4e9d309 100644
--- a/src/engraving/dom/mscore.h
+++ b/src/engraving/dom/mscore.h
@@ -107,14 +107,6 @@ enum class SelectType : char {
SINGLE, RANGE, ADD, REPLACE
};
-//---------------------------------------------------------
-// UpDownMode
-//---------------------------------------------------------
-
-enum class UpDownMode : char {
- CHROMATIC, OCTAVE, DIATONIC
-};
-
//---------------------------------------------------------
// OffsetType
//---------------------------------------------------------
diff --git a/src/engraving/dom/realizedharmony.h b/src/engraving/dom/realizedharmony.h
index 399a26574810f..3e5be03f41172 100644
--- a/src/engraving/dom/realizedharmony.h
+++ b/src/engraving/dom/realizedharmony.h
@@ -20,12 +20,10 @@
* along with this program. If not, see .
*/
-#ifndef MU_ENGRAVING_REALIZEDHARMONY_H
-#define MU_ENGRAVING_REALIZEDHARMONY_H
+#pragma once
#include