Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletions src/appshell/qml/MuseScore/AppShell/notationpagemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,27 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#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/score.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)
Expand Down Expand Up @@ -253,10 +258,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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/appshell/qml/MuseScore/AppShell/notationstatusbarmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
22 changes: 11 additions & 11 deletions src/braille/internal/brailleinput.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef MU_BRAILLE_BRAILLEINPUT_H
#define MU_BRAILLE_BRAILLEINPUT_H
#pragma once

#include "engraving/dom/accidental.h"

#include "notation/notationtypes.h"

Expand Down Expand Up @@ -68,7 +69,7 @@ class BrailleInputState
bool isDurationMatch();
DurationType getCloseDuration();

notation::SymbolId articulation();
engraving::SymId articulation();
int octave();
int dots();
int addedOctave();
Expand All @@ -83,7 +84,7 @@ class BrailleInputState
void setNoteName(const notation::NoteName notename, const bool chord_base = true);
void setCurrentDuration(const DurationType duration);
void setNoteDurations(const std::vector<DurationType> durations);
void setArticulation(const notation::SymbolId articulation);
void setArticulation(const engraving::SymId articulation);
void setOctave(const int octave, const bool chord_base = false);
void setDots(const int dots);
void setAddedOctave(const int octave);
Expand Down Expand Up @@ -116,16 +117,16 @@ class BrailleInputState

int tupletNumber();
void setTupletNumber(const int num);
notation::Duration tupletDuration();
void setTupletDuration(const notation::Duration d);
engraving::TDuration tupletDuration();
void setTupletDuration(const engraving::TDuration d);
void clearTuplet();
bool tupletIndicator();
void setTupletIndicator(bool val);
private:
AccidentalType _accidental = AccidentalType::NONE;
engraving::AccidentalType _accidental = engraving::AccidentalType::NONE;
notation::NoteName _note_name = notation::NoteName::C;
notation::NoteName _chordbase_note_name = notation::NoteName::C;
notation::SymbolId _articulation = notation::SymbolId::noSym;
engraving::SymId _articulation = engraving::SymId::noSym;
int _octave = 4;
int _chordbase_note_octave = 4;
int _added_octave = -1;
Expand All @@ -149,7 +150,7 @@ class BrailleInputState

bool _accord;
int _tuplet_number = -1;
notation::Duration _tuplet_duration;
engraving::TDuration _tuplet_duration;
bool _tuplet_indicator = false;
};

Expand All @@ -162,9 +163,8 @@ int getInterval(const braille_code* code);
bool isNoteName(const braille_code* code);
QString fromNoteName(notation::NoteName);
AccidentalType getAccidentalType(const braille_code* code);
notation::SymbolId getArticulation(const braille_code* code);
engraving::SymId getArticulation(const braille_code* code);
int getOctave(const braille_code* code);
int getOctaveDiff(notation::NoteName source, notation::NoteName note);
std::pair<notation::NoteName, int> applyInterval(notation::NoteName source, int interval, IntervalDirection direction);
}
#endif // MU_BRAILLE_BRAILLEINPUT_H
2 changes: 2 additions & 0 deletions src/braille/internal/notationbraille.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@

#include "engraving/dom/factory.h"
#include "engraving/dom/measure.h"
#include "engraving/dom/score.h"
#include "engraving/dom/segment.h"
#include "engraving/dom/select.h"
#include "engraving/dom/slur.h"
#include "engraving/dom/staff.h"
#include "engraving/dom/tie.h"
Expand Down
12 changes: 5 additions & 7 deletions src/braille/internal/notationbraille.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef MU_BRAILLE_NOTATIONBRAILLE_H
#define MU_BRAILLE_NOTATIONBRAILLE_H
#pragma once

#include "accessibility/iaccessibilitycontroller.h"
#include "async/asyncable.h"
Expand All @@ -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"

Expand All @@ -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
{
Expand Down Expand Up @@ -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<std::string> brailleInfo() const override;
muse::ValCh<int> cursorPosition() const override;
Expand Down Expand Up @@ -138,5 +138,3 @@ class NotationBraille : public mu::braille::INotationBraille, public muse::Conte
muse::async::Notification m_selectionChanged;
};
}

#endif // MU_BRAILLE_NOTATIONBRAILLE_H
1 change: 1 addition & 0 deletions src/converter/internal/compat/backendapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

#include "engraving/infrastructure/mscwriter.h"
#include "engraving/dom/excerpt.h"
#include "engraving/dom/score.h"
#include "engraving/rw/mscsaver.h"
#include "engraving/types/typesconv.h"

Expand Down
2 changes: 2 additions & 0 deletions src/converter/internal/compat/notationmeta.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@
#include "audio/common/audioutils.h"
#include "audio/common/audiotypes.h"

#include "engraving/dom/part.h"
#include "engraving/dom/score.h"
#include "engraving/dom/tempotext.h"
#include "engraving/dom/text.h"

Expand Down
1 change: 1 addition & 0 deletions src/converter/internal/convertercontroller.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
3 changes: 3 additions & 0 deletions src/engraving/api/v1/score.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
8 changes: 0 additions & 8 deletions src/engraving/dom/mscore.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,6 @@ enum class SelectType : char {
SINGLE, RANGE, ADD, REPLACE
};

//---------------------------------------------------------
// UpDownMode
//---------------------------------------------------------

enum class UpDownMode : char {
CHROMATIC, OCTAVE, DIATONIC
};

//---------------------------------------------------------
// OffsetType
//---------------------------------------------------------
Expand Down
6 changes: 1 addition & 5 deletions src/engraving/dom/realizedharmony.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#ifndef MU_ENGRAVING_REALIZEDHARMONY_H
#define MU_ENGRAVING_REALIZEDHARMONY_H
#pragma once

#include <map>

#include "containers.h"
#include "../types/fraction.h"

namespace mu::engraving {
Expand Down Expand Up @@ -105,5 +103,3 @@ class RealizedHarmony
bool m_literal = false; //use all notes when possible and do not add any notes
};
}

#endif // __REALIZEDHARMONY_H__
27 changes: 0 additions & 27 deletions src/engraving/dom/score.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,28 +170,6 @@ enum class LoopBoundaryType : signed char {
LoopOut = 1
};

enum class Pad : char {
NOTE00,
NOTE0,
NOTE1,
NOTE2,
NOTE4,
NOTE8,
NOTE16,
NOTE32,
NOTE64,
NOTE128,
NOTE256,
NOTE512,
NOTE1024,
//--------------------
REST,
DOT,
DOT2,
DOT3,
DOT4
};

struct Position {
Segment* segment = nullptr;
staff_idx_t staffIdx = muse::nidx;
Expand All @@ -201,11 +179,6 @@ struct Position {
bool beyondScore = false;
};

struct NoteInputParams {
int step = 0;
int drumPitch = -1;
};

struct ShowAnchors {
ShowAnchors() = default;
ShowAnchors(voice_idx_t vIdx, staff_idx_t stfIdx, const Fraction& sTickMain, const Fraction& eTickMain,
Expand Down
5 changes: 4 additions & 1 deletion src/engraving/editing/editnote.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,15 @@
namespace mu::engraving {
enum class SymId;
enum class AccidentalType : unsigned char;
enum class UpDownMode : char;
enum class Key : signed char;
class Score;
class EngravingItem;
class Articulation;

enum class UpDownMode : char {
CHROMATIC, OCTAVE, DIATONIC
};

class EditNote
{
public:
Expand Down
29 changes: 27 additions & 2 deletions src/engraving/editing/noteinput.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,39 @@ class Score;
class Segment;
class Transaction;

struct NoteInputParams;
struct NoteVal;
struct Position;

enum class AccidentalType : unsigned char;
enum class Pad : char;
enum class SymId;

struct NoteInputParams {
int step = 0;
int drumPitch = -1;
};

enum class Pad : char {
NOTE00,
NOTE0,
NOTE1,
NOTE2,
NOTE4,
NOTE8,
NOTE16,
NOTE32,
NOTE64,
NOTE128,
NOTE256,
NOTE512,
NOTE1024,
//--------------------
REST,
DOT,
DOT2,
DOT3,
DOT4
};

class NoteInput
{
public:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@

#include "global/types/string.h"

#include "engraving/style/style.h"
#include "engraving/style/styledef.h"

#include "log.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/

#pragma once

#include <QAbstractListModel>
Expand All @@ -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
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

#include "notation/inotation.h"

#include "engraving/dom/score.h"
#include "engraving/editing/transaction/undoablecommand.h"
#include "engraving/editing/transaction/undostack.h"

Expand Down
Loading
Loading