Loading...
Searching...
No Matches
InsertContentInInterval.hpp
1#pragma once
2#include <Process/Dataflow/Cable.hpp>
3#include <Process/ExpandMode.hpp>
4
5#include <Scenario/Application/Menus/ScenarioCopy.hpp>
6#include <Scenario/Commands/ScenarioCommandFactory.hpp>
7#include <Scenario/Document/Interval/Slot.hpp>
8
9#include <score/command/Command.hpp>
10#include <score/model/Identifier.hpp>
11#include <score/model/path/Path.hpp>
12#include <score/tools/std/HashMap.hpp>
13
14#include <ossia/detail/json.hpp>
15
16#include <QPointF>
17
18struct DataStreamInput;
19struct DataStreamOutput;
20namespace Process
21{
22class ProcessModel;
23}
24namespace Scenario
25{
26class IntervalModel;
27
28namespace Command
29{
30class SCORE_PLUGIN_SCENARIO_EXPORT PasteProcessesInInterval final : public score::Command
31{
32 SCORE_COMMAND_DECL(
33 CommandFactoryName(), PasteProcessesInInterval, "Paste processes in a interval")
34public:
36 rapidjson::Value::Array sourceProcesses, rapidjson::Value::Array sourceCables,
37 const IntervalModel& targetInterval, ExpandMode mode, QPointF origin);
38
39 void undo(const score::DocumentContext& ctx) const override;
40 void redo(const score::DocumentContext& ctx) const override;
41
42protected:
43 void serializeImpl(DataStreamInput&) const override;
44 void deserializeImpl(DataStreamOutput&) override;
45
46private:
47 Path<IntervalModel> m_target;
48 ExpandMode m_mode{ExpandMode::GrowShrink};
49 QPointF m_origin{};
50
51 std::vector<Id<Process::ProcessModel>> m_ids_processes;
52 std::vector<QByteArray> m_json_processes;
53
54 Rack m_oldRack;
55 FullRack m_oldFullRack;
56
57 CopiedCables m_cables;
58};
59}
60}
The Path class is a typesafe wrapper around ObjectPath.
Definition Path.hpp:52
Definition InsertContentInInterval.hpp:31
Definition IntervalModel.hpp:50
The Command class.
Definition Command.hpp:34
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
Main plug-in of score.
Definition score-plugin-dataflow/Dataflow/PortItem.hpp:13
Definition DataStreamHelpers.hpp:99
Definition DataStreamHelpers.hpp:103
Definition ScenarioCopy.hpp:87
Definition DocumentContext.hpp:18