ddt 1.1.0
Loading...
Searching...
No Matches
ddtGraphicalElementCross.hpp
Go to the documentation of this file.
1
19#ifndef DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_CROSS_HPP
20#define DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_CROSS_HPP
21
23
28 public:
40 const double y, const double cross_size, const QString obj_name = "",
41 const QString elem_name = "");
42
47
51 virtual void DrawElement(QPainter* painter) override;
52
57 QRectF boundingRect() const override;
58
63 int type() const override;
64
65 protected:
69 double x_coord;
70
74 double y_coord;
75
79 double size;
80
81 private:
82 void hoverEnterEvent(QGraphicsSceneHoverEvent* const event) override;
83 void hoverLeaveEvent(QGraphicsSceneHoverEvent* const event) override;
84
85 bool sceneEventFilter(QGraphicsItem* const watched,
86 QEvent* const event) override;
87
88 void Initialize();
89 void SetCornerPositions() const;
90 void AdjustSize(const double x, const double y);
91
92 double width;
93 double height;
94
95 CornerGrabber* corners[4];
96};
97
98#endif // DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_CROSS_HPP
99
Definition: ddtCornergrabber.hpp:34
Definition: ddtGraphicalElementCross.hpp:27
QRectF boundingRect() const override
Definition: ddtGraphicalElementCross.cpp:53
double size
Definition: ddtGraphicalElementCross.hpp:79
virtual void DrawElement(QPainter *painter) override
Definition: ddtGraphicalElementCross.cpp:65
int type() const override
Definition: ddtGraphicalElementCross.cpp:45
double y_coord
Definition: ddtGraphicalElementCross.hpp:74
double x_coord
Definition: ddtGraphicalElementCross.hpp:69
virtual ~DdtGraphicalElementCross()
Definition: ddtGraphicalElementProperties.hpp:29
Definition: ddtGraphicalElement.hpp:89
DdtGraphicalElementProperties element_properties
Definition: ddtGraphicalElement.hpp:257
DDT Graphics. Base Class for the DDT Graphical Elements. Elements can be lines, ovals,...