2 #include "GraphicsPoint.h"
3 #include "GraphicsPointPolygon.h"
5 #include <QGraphicsScene>
6 #include "QtToString.h"
9 const QPolygonF &polygon) :
10 QGraphicsPolygonItem (polygon),
11 m_graphicsPoint (graphicsPoint)
14 LOG4CPP_INFO_S ((*mainCat)) <<
"GraphicsPointPolygon::GraphicsPointPolygon";
18 const QVariant &value)
20 if (change == QGraphicsItem::ItemPositionHasChanged) {
22 LOG4CPP_DEBUG_S ((*mainCat)) <<
"GraphicsPointPolygon::itemChange"
23 <<
" identifier=" << data (DATA_KEY_IDENTIFIER).toString().toLatin1().data()
24 <<
" positionHasChanged";
26 setData (DATA_KEY_POSITION_HAS_CHANGED, QVariant (
true));
29 return QGraphicsPolygonItem::itemChange(change,
36 double scale = (2 * radius) / boundingRect().width();
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.
GraphicsPointPolygon(GraphicsPoint &graphicsPoint, const QPolygonF &polygon)
Single constructor.