00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #ifndef LINESTRING_H
00027 #define LINESTRING_H
00028
00029 #include "curve.h"
00030
00031 namespace qmapcontrol
00032 {
00034
00038 class LineString : public Curve
00039 {
00040 Q_OBJECT
00041
00042 public:
00043 LineString();
00045
00052 LineString ( QList<Point*> const points, QString name = QString(), QPen* pen = 0 );
00053 virtual ~LineString();
00054
00056
00059 QList<Point*> points();
00060
00062
00065 void addPoint ( Point* point );
00066
00068
00071 void setPoints ( QList<Point*> points );
00072
00074
00077 int numberOfPoints() const;
00078
00079
00080 virtual QRectF boundingBox();
00081
00082
00083
00084
00086
00091 virtual bool hasPoints() const;
00092
00094
00098 virtual bool hasClickedPoints() const;
00099
00101
00108 virtual QList<Geometry*> clickedPoints();
00109
00110 protected:
00111 virtual bool Touches ( Geometry* geom, const MapAdapter* mapadapter );
00112 virtual bool Touches ( Point* geom, const MapAdapter* mapadapter );
00113 virtual void draw ( QPainter* painter, const MapAdapter* mapadapter, const QRect &screensize, const QPoint offset );
00114
00115 private:
00116 QList<Point*> vertices;
00117 QList<Geometry*> touchedPoints;
00118 };
00119 }
00120 #endif