WidgetLayerView.hpp
1 #pragma once
2 #include <Process/LayerView.hpp>
3 
4 #include <score_lib_process_export.h>
5 
6 #include <verdigris>
7 
8 class QGraphicsItem;
9 class QPainter;
10 class QGraphicsProxyWidget;
11 
12 namespace WidgetLayer
13 {
14 class SCORE_LIB_PROCESS_EXPORT View final : public Process::LayerView
15 {
16  W_OBJECT(View)
17 public:
18  explicit View(QGraphicsItem* parent);
19 
20  void setWidget(QWidget*);
21 
22 private:
23  void heightChanged(qreal h) override;
24  void widthChanged(qreal w) override;
25  void paint_impl(QPainter*) const override;
26  void mousePressEvent(QGraphicsSceneMouseEvent*) override;
27  void mouseMoveEvent(QGraphicsSceneMouseEvent*) override;
28  void mouseReleaseEvent(QGraphicsSceneMouseEvent*) override;
29 
30  QGraphicsProxyWidget* m_widg{};
31 };
32 }
Definition: LayerView.hpp:21
Definition: WidgetLayerView.hpp:15