WidgetProcessFactory.hpp
1 #pragma once
2 #include <Process/ProcessFactory.hpp>
3 #include <Process/WidgetLayer/WidgetLayerPresenter.hpp>
4 #include <Process/WidgetLayer/WidgetLayerView.hpp>
5 
6 namespace WidgetLayer
7 {
8 template <typename Model_T, typename Widget_T>
9 class LayerFactory final : public Process::LayerFactory
10 {
11 public:
12  virtual ~LayerFactory() = default;
13 
14 private:
15  UuidKey<Process::ProcessModel> concreteKey() const noexcept override
16  {
18  }
19 
20  bool matches(const UuidKey<Process::ProcessModel>& p) const override
21  {
23  }
24 
25  View* makeLayerView(
26  const Process::ProcessModel&, const Process::Context& context,
27  QGraphicsItem* parent) const final override
28  {
29  return new View{parent};
30  }
31 
32  Presenter<Model_T, Widget_T>* makeLayerPresenter(
34  const Process::Context& context, QObject* parent) const final override
35  {
37  safe_cast<const Model_T&>(lm), safe_cast<View*>(v), context, parent};
38  }
39 };
40 }
Definition: score-lib-process/Process/ProcessFactory.hpp:58
Definition: LayerView.hpp:21
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
Definition: WidgetProcessFactory.hpp:10
Definition: WidgetLayerPresenter.hpp:19
Definition: WidgetLayerView.hpp:15
Static metadata implementation.
Definition: lib/score/tools/Metadata.hpp:36
Definition: ProcessContext.hpp:12
Definition: ObjectMatches.hpp:6