Loading...
Searching...
No Matches
score-lib-process/Process/Commands/Properties.hpp
1#pragma once
2#include <Process/Commands/ProcessCommandFactory.hpp>
3#include <Process/Process.hpp>
4#include <Process/TimeValueSerialization.hpp>
5
6#include <score/command/PropertyCommand.hpp>
7#include <score/model/path/PathSerialization.hpp>
8#include <score/tools/Unused.hpp>
9
10PROPERTY_COMMAND_T(Process, SetLoop, ProcessModel::p_loops, "Set process looping")
11SCORE_COMMAND_DECL_T(Process::SetLoop)
12PROPERTY_COMMAND_T(
13 Process, SetStartOffset, ProcessModel::p_startOffset, "Set start offset")
14SCORE_COMMAND_DECL_T(Process::SetStartOffset)
15PROPERTY_COMMAND_T(
16 Process, SetLoopDuration, ProcessModel::p_loopDuration, "Set loop duration")
17SCORE_COMMAND_DECL_T(Process::SetLoopDuration)
18
19PROPERTY_COMMAND_T(Process, MoveNode, ProcessModel::p_position, "Move node")
20SCORE_COMMAND_DECL_T(Process::MoveNode)
21PROPERTY_COMMAND_T(Process, ResizeNode, ProcessModel::p_size, "Resize node")
22SCORE_COMMAND_DECL_T(Process::ResizeNode)
23
24namespace Process
25{
26class MoveNodes final : public score::Command
27{
28 SCORE_COMMAND_DECL(Process::CommandFactoryName(), MoveNodes, "Move nodes")
29public:
30 MoveNodes(std::vector<const ProcessModel*> processes, QPointF delta);
31
32 void undo(const score::DocumentContext& ctx) const override;
33 void redo(const score::DocumentContext& ctx) const override;
34
35 void update(unused_t, QPointF delta);
36
37protected:
38 void serializeImpl(DataStreamInput& s) const override;
39 void deserializeImpl(DataStreamOutput& s) override;
40
41private:
42 std::vector<std::pair<Path<ProcessModel>, QPointF>> m_models;
43 QPointF m_delta;
44};
45
46}
Definition score-lib-process/Process/Commands/Properties.hpp:27
The Command class.
Definition Command.hpp:34
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition DocumentContext.hpp:18
Definition Unused.hpp:3