1
#ifndef MERKATOR_TRACKSEGMENT_H_
2
#define MERKATOR_TRACKSEGMENT_H_
4
#include "Maps/MapFeature.h"
6
class TrackSegmentPrivate;
11
class TrackSegment : public MapFeature
19
TrackSegment(const TrackSegment& other);
21
void drawDirectionMarkers(QPainter & P, QPen & pen, const QPointF & FromF, const QPointF & ToF);
24
virtual QString getClass() const {return "TrackSegment";}
25
virtual void updateMeta();
27
virtual CoordBox boundingBox() const;
28
virtual void draw(QPainter& P, MapView* theView);
29
virtual void drawFocus(QPainter& P, MapView* theView, bool solid=true);
30
virtual void drawHover(QPainter& P, MapView* theView, bool solid=true);
31
virtual void drawHighlight(QPainter& P, MapView* theView, bool solid=true);
32
virtual double pixelDistance(const QPointF& Target, double ClearEndDistance, const Projection& theProjection, const QTransform& theTransform) const;
33
void cascadedRemoveIfUsing(MapDocument* theDocument, MapFeature* aFeature, CommandList* theList, const QList<MapFeature*>& Alternatives);
34
virtual bool notEverythingDownloaded();
35
virtual QString description() const;
36
virtual RenderPriority renderPriority();
38
void add(TrackPoint* aPoint);
39
void add(TrackPoint* Pt, int Idx);
40
virtual int find(MapFeature* Pt) const;
41
virtual void remove(int idx);
42
virtual void remove(MapFeature* F);
43
virtual MapFeature* get(int idx);
44
virtual int size() const;
45
TrackPoint* getNode(int idx);
46
virtual const MapFeature* get(int Idx) const;
47
virtual bool isNull() const;
50
virtual void partChanged(MapFeature* F, int ChangeId);
55
virtual QString toXML(int, QProgressDialog *) {return QString("");}
56
virtual bool toGPX(QDomElement xParent, QProgressDialog & progress, bool forExport=false);
57
static TrackSegment* fromGPX(MapDocument* d, MapLayer* L, const QDomElement e, QProgressDialog & progress);
58
virtual bool toXML(QDomElement xParent, QProgressDialog & progress);
59
static TrackSegment* fromXML(MapDocument* d, MapLayer* L, const QDomElement e, QProgressDialog & progress);
61
virtual QString toHtml() {return "";}
63
virtual void toBinary(QDataStream& /* ds */, QHash <QString, quint64>& /*theIndex*/) { return; }
66
TrackSegmentPrivate* p;