1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 11:45:53 +01:00

API cleanup

This commit is contained in:
Martin Tůma 2020-11-10 20:14:59 +01:00
parent 731b309ac9
commit f55d6d8501

View File

@ -21,7 +21,7 @@ public:
struct Poly { struct Poly {
/* QPointF insted of Coordinates for performance reasons (no need to /* QPointF insted of Coordinates for performance reasons (no need to
duplicate all the vectors for drawing). Note, that we do not want to duplicate all the vectors for drawing). Note, that we do not want to
ll2xy() the points in the IMG class as this can not be done in ll2xy() the points in the MapData class as this can not be done in
parallel. */ parallel. */
QVector<QPointF> points; QVector<QPointF> points;
Label label; Label label;
@ -44,15 +44,6 @@ public:
{return id < other.id;} {return id < other.id;}
}; };
struct Polys {
Polys() {}
Polys(const QList<Poly> &polygons, const QList<Poly> &lines)
: polygons(polygons), lines(lines) {}
QList<Poly> polygons;
QList<Poly> lines;
};
MapData(); MapData();
virtual ~MapData(); virtual ~MapData();
@ -87,8 +78,20 @@ protected:
QString _errorString; QString _errorString;
private: private:
struct Polys {
Polys() {}
Polys(const QList<Poly> &polygons, const QList<Poly> &lines)
: polygons(polygons), lines(lines) {}
QList<Poly> polygons;
QList<Poly> lines;
};
QCache<const SubDiv*, Polys> _polyCache; QCache<const SubDiv*, Polys> _polyCache;
QCache<const SubDiv*, QList<Point> > _pointCache; QCache<const SubDiv*, QList<Point> > _pointCache;
friend class VectorTile;
friend class PolyCTX;
}; };
#ifndef QT_NO_DEBUG #ifndef QT_NO_DEBUG