Loading...
Searching...
No Matches
RemoveNotes.hpp
1#pragma once
2#include <Midi/Commands/CommandFactory.hpp>
3#include <Midi/MidiNote.hpp>
4
5#include <score/model/path/Path.hpp>
6
7#include <QPair>
8#include <QVector>
9
10namespace Midi
11{
12class ProcessModel;
13
14class RemoveNotes final : public score::Command
15{
16 SCORE_COMMAND_DECL(Midi::CommandFactoryName(), RemoveNotes, "Remove notes")
17public:
18 RemoveNotes(const ProcessModel& model, const std::vector<Id<Note>>& to_move);
19
20 void undo(const score::DocumentContext& ctx) const override;
21 void redo(const score::DocumentContext& ctx) const override;
22
23protected:
24 void serializeImpl(DataStreamInput& s) const override;
25 void deserializeImpl(DataStreamOutput& s) override;
26
27private:
28 Path<ProcessModel> m_model;
29 std::vector<std::pair<Id<Note>, NoteData>> m_notes;
30};
31}
Definition MidiProcess.hpp:15
Definition RemoveNotes.hpp:15
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
The id_base_t class.
Definition Identifier.hpp:57
The Command class.
Definition Command.hpp:34
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition MidiNote.hpp:11
Definition DocumentContext.hpp:18