Skip to content
waypointlineitem.h 1008 B
Newer Older
#ifndef WAYPOINTLINEITEM_H
#define WAYPOINTLINEITEM_H

#include <QGraphicsLineItem>
#include "../../opmapcontrol.h"
lm's avatar
lm committed
namespace mapcontrol {
class WaypointLineItem : public QObject,public QGraphicsLineItem
lm's avatar
lm committed
    Q_OBJECT
    Q_INTERFACES(QGraphicsItem)
lm's avatar
lm committed
    enum { Type = UserType + 7 };
lm's avatar
lm committed
    WaypointLineItem(WayPointItem* wp1, WayPointItem* wp2, QColor color=QColor(Qt::red), MapGraphicItem* parent=0);
lm's avatar
lm committed
    int type() const;
lm's avatar
lm committed

public slots:
    /**
    * @brief Update waypoint values
    *
    * @param waypoint The waypoint object that just changed
    */
    void updateWPValues(WayPointItem* waypoint);
LM's avatar
LM committed
    */
    void updateWPValues();
    /**
    * @brief Update waypoint values
lm's avatar
lm committed

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