5 #include <QGraphicsItem>
10 class WaypointItem
: public QGraphicsItem
13 WaypointItem(const Waypoint
&waypoint
, Map
*map
, QGraphicsItem
*parent
= 0);
15 const Waypoint
&waypoint() const {return _waypoint
;}
17 void setMap(Map
*map
) {setPos(map
->ll2xy(_waypoint
.coordinates()));}
18 void setUnits(Units units
);
19 void showLabel(bool show
);
20 void setDigitalZoom(int zoom
) {setScale(pow(2, -zoom
));}
22 QPainterPath
shape() const {return _shape
;}
23 QRectF
boundingRect() const {return _shape
.boundingRect();}
24 void paint(QPainter
*painter
, const QStyleOptionGraphicsItem
*option
,
28 void hoverEnterEvent(QGraphicsSceneHoverEvent
*event
);
29 void hoverLeaveEvent(QGraphicsSceneHoverEvent
*event
);
32 QString
toolTip(Units units
);
41 #endif // WAYPOINTITEM_H