ScenarioDisplayedElementsToolPalette.hpp
1 #pragma once
2 #include <Process/Tools/ToolPalette.hpp>
3 
4 #include <Scenario/Document/BaseScenario/BaseElementContext.hpp>
5 #include <Scenario/Palette/ScenarioPoint.hpp>
6 #include <Scenario/Palette/Tool.hpp>
7 #include <Scenario/Palette/Tools/SmartTool.hpp>
8 
9 #include <score/document/DocumentContext.hpp>
10 #include <score/statemachine/GraphicsSceneToolPalette.hpp>
11 
12 #include <QPoint>
13 
14 class BaseGraphicsObject;
15 
16 namespace Process
17 {
18 class MagnetismAdjuster;
19 }
20 
21 namespace Scenario
22 {
23 class EditionSettings;
24 class DoNotMoveInterval_StateWrapper;
25 class MoveLeftBraceInScenario_StateWrapper;
26 class MoveRightBraceInScenario_StateWrapper;
27 class MoveEventInTopScenario_StateWrapper;
28 class MoveTimeSyncInTopScenario_StateWrapper;
29 class ProcessModel;
30 class DisplayedElementsModel;
31 class DisplayedElementsPresenter;
32 class ScenarioDocumentPresenter;
33 
35 {
36 public:
39  ScenarioDocumentPresenter&, QGraphicsItem*);
40 
41  QGraphicsItem& view() const;
42  DisplayedElementsPresenter& presenter() const;
43  const Scenario::ProcessModel& model() const;
44  const BaseElementContext& context() const;
45  Process::MagnetismAdjuster& magnetic() const { return m_magnetic; }
46  const Scenario::EditionSettings& editionSettings() const;
47 
48  void activate(Scenario::Tool);
49  void desactivate(Scenario::Tool);
50 
51  void on_pressed(QPointF);
52  void on_moved(QPointF);
53  void on_released(QPointF);
54  void on_cancel();
55 
56 private:
57  Scenario::Point ScenePointToScenarioPoint(QPointF point);
58  const DisplayedElementsModel& m_model;
59  DisplayedElementsPresenter& m_presenters;
60  const Scenario::ProcessModel& m_scenarioModel;
61  ScenarioDocumentPresenter& m_presenter;
62  BaseElementContext m_context;
63  Process::MagnetismAdjuster& m_magnetic;
64  QGraphicsItem& m_view;
65  const Scenario::EditionSettings& m_editionSettings;
66 
74  m_state;
75 
79  m_inputDisp;
80 };
81 }
Definition: GraphicsProxyObject.hpp:8
Definition: GraphicsSceneToolPalette.hpp:10
Definition: MagnetismAdjuster.hpp:24
Definition: BaseElementContext.hpp:10
Definition: DisplayedElementsModel.hpp:16
Definition: DisplayedElementsPresenter.hpp:25
Definition: BaseScenarioDisplayedElements_StateWrappers.hpp:15
Definition: ScenarioEditionSettings.hpp:14
Definition: ScenarioMoveStatesWrapper.hpp:115
Definition: ScenarioMoveStatesWrapper.hpp:37
Definition: ScenarioMoveStatesWrapper.hpp:54
Definition: ScenarioMoveStatesWrapper.hpp:138
The core hierarchical and temporal process of score.
Definition: ScenarioModel.hpp:37
Definition: ScenarioDisplayedElementsToolPalette.hpp:35
The ScenarioDocumentPresenter class.
Definition: ScenarioDocumentPresenter.hpp:58
Definition: score-plugin-scenario/Scenario/Palette/Tools/SmartTool.hpp:24
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
Definition: ScenarioPoint.hpp:13