ddt 1.4.0
 
Loading...
Searching...
No Matches
ddtGraphicalElementRectangle.hpp
Go to the documentation of this file.
1
9
10#ifndef DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_RECTANGLE_HPP
11#define DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_RECTANGLE_HPP
12
14
19 public:
32 const double y, const double w, const double h,
33 const QString obj_name = "", const QString elem_name = "");
34
39
43 virtual void DrawElement(QPainter* painter) override;
44
49 QRectF boundingRect() const override;
50
55 int type() const override;
56
57 private:
58 void hoverEnterEvent(QGraphicsSceneHoverEvent* const event) override;
59 void hoverLeaveEvent(QGraphicsSceneHoverEvent* const event) override;
60
61 bool sceneEventFilter(QGraphicsItem* const watched,
62 QEvent* const event) override;
63
64 void Initialize();
65 void SetCornerPositions() const;
66
67 // Rectangle is made up of x/y coordinates for upper-left and lower-right
68 // corner
69 double x1;
70 double y1;
71 double x2;
72 double y2;
73
74 PointGrabber* corners[4];
75};
76
77#endif // DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_RECTANGLE_HPP
Definition ddtGraphicalElementProperties.hpp:20
int type() const override
Definition ddtGraphicalElementRectangle.cpp:51
QRectF boundingRect() const override
Definition ddtGraphicalElementRectangle.cpp:39
DdtGraphicalElementRectangle(DdtGraphicalElementProperties const &element_properties, const double x, const double y, const double w, const double h, const QString obj_name="", const QString elem_name="")
Definition ddtGraphicalElementRectangle.cpp:14
virtual void DrawElement(QPainter *painter) override
Definition ddtGraphicalElementRectangle.cpp:59
DdtGraphicalElementProperties element_properties
Definition ddtGraphicalElement.hpp:248
DdtGraphicalElement(DdtGraphicalElementProperties const &element_properties, const QString obj_name="", const QString elem_name="")
Definition ddtGraphicalElement.cpp:15
Definition ddtPointGrabber.hpp:24
DDT Graphics. Base Class for the DDT Graphical Elements. Elements can be lines, ovals,...