ddt 1.1.0
Loading...
Searching...
No Matches
ddtGraphicalElementStatRectangle.hpp
Go to the documentation of this file.
1
19#ifndef DATAVISUALISATION_GRAPHICS_SRC_INCLUDE_DDT_DDTGRAPHICALELEMENTSTATRECTANGLE_HPP_
20#define DATAVISUALISATION_GRAPHICS_SRC_INCLUDE_DDT_DDTGRAPHICALELEMENTSTATRECTANGLE_HPP_
21
24
29 public:
40 const double y1, const double x2, const double y2);
41
46
50 virtual void DrawElement(QPainter* painter) override;
51
56 QRectF boundingRect() const override;
57
62 void RedrawCorners(QGraphicsScene* scene);
63
68 int type() const override;
69
75 void ReDrawRectangle(const QPointF p1, const QPointF p2);
76
81 QPointF Start() const;
82
87 QPointF End() const;
88
89 /*
90 * Returns the upper right coordinates of the rectangle
91 * @returns upper right point
92 */
93 QPointF UpperRight() const;
94
99 QPointF LowerLeft() const;
100
105 void ResetEventFilter();
106
107 protected:
111 double x1;
112
116 double y1;
117
121 double x2;
122
126 double y2;
127
132
137
138 private:
139 virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent* event) override;
140 bool HandleEvent(CornerGrabber* corner, QEvent* event) const;
141
142 void SetCornerPositions() const;
143
144 QPointF location;
145 QPointF drag_start;
146 QPointF drag_end;
147};
148
149#endif /* DATAVISUALISATION_GRAPHICS_SRC_INCLUDE_DDT_DDTGRAPHICALELEMENTSTATRECTANGLE_HPP_ \
150 */
151
Definition: ddtCornergrabber.hpp:34
Definition: ddtGraphicalElementProperties.hpp:29
Definition: ddtGraphicalElementStatRectangle.hpp:28
QPointF UpperRight() const
Definition: ddtGraphicalElementStatRectangle.cpp:84
QPointF End() const
Definition: ddtGraphicalElementStatRectangle.cpp:80
CornerGrabber * corners[4]
Definition: ddtGraphicalElementStatRectangle.hpp:131
void ResetEventFilter()
Definition: ddtGraphicalElementStatRectangle.cpp:154
double x1
Definition: ddtGraphicalElementStatRectangle.hpp:111
void RedrawCorners(QGraphicsScene *scene)
Definition: ddtGraphicalElementStatRectangle.cpp:158
QRectF boundingRect() const override
Definition: ddtGraphicalElementStatRectangle.cpp:72
virtual void DrawElement(QPainter *painter) override
Definition: ddtGraphicalElementStatRectangle.cpp:100
bool installed_event_filters
Definition: ddtGraphicalElementStatRectangle.hpp:136
double y2
Definition: ddtGraphicalElementStatRectangle.hpp:126
QPointF LowerLeft() const
Definition: ddtGraphicalElementStatRectangle.cpp:88
void ReDrawRectangle(const QPointF p1, const QPointF p2)
Definition: ddtGraphicalElementStatRectangle.cpp:145
double y1
Definition: ddtGraphicalElementStatRectangle.hpp:116
int type() const override
Definition: ddtGraphicalElementStatRectangle.cpp:92
double x2
Definition: ddtGraphicalElementStatRectangle.hpp:121
QPointF Start() const
Definition: ddtGraphicalElementStatRectangle.cpp:76
virtual ~DdtGraphicalElementStatRectangle()
Definition: ddtGraphicalElementStatRectangle.cpp:48
Definition: ddtGraphicalElement.hpp:89
DdtGraphicalElementProperties element_properties
Definition: ddtGraphicalElement.hpp:257
Corner grabber for resizable graphical elements. Class for the corners of resizable graphical element...
DDT Graphics. Base Class for the DDT Graphical Elements. Elements can be lines, ovals,...
string p1
Definition: testCommandLineParser.cpp:360
string p2
Definition: testCommandLineParser.cpp:361