score
Home
Classes
Namespaces
Files
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
10
namespace
Midi
11
{
12
class
ProcessModel;
13
14
class
RemoveNotes
final :
public
score::Command
15
{
16
SCORE_COMMAND_DECL(Midi::CommandFactoryName(),
RemoveNotes
,
"Remove notes"
)
17
public
:
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
23
protected
:
24
void
serializeImpl(
DataStreamInput
& s)
const override
;
25
void
deserializeImpl(
DataStreamOutput
& s)
override
;
26
27
private
:
28
Path<ProcessModel>
m_model;
29
std::vector<std::pair<Id<Note>,
NoteData
>> m_notes;
30
};
31
}
Midi::ProcessModel
Definition:
MidiProcess.hpp:15
Midi::RemoveNotes
Definition:
RemoveNotes.hpp:15
Path< ProcessModel >
id_base_t
The id_base_t class.
Definition:
Identifier.hpp:57
score::Command
The Command class.
Definition:
Command.hpp:34
DataStreamInput
Definition:
DataStreamHelpers.hpp:99
DataStreamOutput
Definition:
DataStreamHelpers.hpp:103
Midi::NoteData
Definition:
MidiNote.hpp:11
score::DocumentContext
Definition:
DocumentContext.hpp:18