Go to the documentation of this file.
11 #include <QGraphicsScene>
15 const QPolygonF &polygon) :
16 QGraphicsPolygonItem (polygon),
17 m_graphicsPoint (graphicsPoint),
30 QGraphicsPolygonItem::hoverEnterEvent (event);
40 QGraphicsPolygonItem::hoverLeaveEvent (event);
44 const QVariant &value)
46 if (change == QGraphicsItem::ItemPositionHasChanged) {
50 <<
" positionHasChanged";
55 return QGraphicsPolygonItem::itemChange(change,
59 void GraphicsPointPolygon::setOpacityForSubtree (
double opacity)
64 if (m_shadow !=
nullptr) {
67 m_shadow->setOpacity (opacity <
MAX_OPACITY ? 0.0 : opacity);
74 if (boundingRect().width() > 0) {
75 double scale = (2 * radius) / boundingRect().width();
GraphicsPointPolygon(GraphicsPoint &graphicsPoint, const QPolygonF &polygon)
Single constructor.
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Accept hover so point can be highlighted when cursor is over it as a guide to user.
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Unhighlight this point.
void signalPointHoverLeave(QString)
Signal for geometry window to unhighlight the current point upon hover leave.
void setShadow(GraphicsPointPolygon *shadow)
Bind this graphics item to its shadow.
void signalPointHoverEnter(QString)
Signal for geometry window to highlight the current point upon hover enter.
This class add event handling to QGraphicsPolygonItem.
void setRadius(int radius)
Update the radius.
Item type (i.e. image versus point)
#define LOG4CPP_INFO_S(logger)
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Intercept moves by dragging so moved items can be identified. This replaces unreliable hit tests.
log4cpp::Category * mainCat
double highlightOpacity() const
Get method for highlight opacity.
Graphics item for drawing a circular or polygonal Point.
#define LOG4CPP_DEBUG_S(logger)