ScenarioPalette.hpp
1 #pragma once
2 #include <Process/ProcessContext.hpp>
3 #include <Process/Tools/ToolPalette.hpp>
4 
5 #include <Scenario/Palette/ScenarioPoint.hpp>
6 #include <Scenario/Palette/Tool.hpp>
7 #include <Scenario/Palette/Tools/CreationToolState.hpp>
8 #include <Scenario/Palette/Tools/PlayToolState.hpp>
9 #include <Scenario/Palette/Tools/SmartTool.hpp>
10 
11 #include <score/statemachine/GraphicsSceneToolPalette.hpp>
12 
13 #include <QPoint>
14 
15 namespace score
16 {
17 class CommandStack;
18 class ObjectLocker;
19 }
20 
21 namespace Process
22 {
23 class MagnetismAdjuster;
24 }
25 
26 namespace Scenario
27 {
28 class EditionSettings;
29 class ScenarioPresenter;
30 class ScenarioView;
31 class MoveIntervalInScenario_StateWrapper;
32 class MoveLeftBraceInScenario_StateWrapper;
33 class MoveRightBraceInScenario_StateWrapper;
34 class MoveEventInScenario_StateWrapper;
35 class MoveTimeSyncInScenario_StateWrapper;
36 class ProcessModel;
38 {
39 public:
41 
42  ScenarioPresenter& presenter() const { return m_presenter; }
43  Scenario::EditionSettings& editionSettings() const;
44 
45  const Process::LayerContext& context() const { return m_context; }
46  Process::MagnetismAdjuster& magnetic() const { return m_magnetic; }
47 
48  const Scenario::ProcessModel& model() const { return m_model; }
49 
50  void on_pressed(QPointF);
51  void on_moved(QPointF);
52  void on_released(QPointF);
53  void on_cancel();
54 
55  void activate(Scenario::Tool);
56  void desactivate(Scenario::Tool);
57 
58  QGraphicsItem* itemAt(
59  const Scenario::Point&, const std::vector<QGraphicsItem*>& ignore) const noexcept;
60 
61 private:
62  Scenario::Point ScenePointToScenarioPoint(QPointF point);
63 
64  ScenarioPresenter& m_presenter;
65  const Scenario::ProcessModel& m_model;
66  Process::LayerContext& m_context;
67  Process::MagnetismAdjuster& m_magnetic;
68 
70  SmartTool<
77  m_selectTool;
78 
79  PlayToolState m_playTool;
80 
83  m_inputDisp;
84 };
85 }
Definition: GraphicsSceneToolPalette.hpp:10
Definition: LayerView.hpp:21
Definition: MagnetismAdjuster.hpp:24
Definition: CreationToolState.hpp:29
Definition: ScenarioEditionSettings.hpp:14
Definition: ScenarioMoveStatesWrapper.hpp:71
Definition: ScenarioMoveStatesWrapper.hpp:18
Definition: ScenarioMoveStatesWrapper.hpp:37
Definition: ScenarioMoveStatesWrapper.hpp:54
Definition: ScenarioMoveStatesWrapper.hpp:94
Definition: PlayToolState.hpp:12
The core hierarchical and temporal process of score.
Definition: ScenarioModel.hpp:37
Definition: ScenarioPresenter.hpp:29
Definition: ScenarioView.hpp:27
Definition: score-plugin-scenario/Scenario/Palette/Tools/SmartTool.hpp:24
Definition: ScenarioPalette.hpp:38
Definition: ToolPalette.hpp:14
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:14
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: ProcessContext.hpp:21
Definition: ScenarioPoint.hpp:13