ddt 1.4.0
 
Loading...
Searching...
No Matches
ddtGraphicalElementText.hpp
Go to the documentation of this file.
1
9
10#ifndef DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_TEXT_HPP
11#define DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_TEXT_HPP
12
13#include <QFontMetrics>
15
20 public:
32 const double x_coord, const double y_coord, const QString txt,
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 protected:
61 double x;
62
66 double y;
67
71 double x_org;
72
76 double y_org;
77
81 QString text;
82
83 private:
84 void SetTransform(QTransform const& transform) override;
85 void HighlightSelectedElement(QPainter* painter) const override;
86
87 const int MARGIN = 4;
88 const int BOX_OFFSET = 10;
89
90 QRectF selection_rect;
91 QTransform view_transform;
92};
93
94#endif // DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_TEXT_HPP
Definition ddtGraphicalElementProperties.hpp:20
double x
Definition ddtGraphicalElementText.hpp:61
virtual void DrawElement(QPainter *painter) override
Definition ddtGraphicalElementText.cpp:84
QRectF boundingRect() const override
Definition ddtGraphicalElementText.cpp:27
int type() const override
Definition ddtGraphicalElementText.cpp:76
double y_org
Definition ddtGraphicalElementText.hpp:76
DdtGraphicalElementText(DdtGraphicalElementProperties const &element_properties, const double x_coord, const double y_coord, const QString txt, const QString obj_name="", const QString elem_name="")
Definition ddtGraphicalElementText.cpp:12
double y
Definition ddtGraphicalElementText.hpp:66
virtual ~DdtGraphicalElementText()
QString text
Definition ddtGraphicalElementText.hpp:81
double x_org
Definition ddtGraphicalElementText.hpp:71
DdtGraphicalElementProperties element_properties
Definition ddtGraphicalElement.hpp:248
DdtGraphicalElement(DdtGraphicalElementProperties const &element_properties, const QString obj_name="", const QString elem_name="")
Definition ddtGraphicalElement.cpp:15
DDT Graphics. Base Class for the DDT Graphical Elements. Elements can be lines, ovals,...