DisplayedElementsPresenter.hpp
1 #pragma once
2 #include <Process/LayerPresenter.hpp>
3 #include <Process/TimeValue.hpp>
4 #include <Process/ZoomHelper.hpp>
5 
6 #include <Scenario/Document/BaseScenario/BaseScenarioPresenter.hpp>
7 #include <Scenario/Document/DisplayedElements/DisplayedElementsModel.hpp>
8 
9 #include <QObject>
10 
11 #include <vector>
12 #include <verdigris>
13 
14 class BaseGraphicsObject;
15 namespace Scenario
16 {
17 class FullViewIntervalPresenter;
18 class ScenarioDocumentPresenter;
19 class IntervalModel;
20 // Contains the elements that are shown (not necessarily the ones in
21 // BaseScenarioModel)
22 class SCORE_PLUGIN_SCENARIO_EXPORT DisplayedElementsPresenter final
23  : public QObject
24  , public BaseScenarioPresenter<DisplayedElementsModel, FullViewIntervalPresenter>
25 {
27 public:
30  DisplayedElementsPresenter(DisplayedElementsPresenter&& parent) noexcept = delete;
32  = delete;
34  operator=(DisplayedElementsPresenter&& parent) noexcept = delete;
35 
37  using QObject::event;
39 
40  BaseGraphicsObject& view() const;
41 
42  void on_displayedIntervalChanged(const IntervalModel& m);
43  void showInterval();
44 
45  void on_zoomRatioChanged(ZoomRatio r);
46 
47  void on_displayedIntervalDurationChanged(TimeVal);
48  void on_displayedIntervalHeightChanged(double);
49 
50  void recomputeHeight();
51 
52  void setVisible(bool);
53  void remove();
54 
55  void setSnapLine(TimeVal t, bool enabled);
56 
57 public:
58  void requestFocusedPresenterChange(Process::LayerPresenter* arg_1)
59  E_SIGNAL(SCORE_PLUGIN_SCENARIO_EXPORT, requestFocusedPresenterChange, arg_1)
60 
61 private:
62  void on_intervalExecutionTimer();
63  void updateLength(double);
64 
66 
67  std::vector<QMetaObject::Connection> m_connections;
68 };
69 }
Definition: GraphicsProxyObject.hpp:8
Definition: BaseScenarioPresenter.hpp:13
Definition: LayerPresenter.hpp:34
Definition: DisplayedElementsPresenter.hpp:25
Definition: IntervalModel.hpp:50
The ScenarioDocumentPresenter class.
Definition: ScenarioDocumentPresenter.hpp:58
Main plug-in of score.
Definition: score-plugin-dataflow/Dataflow/PortItem.hpp:14
Definition: TimeValue.hpp:21