Loading...
Searching...
No Matches
ScenarioCopy.hpp
1#pragma once
2#include <Process/Dataflow/Cable.hpp>
3
4#include <score/serialization/JSONVisitor.hpp>
5
6#include <ossia/detail/flat_map.hpp>
7
8#include <score_plugin_scenario_export.h>
9
10#include <vector>
11
12class QJsonObject;
13class QObject;
14class Selection;
15namespace score
16{
17struct DocumentContext;
18}
19namespace Process
20{
21class ProcessModel;
22}
23
24namespace Scenario
25{
26class IntervalModel;
27class ProcessModel;
28class EventModel;
29class StateModel;
30class TimeSyncModel;
31
32class ScenarioInterface;
33class BaseScenario;
34class BaseScenarioContainer;
35
36struct SCORE_PLUGIN_SCENARIO_EXPORT CategorisedScenario
37{
43
44 std::vector<const IntervalModel*> selectedIntervals;
45 std::vector<const EventModel*> selectedEvents;
46 std::vector<const StateModel*> selectedStates;
47 std::vector<const TimeSyncModel*> selectedTimeSyncs;
48};
49
50void copyBaseInterval(JSONReader&, const IntervalModel&);
51
52SCORE_PLUGIN_SCENARIO_EXPORT
53void copySelectedScenarioElements(JSONReader&, const Scenario::ProcessModel& sm);
54
55SCORE_PLUGIN_SCENARIO_EXPORT
56void copyWholeScenario(JSONReader&, const Scenario::ProcessModel& sm);
57
58SCORE_PLUGIN_SCENARIO_EXPORT
59void copySelectedScenarioElements(
61
75// QJsonObject copySelectedScenarioElements(
76// const BaseScenario& sm,
77// QObject* parent);
78void copySelectedScenarioElements(
79 JSONReader&, const BaseScenarioContainer& sm, QObject* parent);
80
81bool copySelectedProcesses(JSONReader&, const score::DocumentContext& ctx);
82
83void copySelectedElementsToJson(
85
87{
88 ossia::flat_map<Id<Process::Cable>, Process::CableData> cables;
89
90 void undo(const score::DocumentContext& ctx) const;
91 void redo(const score::DocumentContext& ctx) const;
92};
93}
Definition JSONVisitor.hpp:52
Definition BaseScenarioContainer.hpp:26
Definition IntervalModel.hpp:50
The core hierarchical and temporal process of score.
Definition ScenarioModel.hpp:37
Definition ScenarioInterface.hpp:20
Definition Selection.hpp:12
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
Base toolkit upon which the software is built.
Definition Application.cpp:90
Definition CableData.hpp:18
Definition ScenarioCopy.hpp:37
Definition ScenarioCopy.hpp:87
Definition DocumentContext.hpp:18