EffectLayer.hpp
1 #pragma once
2 #include <Process/LayerPresenter.hpp>
3 #include <Process/LayerView.hpp>
4 
5 #include <verdigris>
6 
7 class QAction;
8 namespace score
9 {
10 class QGraphicsDraggablePixmap;
11 }
12 namespace Process
13 {
14 
15 class SCORE_LIB_PROCESS_EXPORT EffectLayerView : public Process::LayerView
16 {
17 public:
18  EffectLayerView(QGraphicsItem* parent);
19  ~EffectLayerView() override;
20 
21 private:
22  void paint_impl(QPainter*) const override;
23 };
24 
25 class SCORE_LIB_PROCESS_EXPORT EffectLayerPresenter final
27 {
28  W_OBJECT(EffectLayerPresenter)
29 public:
31  const Process::ProcessModel& model, Process::LayerView* view,
32  const Process::Context& ctx, QObject* parent);
33  ~EffectLayerPresenter() override;
34 
35  void setWidth(qreal width, qreal defaultWidth) override;
36  void setHeight(qreal val) override;
37  void putToFront() override;
38  void putBehind() override;
39  void on_zoomRatioChanged(ZoomRatio) override;
40  void parentGeometryChanged() override;
41  void fillContextMenu(
42  QMenu& menu, QPoint pos, QPointF scenepos,
43  const Process::LayerContextMenuManager&) final override;
44 
45 private:
46  Process::LayerView* m_view{};
47 };
48 
49 SCORE_LIB_PROCESS_EXPORT
50 void setupExternalUI(
51  const Process::ProcessModel& proc, const Process::LayerFactory& factory,
52  const score::DocumentContext& ctx, bool show);
53 
54 SCORE_LIB_PROCESS_EXPORT
55 void setupExternalUI(
56  const Process::ProcessModel& proc, const score::DocumentContext& ctx, bool show);
57 
58 SCORE_LIB_PROCESS_EXPORT
59 QGraphicsItem* makeExternalUIButton(
60  const Process::ProcessModel& proc, const score::DocumentContext& ctx, QObject* self,
61  QGraphicsItem* parent);
62 
63 SCORE_LIB_PROCESS_EXPORT
64 score::QGraphicsDraggablePixmap* makePresetButton(
65  const Process::ProcessModel& proc, const score::DocumentContext& ctx, QObject* self,
66  QGraphicsItem* parent);
67 
68 SCORE_LIB_PROCESS_EXPORT
69 void copyProcess(JSONReader& r, const Process::ProcessModel& proc);
70 }
Definition: JSONVisitor.hpp:52
Definition: EffectLayer.hpp:27
Definition: EffectLayer.hpp:16
Definition: LayerContextMenu.hpp:38
Definition: score-lib-process/Process/ProcessFactory.hpp:58
Definition: LayerPresenter.hpp:34
Definition: LayerView.hpp:21
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
Definition: QGraphicsSelectablePixmapToggle.hpp:51
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: ProcessContext.hpp:12
Definition: DocumentContext.hpp:18