12#include <QGraphicsScene>
17 QGraphicsEllipseItem (rect),
18 m_graphicsPoint (graphicsPoint),
27 setOpacityForSubtree (m_graphicsPoint.highlightOpacity());
31 QGraphicsEllipseItem::hoverEnterEvent (event);
41 QGraphicsEllipseItem::hoverLeaveEvent (event);
45 const QVariant &value)
47 if (change == QGraphicsItem::ItemPositionHasChanged) {
51 <<
" positionHasChanged";
56 return QGraphicsEllipseItem::itemChange(change,
60void GraphicsPointEllipse::setOpacityForSubtree (
double opacity)
65 if (m_shadow !=
nullptr) {
68 m_shadow->setOpacity (opacity <
MAX_OPACITY ? 0.0 : opacity);
75 if (boundingRect().width() > 0) {
76 double scale = (2 * radius) / boundingRect().width();
@ DATA_KEY_POSITION_HAS_CHANGED
log4cpp::Category * mainCat
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *event)
Accept hover so point can be highlighted when cursor is over it as a guide to user.
void setShadow(GraphicsPointEllipse *shadow)
Bind this graphics item to its shadow.
void signalPointHoverEnter(QString)
Signal for geometry window to highlight the current point upon hover enter.
void signalPointHoverLeave(QString)
Signal for geometry window to unhighlight the current point upon hover leave.
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Intercept moves by dragging so moved items can be identified. This replaces unreliable hit tests.
GraphicsPointEllipse(GraphicsPoint &graphicsPoint, const QRect &rect)
Single constructor.
void setRadius(int radius)
Update the radius.
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Unhighlight this point.
Graphics item for drawing a circular or polygonal Point.
#define LOG4CPP_INFO_S(logger)
#define LOG4CPP_DEBUG_S(logger)