plugins/score-plugin-nodal/Nodal/Presenter.hpp
1 #pragma once
2 #include <Process/Dataflow/NodeItem.hpp>
3 #include <Process/Focus/FocusDispatcher.hpp>
4 #include <Process/LayerPresenter.hpp>
5 #include <Process/ZoomHelper.hpp>
6 
7 #include <Nodal/Process.hpp>
8 
9 #include <score/model/Identifier.hpp>
10 namespace Nodal
11 {
12 class Model;
13 class View;
14 class Presenter final
16  , public Nano::Observer
17 {
18 public:
19  explicit Presenter(
20  const Model& model, View* view, const Process::Context& ctx, QObject* parent);
21  ~Presenter();
22 
23  void setWidth(qreal width, qreal defaultWidth) override;
24  void setHeight(qreal height) override;
25 
26  void putToFront() override;
27  void putBehind() override;
28 
29  void on_zoomRatioChanged(ZoomRatio) override;
30 
31  void parentGeometryChanged() override;
32 
33  void on_created(Process::ProcessModel& n);
34  void on_removing(const Process::ProcessModel& n);
35  void on_drop(const QPointF& pos, const QMimeData& mime);
36 
37 private:
39 
40  const Model& m_model;
41  qreal m_defaultW{};
42  ZoomRatio m_ratio{1.};
43  View* m_view{};
44 };
45 }
Definition: score-plugin-nodal/Nodal/Process.hpp:14
Definition: plugins/score-plugin-nodal/Nodal/Presenter.hpp:17
Definition: score-plugin-nodal/Nodal/View.hpp:7
Definition: LayerPresenter.hpp:34
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
Definition: ProcessContext.hpp:12