#ifndef POI_H #define POI_H #include #include #include #include #include "waypoint.h" #include "rtree.h" #include "path.h" class WaypointItem; class POI : public QObject { Q_OBJECT public: POI(QObject *parent = 0); bool loadFile(const QString &fileName); const QString &errorString() const {return _errorString;} int errorLine() const {return _errorLine;} unsigned radius() const {return _radius;} void setRadius(unsigned radius); QVector points(const Path &path) const; QVector points(const QList &list) const; QVector points(const QList &list) const; const QStringList &files() const {return _files;} void enableFile(const QString &fileName, bool enable); void clear(); signals: void pointsChanged(); private: typedef RTree POITree; typedef struct { int start; int end; bool enabled; } FileIndex; POITree _tree; QVector _data; QStringList _files; QList _indexes; unsigned _radius; QString _errorString; int _errorLine; }; #endif // POI_H