Engauge Digitizer  2
GraphicsPointPolygon.h
1 /******************************************************************************************************
2  * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3  * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4  * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5  ******************************************************************************************************/
6 
7 #ifndef GRAPHICS_POINT_POLYGON_H
8 #define GRAPHICS_POINT_POLYGON_H
9 
10 #include <QGraphicsPolygonItem>
11 #include <QPointF>
12 
13 class GraphicsPoint;
14 
16 class GraphicsPointPolygon : public QGraphicsPolygonItem
17 {
18 public:
20  GraphicsPointPolygon(GraphicsPoint &graphicsPoint,
21  const QPolygonF &polygon);
22 
24  QVariant itemChange(GraphicsItemChange change, const QVariant &value);
25 
27  void setRadius(int radius);
28 
29 private:
31 
32  // Reference to the GraphicsPoint that this class belongs to
33  GraphicsPoint &m_graphicsPoint;
34 };
35 
36 #endif // GRAPHICS_POINT_POLYGON_H
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Intercept moves by dragging so moved items can be identified. This replaces unreliable hit tests...
void setRadius(int radius)
Update the radius.
Graphics item for drawing a circular or polygonal Point.
Definition: GraphicsPoint.h:39
This class add event handling to QGraphicsPolygonItem.