11#include <QGraphicsScene>
16 QGraphicsPolygonItem (polygon),
30 QGraphicsPolygonItem::hoverEnterEvent (
event);
40 QGraphicsPolygonItem::hoverLeaveEvent (
event);
46 if (
change == QGraphicsItem::ItemPositionHasChanged) {
50 <<
" positionHasChanged";
55 return QGraphicsPolygonItem::itemChange(
change,
59void GraphicsPointPolygon::setOpacityForSubtree (
double opacity)
64 if (m_shadow !=
nullptr) {
74 if (boundingRect().width() > 0) {
75 double scale = (2 * radius) / boundingRect().width();
@ DATA_KEY_POSITION_HAS_CHANGED
Item type (i.e. image versus point)
const int INNER_RADIUS_MIN
log4cpp::Category * mainCat
This class add event handling to QGraphicsPolygonItem.
void setRadius(int radius)
Update the radius.
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *event)
Unhighlight this point.
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 signalPointHoverEnter(QString)
Signal for geometry window to highlight the current point upon hover enter.
GraphicsPointPolygon(GraphicsPoint &graphicsPoint, const QPolygonF &polygon)
Single constructor.
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.
Graphics item for drawing a circular or polygonal Point.
double highlightOpacity() const
Get method for highlight opacity.
#define LOG4CPP_INFO_S(logger)
#define LOG4CPP_DEBUG_S(logger)