12 #include <QGraphicsScene> 17 QGraphicsEllipseItem (rect),
18 m_graphicsPoint (graphicsPoint),
31 QGraphicsEllipseItem::hoverEnterEvent (event);
41 QGraphicsEllipseItem::hoverLeaveEvent (event);
45 const QVariant &value)
47 if (change == QGraphicsItem::ItemPositionHasChanged) {
51 <<
" positionHasChanged";
56 return QGraphicsEllipseItem::itemChange(change,
60 void 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();
void signalPointHoverEnter(QString)
Signal for geometry window to highlight the current point upon hover enter.
#define LOG4CPP_INFO_S(logger)
This class add event handling to QGraphicsEllipseItem.
double highlightOpacity() const
Get method for highlight opacity.
Item type (i.e. image versus point)
Graphics item for drawing a circular or polygonal Point.
void setShadow(GraphicsPointEllipse *shadow)
Bind this graphics item to its shadow.
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.
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Intercept moves by dragging so moved items can be identified. This replaces unreliable hit tests...
void signalPointHoverLeave(QString)
Signal for geometry window to unhighlight the current point upon hover leave.
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Unhighlight this point.
GraphicsPointEllipse(GraphicsPoint &graphicsPoint, const QRect &rect)
Single constructor.
#define LOG4CPP_DEBUG_S(logger)
void setRadius(int radius)
Update the radius.