waypointlineitem.h 844 Bytes
Newer Older
1 2 3 4
#ifndef WAYPOINTLINEITEM_H
#define WAYPOINTLINEITEM_H

#include <QGraphicsLineItem>
lm's avatar
lm committed
5
#include "opmapcontrol.h"
6

lm's avatar
lm committed
7 8
namespace mapcontrol {
class WaypointLineItem : public QObject,public QGraphicsLineItem
9
{
lm's avatar
lm committed
10 11
    Q_OBJECT
    Q_INTERFACES(QGraphicsItem)
12
public:
lm's avatar
lm committed
13
    enum { Type = UserType + 7 };
lm's avatar
lm committed
14
    WaypointLineItem(WayPointItem* wp1, WayPointItem* wp2, QColor color=QColor(Qt::red), MapGraphicItem* parent=0);
lm's avatar
lm committed
15
    int type() const;
lm's avatar
lm committed
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

public slots:
    /**
    * @brief Update waypoint values
    *
    * @param waypoint The waypoint object that just changed
    */
    void updateWPValues(WayPointItem* waypoint);

protected:
    internals::PointLatLng point1;
    internals::PointLatLng point2;
    WayPointItem* wp1;
    WayPointItem* wp2;
    MapGraphicItem* map;              ///< The map this item is parent of
31
};
lm's avatar
lm committed
32
}
33 34

#endif // WAYPOINTLINEITEM_H