plugins/score-plugin-gfx/Gfx/Video/Presenter.hpp
1 #pragma once
2 #include <Process/Focus/FocusDispatcher.hpp>
3 #include <Process/LayerPresenter.hpp>
4 #include <Process/ZoomHelper.hpp>
5 
6 #include <score/model/Identifier.hpp>
7 
8 namespace Process
9 {
10 class ControlInlet;
11 class PortFactoryList;
12 }
13 namespace Gfx::Video
14 {
15 class Model;
16 class View;
17 class Presenter final : public Process::LayerPresenter
18 {
19 public:
20  explicit Presenter(
21  const Model& model, View* view, const Process::Context& ctx, QObject* parent);
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_drop(const QPointF& pos, const QMimeData& md);
30  void on_zoomRatioChanged(ZoomRatio) override;
31 
32  void parentGeometryChanged() override;
33 
34  static constexpr double recommendedHeight = 55.;
35 
36 private:
37  View* m_view{};
38  void setupInlet(
39  Process::ControlInlet& port, const Process::PortFactoryList& portFactory,
40  const Process::Context& doc);
41  struct Port;
42  std::vector<Port> m_ports;
43 };
44 }
Definition: QmlObjects.hpp:109
Definition: score-plugin-gfx/Gfx/Video/Process.hpp:17
Definition: plugins/score-plugin-gfx/Gfx/Video/Presenter.hpp:18
Definition: score-plugin-gfx/Gfx/Video/View.hpp:15
Definition: score-lib-process/Process/Dataflow/Port.hpp:202
Definition: LayerPresenter.hpp:34
Definition: PortFactory.hpp:65
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Definition: plugins/score-plugin-gfx/Gfx/Video/Presenter.cpp:25
Definition: ProcessContext.hpp:12