Engauge Digitizer 2
Loading...
Searching...
No Matches
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
13class GraphicsPoint;
14
16class GraphicsPointPolygon : public QGraphicsPolygonItem
17{
18public:
21 const QPolygonF &polygon);
22
24 QVariant itemChange(GraphicsItemChange change, const QVariant &value);
25
27 void setRadius(int radius);
28
29private:
31
32 // Reference to the GraphicsPoint that this class belongs to
33 GraphicsPoint &m_graphicsPoint;
34};
35
36#endif // GRAPHICS_POINT_POLYGON_H
This class add event handling to QGraphicsPolygonItem.
void setRadius(int radius)
Update the radius.
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Intercept moves by dragging so moved items can be identified. This replaces unreliable hit tests.
Graphics item for drawing a circular or polygonal Point.