2 #include <Media/Commands/MediaCommandFactory.hpp>
3 #include <Media/Step/Model.hpp>
5 #include <score/command/Command.hpp>
6 #include <score/command/PropertyCommand.hpp>
7 #include <score/model/path/Path.hpp>
8 #include <score/model/path/PathSerialization.hpp>
10 #include <ossia/detail/pod_vector.hpp>
16 SCORE_COMMAND_DECL(Media::CommandFactoryName(),
ChangeSteps,
"Change steps")
20 , m_old{model.steps()}
27 m_model.find(ctx).setSteps(m_old);
32 m_model.find(ctx).setSteps(m_new);
37 m_new = std::move(cur);
42 s << m_model << m_old << m_new;
45 void deserializeImpl(
DataStreamOutput& s)
override { s >> m_model >> m_old >> m_new; }
49 ossia::float_vector m_old, m_new;
54 SCORE_COMMAND_DECL(Media::CommandFactoryName(),
SetStepCount,
"Set step count")
63 SCORE_COMMAND_DECL(Media::CommandFactoryName(),
SetStepDuration,
"Set step duration")
67 std::move(path),
"stepDuration", QVariant::fromValue(newval)}
74 SCORE_COMMAND_DECL(Media::CommandFactoryName(),
SetMin,
"Set min")
84 SCORE_COMMAND_DECL(Media::CommandFactoryName(),
SetMax,
"Set max")
The Command class.
Definition: Command.hpp:34
The PropertyCommand class.
Definition: PropertyCommand.hpp:21
Definition: DataStreamHelpers.hpp:103
Definition: DocumentContext.hpp:18