~ubuntu-branches/ubuntu/saucy/merkaartor/saucy

« back to all changes in this revision

Viewing changes to Map/TrackSegment.h

  • Committer: Bazaar Package Importer
  • Author(s): Bernd Zeimetz
  • Date: 2009-09-13 00:52:12 UTC
  • mto: (1.2.7 upstream) (0.1.3 upstream) (3.1.7 sid)
  • mto: This revision was merged to the branch mainline in revision 10.
  • Revision ID: james.westby@ubuntu.com-20090913005212-pjecal8zxm07x0fj
ImportĀ upstreamĀ versionĀ 0.14+svnfixes~20090912

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#ifndef MERKATOR_TRACKSEGMENT_H_
2
 
#define MERKATOR_TRACKSEGMENT_H_
3
 
 
4
 
#include "Map/MapFeature.h"
5
 
 
6
 
class TrackSegmentPrivate;
7
 
class TrackPoint;
8
 
 
9
 
class QProgressDialog;
10
 
 
11
 
class TrackSegment : public MapFeature
12
 
{
13
 
        Q_OBJECT
14
 
 
15
 
        public:
16
 
                TrackSegment(void);
17
 
                ~TrackSegment(void);
18
 
        private:
19
 
                TrackSegment(const TrackSegment& other);
20
 
 
21
 
                void drawDirectionMarkers(QPainter & P, QPen & pen, const QPointF & FromF, const QPointF & ToF);
22
 
 
23
 
        public:
24
 
                virtual QString getClass() const {return "TrackSegment";}
25
 
 
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;
35
 
 
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;
46
 
 
47
 
                void sortByTime();
48
 
                virtual void partChanged(MapFeature* F, unsigned int ChangeId);
49
 
 
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);
53
 
 
54
 
                virtual QString toHtml() {return "";}
55
 
 
56
 
                virtual void toBinary(QDataStream& /* ds */, QHash <QString, quint64>& /*theIndex*/) { return; }
57
 
 
58
 
private:
59
 
                TrackSegmentPrivate* p;
60
 
};
61
 
 
62
 
#endif
63
 
 
64