ddt  0.1
ddtGraphicalElementRefLine.hpp
Go to the documentation of this file.
1 // @copyright
2 // (c) Copyright ESO 2020
3 // All Rights Reserved
4 // ESO (eso.org) is an Intergovernmental Organization, and therefore special
5 // legal conditions apply.
6 //
7 // @file ddtGraphicalElementRefLine.hpp
8 // @brief DDT Graphics. Class for reference line elements
9 //
10 // Class for the Graphical Elements - Reference Line
11 //
12 // @author Carsten Mannel, CGI
13 // @since 2021/03/10
14 //
15 
16 #ifndef DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_REF_LINE_HPP
17 #define DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_REF_LINE_HPP
18 
19 #include "ddt/ddtCornergrabber.hpp"
21 
26  public:
32  const double y1, const double x2, const double y2);
33 
38 
42  virtual void DrawElement(QPainter* painter);
43 
48  QRectF boundingRect() const;
49 
54  int type() const;
55 
61  void ReDrawLine(const QPointF start, const QPointF end);
62 
67  void RedrawCorners(QGraphicsScene* scene);
68 
73  QPointF Start() const;
74 
79  QPointF End() const;
80 
85  void ResetEventFilter();
86 
87  protected:
91  double x1;
92 
96  double y1;
97 
101  double x2;
102 
106  double y2;
107 
112 
117 
118  private:
119  virtual bool sceneEventFilter(QGraphicsItem* watched, QEvent* event);
120  bool HandleEvent(CornerGrabber* corner, QEvent* event) const;
121 
122  QPointF location;
123  QPointF drag_start;
124  QPointF drag_end;
125 };
126 
127 #endif // DDT_DATAVISUALISATION_DDTGRAPHCIS_GE_REF_LINE_HPP
DdtGraphicalElementRefLine::installed_event_filters
bool installed_event_filters
Definition: ddtGraphicalElementRefLine.hpp:116
DdtGraphicalElementRefLine
Definition: ddtGraphicalElementRefLine.hpp:25
DdtGraphicalElementRefLine::~DdtGraphicalElementRefLine
virtual ~DdtGraphicalElementRefLine()
Definition: ddtGraphicalElementRefLine.cpp:37
DdtGraphicalElement::element_properties
DdtGraphicalElementProperties element_properties
Definition: ddtGraphicalElement.hpp:145
DdtGraphicalElement
Definition: ddtGraphicalElement.hpp:78
DdtGraphicalElementRefLine::ReDrawLine
void ReDrawLine(const QPointF start, const QPointF end)
Definition: ddtGraphicalElementRefLine.cpp:110
DdtGraphicalElementRefLine::y2
double y2
Definition: ddtGraphicalElementRefLine.hpp:106
DdtGraphicalElementRefLine::End
QPointF End() const
Definition: ddtGraphicalElementRefLine.cpp:62
DdtGraphicalElementRefLine::Start
QPointF Start() const
Definition: ddtGraphicalElementRefLine.cpp:60
ddtGraphicalElement.hpp
ddtCornergrabber.hpp
DdtGraphicalElementRefLine::y1
double y1
Definition: ddtGraphicalElementRefLine.hpp:96
DdtGraphicalElementRefLine::type
int type() const
Definition: ddtGraphicalElementRefLine.cpp:64
DdtGraphicalElementRefLine::x1
double x1
Definition: ddtGraphicalElementRefLine.hpp:91
CornerGrabber
Definition: ddtCornergrabber.hpp:24
DdtGraphicalElementRefLine::DrawElement
virtual void DrawElement(QPainter *painter)
Definition: ddtGraphicalElementRefLine.cpp:72
DdtGraphicalElementRefLine::DdtGraphicalElementRefLine
DdtGraphicalElementRefLine(const DdtGraphicalElementProperties element_properties, const double x1, const double y1, const double x2, const double y2)
Definition: ddtGraphicalElementRefLine.cpp:24
DdtGraphicalElementRefLine::x2
double x2
Definition: ddtGraphicalElementRefLine.hpp:101
DdtGraphicalElementRefLine::corners
CornerGrabber * corners[2]
Definition: ddtGraphicalElementRefLine.hpp:111
DdtGraphicalElementProperties
Definition: ddtGraphicalElementProperties.hpp:27
DdtGraphicalElementRefLine::ResetEventFilter
void ResetEventFilter()
Definition: ddtGraphicalElementRefLine.cpp:119
DdtGraphicalElementRefLine::RedrawCorners
void RedrawCorners(QGraphicsScene *scene)
Definition: ddtGraphicalElementRefLine.cpp:54
DdtGraphicalElementRefLine::boundingRect
QRectF boundingRect() const
Definition: ddtGraphicalElementRefLine.cpp:50