ddt 1.4.0
 
Loading...
Searching...
No Matches
ddtGraphicalElementStatRectangle.hpp
Go to the documentation of this file.
1
9
10#ifndef DATAVISUALISATION_GRAPHICS_SRC_INCLUDE_DDT_DDTGRAPHICALELEMENTSTATRECTANGLE_HPP_
11#define DATAVISUALISATION_GRAPHICS_SRC_INCLUDE_DDT_DDTGRAPHICALELEMENTSTATRECTANGLE_HPP_
12
15
20 public:
31 const double y1, const double x2, const double y2);
32
37
41 virtual void DrawElement(QPainter* painter) override;
42
47 QRectF boundingRect() const override;
48
53 void RedrawCorners(QGraphicsScene* scene);
54
59 int type() const override;
60
66 void ReDrawRectangle(const QPointF p1, const QPointF p2);
67
72 QPointF Start() const;
73
78 QPointF End() const;
79
80 /*
81 * Returns the upper right coordinates of the rectangle
82 * @returns upper right point
83 */
84 QPointF UpperRight() const;
85
90 QPointF LowerLeft() const;
91
96 void ResetEventFilter();
97
98 protected:
102 double x1;
103
107 double y1;
108
112 double x2;
113
117 double y2;
118
123
128
129 private:
130 virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent* event) override;
131 bool HandleEvent(PointGrabber* corner, QEvent* event) const;
132
133 void SetCornerPositions() const;
134
135 QPointF location;
136 QPointF drag_start;
137 QPointF drag_end;
138};
139
140#endif /* DATAVISUALISATION_GRAPHICS_SRC_INCLUDE_DDT_DDTGRAPHICALELEMENTSTATRECTANGLE_HPP_ \
141 */
Definition ddtGraphicalElementProperties.hpp:20
QPointF UpperRight() const
Definition ddtGraphicalElementStatRectangle.cpp:75
QPointF End() const
Definition ddtGraphicalElementStatRectangle.cpp:71
void ResetEventFilter()
Definition ddtGraphicalElementStatRectangle.cpp:145
double x1
Definition ddtGraphicalElementStatRectangle.hpp:102
void RedrawCorners(QGraphicsScene *scene)
Definition ddtGraphicalElementStatRectangle.cpp:149
QRectF boundingRect() const override
Definition ddtGraphicalElementStatRectangle.cpp:63
virtual void DrawElement(QPainter *painter) override
Definition ddtGraphicalElementStatRectangle.cpp:91
bool installed_event_filters
Definition ddtGraphicalElementStatRectangle.hpp:127
double y2
Definition ddtGraphicalElementStatRectangle.hpp:117
QPointF LowerLeft() const
Definition ddtGraphicalElementStatRectangle.cpp:79
PointGrabber * corners[4]
Definition ddtGraphicalElementStatRectangle.hpp:122
void ReDrawRectangle(const QPointF p1, const QPointF p2)
Definition ddtGraphicalElementStatRectangle.cpp:136
double y1
Definition ddtGraphicalElementStatRectangle.hpp:107
int type() const override
Definition ddtGraphicalElementStatRectangle.cpp:83
double x2
Definition ddtGraphicalElementStatRectangle.hpp:112
DdtGraphicalElementStatRectangle(const DdtGraphicalElementProperties element_properties, const double x1, const double y1, const double x2, const double y2)
Definition ddtGraphicalElementStatRectangle.cpp:22
QPointF Start() const
Definition ddtGraphicalElementStatRectangle.cpp:67
virtual ~DdtGraphicalElementStatRectangle()
Definition ddtGraphicalElementStatRectangle.cpp:39
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,...
Point grabber for manipulate graphical elements.
string p1
Definition testCommandLineParser.cpp:355
string p2
Definition testCommandLineParser.cpp:356