27 #ifndef WAYPOINTITEM_H
28 #define WAYPOINTITEM_H
31 #include "../core/corecommon.h"
44 Q_INTERFACES(QGraphicsItem)
46 enum { Type = UserType + TYPE_WAYPOINTITEM };
47 enum wptype {absolute,relative};
75 QString Description(){
return description;}
81 void SetDescription(QString
const& value);
87 bool Reached(){
return reached;}
93 void SetReached(
bool const& value);
98 int Number(){
return number;}
99 int numberAdjusted(){
return number+1;}
105 void SetNumber(
int const& value);
116 bool ShowNumber(){
return shownumber;}
122 void SetShowNumber(
bool const& value);
129 virtual void SetAltitude(
const float &value);
133 QRectF boundingRect()
const;
134 void paint(QPainter *painter,
const QStyleOptionGraphicsItem *option,
136 void RefreshToolTip();
138 QString customString(){
return myCustomString;}
139 void setCustomString(QString arg){myCustomString=arg;}
140 void setFlag(GraphicsItemFlag flag,
bool enabled);
144 void setWPType(wptype type);
145 wptype WPType(){
return myType;}
147 void mouseMoveEvent ( QGraphicsSceneMouseEvent * event );
148 void mousePressEvent ( QGraphicsSceneMouseEvent * event );
149 void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event );
150 void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *event);
158 QGraphicsSimpleTextItem* text;
159 QGraphicsRectItem* textBG;
160 QGraphicsSimpleTextItem* numberI;
161 QGraphicsRectItem* numberIBG;
165 QString myCustomString;
173 void WPDeleted(
int const& number,
WayPointItem *waypoint);
181 void WPRenumbered(
int const& oldnumber,
int const& newnumber,
WayPointItem* waypoint);
188 void WPInserted(
int const& number,
WayPointItem* waypoint);
192 void setOpacitySlot(qreal opacity);
201 void WPNumberChanged(
int const& oldnumber,
int const& newnumber,
WayPointItem* waypoint);
221 #endif // WAYPOINTITEM_H
A graphicsItem representing a MapPointItem.
The main graphicsItem used on the widget, contains the map and map logic.
A QGraphicsItem representing a MapPointItem.
A QGraphicsItem representing a WayPoint.