MappingPresenter.hpp
1 #pragma once
2 #include <Process/ProcessContext.hpp>
3 
4 #include <Curve/CurveStyle.hpp>
5 #include <Curve/Process/CurveProcessPresenter.hpp>
6 
7 #include <Mapping/MappingModel.hpp>
8 #include <Mapping/MappingView.hpp>
9 
10 #include <verdigris>
11 
12 namespace Mapping
13 {
14 class LayerPresenter final : public Curve::CurveProcessPresenter<ProcessModel, LayerView>
15 {
16  W_OBJECT(LayerPresenter)
17 public:
19  const Curve::Style& style, const ProcessModel& layer, LayerView* view,
20  const Process::Context& context, QObject* parent)
21  : CurveProcessPresenter{style, layer, view, context, parent}
22  {
23  }
24 
25  void parentGeometryChanged() override
26  {
27  QRectF rect = m_view->boundingRect();
28  m_curve.view().setRect(rect);
29 
30  m_curve.view().setDefaultWidth(rect.width());
31  m_curve.setRect(rect);
32  }
33 };
34 }
Definition: CurveProcessPresenter.hpp:28
Definition: MappingPresenter.hpp:15
Definition: MappingView.hpp:15
Definition: MappingModel.hpp:27
Definition: CurveStyle.hpp:13
Definition: ProcessContext.hpp:12