1
#ifndef MERKATOR_TRACKSEGMENT_H_
2
#define MERKATOR_TRACKSEGMENT_H_
4
#include "Map/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";}
26
virtual CoordBox boundingBox() const;
27
virtual void draw(QPainter& P, const Projection& theProjection);
28
virtual void drawFocus(QPainter& P, const Projection& theProjection, bool solid=true);
29
virtual void drawHover(QPainter& P, const Projection& theProjection, bool solid=true);
30
virtual double pixelDistance(const QPointF& Target, double ClearEndDistance, const Projection& theProjection) const;
31
void cascadedRemoveIfUsing(MapDocument* theDocument, MapFeature* aFeature, CommandList* theList, const std::vector<MapFeature*>& Alternatives);
32
virtual bool notEverythingDownloaded() const;
33
virtual QString description() const;
34
virtual RenderPriority renderPriority(double aPixelPerM) const;
36
void add(TrackPoint* aPoint);
37
void add(TrackPoint* Pt, unsigned int Idx);
38
virtual unsigned int find(MapFeature* Pt) const;
39
virtual void remove(unsigned int idx);
40
virtual void remove(MapFeature* F);
41
virtual MapFeature* get(unsigned int idx);
42
virtual unsigned int size() const;
43
TrackPoint* getNode(unsigned int idx);
44
virtual const MapFeature* get(unsigned int Idx) const;
45
virtual bool isNull() const;
48
virtual void partChanged(MapFeature* F, unsigned int ChangeId);
50
virtual QString toXML(unsigned int, QProgressDialog *) {return QString("");}
51
virtual bool toXML(QDomElement xParent, QProgressDialog & progress);
52
static TrackSegment* fromXML(MapDocument* d, MapLayer* L, const QDomElement e, QProgressDialog & progress);
54
virtual QString toHtml() {return "";}
56
virtual void toBinary(QDataStream& /* ds */, QHash <QString, quint64>& /*theIndex*/) { return; }
59
TrackSegmentPrivate* p;