plugins/score-plugin-controlsurface/ControlSurface/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 Port;
11 class ControlInlet;
12 class PortFactoryList;
13 }
14 namespace score
15 {
16 struct DocumentContext;
17 }
18 
19 namespace ControlSurface
20 {
21 class Model;
22 class View;
23 class Presenter final : public Process::LayerPresenter
24 {
25 public:
26  explicit Presenter(
27  const Model& model, View* view, const Process::Context& ctx, QObject* parent);
28 
29  void setWidth(qreal width, qreal defaultWidth) override;
30  void setHeight(qreal height) override;
31 
32  void putToFront() override;
33  void putBehind() override;
34 
35  void on_zoomRatioChanged(ZoomRatio) override;
36 
37  void parentGeometryChanged() override;
38 
39 private:
40  void setupInlet(
41  Process::ControlInlet& inlet, const Process::PortFactoryList& portFactory,
42  const Process::Context& doc);
43  void on_controlAdded(const Id<Process::Port>& id);
44  void on_controlRemoved(const Process::Port& p);
45 
46  View* m_view{};
47  struct Port;
48  std::vector<Port> m_ports;
49 };
50 }
Definition: QmlObjects.hpp:109
Definition: score-plugin-controlsurface/ControlSurface/Process.hpp:86
Definition: plugins/score-plugin-controlsurface/ControlSurface/Presenter.hpp:24
Definition: score-plugin-controlsurface/ControlSurface/View.hpp:20
Definition: score-lib-process/Process/Dataflow/Port.hpp:202
Definition: LayerPresenter.hpp:34
Definition: PortFactory.hpp:65
Definition: score-lib-process/Process/Dataflow/Port.hpp:102
The id_base_t class.
Definition: Identifier.hpp:57
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
@ ControlSurface
The process supports being exposed to the ControlSurface.
Definition: ProcessFlags.hpp:37
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: plugins/score-plugin-controlsurface/ControlSurface/Presenter.cpp:30
Definition: ProcessContext.hpp:12