Encapsulate.hpp
1 #pragma once
2 #include <Scenario/Application/Menus/ScenarioCopy.hpp>
3 #include <Scenario/Commands/ScenarioCommandFactory.hpp>
4 
5 #include <score/command/AggregateCommand.hpp>
6 
7 #include <QObject>
8 namespace score
9 {
10 class CommandStackFacade;
11 }
12 namespace Scenario
13 {
14 namespace Command
15 {
16 class Macro;
17 }
18 class IntervalModel;
19 namespace Command
20 {
21 class SCORE_PLUGIN_SCENARIO_EXPORT Encapsulate final : public score::AggregateCommand
22 {
23  SCORE_COMMAND_DECL(CommandFactoryName(), Encapsulate, "Encapsulate")
24 };
25 class SCORE_PLUGIN_SCENARIO_EXPORT Decapsulate final : public score::AggregateCommand
26 {
27  SCORE_COMMAND_DECL(CommandFactoryName(), Decapsulate, "Decapsulate")
28 };
29 }
30 
31 struct EncapsData
32 {
33  double topY{}, bottomY{};
34  IntervalModel* interval{};
35 };
36 
37 SCORE_PLUGIN_SCENARIO_EXPORT
38 EncapsData EncapsulateElements(
40  const ProcessModel& scenar);
41 
42 // Encapsulate the selected elements of scenar in a new sub-scenario
43 void EncapsulateInScenario(
44  const ProcessModel& scenar, const score::CommandStackFacade& stack);
45 
46 // Decpasulate a sub-scenar passed in argument in its parent scenario if
47 // possible
48 void DecapsulateScenario(
49  const ProcessModel& scenar, const score::CommandStackFacade& stack);
50 
51 void Duplicate(const ProcessModel& scenar, const score::CommandStackFacade& stack);
52 }
Definition: Encapsulate.hpp:26
Definition: Encapsulate.hpp:22
Definition: CommandAPI.hpp:28
Definition: IntervalModel.hpp:50
The core hierarchical and temporal process of score.
Definition: ScenarioModel.hpp:37
Allows for grouping of multiple commands in a single one.
Definition: AggregateCommand.hpp:15
A small abstraction layer over the score::CommandStack.
Definition: CommandStackFacade.hpp:20
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: ScenarioCopy.hpp:37
Definition: Encapsulate.hpp:32