1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-20 22:04:23 +02:00

Added support for polygon objects

This commit is contained in:
2019-01-31 01:46:53 +01:00
parent 91e633e9fa
commit 50306ecb84
53 changed files with 949 additions and 213 deletions

View File

@ -12,6 +12,7 @@
#include "units.h"
#include "format.h"
#include "palette.h"
#include "data/polygon.h"
class Data;
class POI;
@ -24,6 +25,8 @@ class WaypointItem;
class ScaleItem;
class PathItem;
class GraphItem;
class AreaItem;
class Area;
class MapView : public QGraphicsView
{
@ -46,8 +49,11 @@ public:
void setMarkerColor(const QColor &color);
void setTrackWidth(int width);
void setRouteWidth(int width);
void setAreaWidth(int width);
void setTrackStyle(Qt::PenStyle style);
void setRouteStyle(Qt::PenStyle style);
void setAreaStyle(Qt::PenStyle style);
void setAreaOpacity(int opacity);
void setWaypointSize(int size);
void setWaypointColor(const QColor &color);
void setPOISize(int size);
@ -65,6 +71,7 @@ public slots:
void showPOILabels(bool show);
void showTracks(bool show);
void showRoutes(bool show);
void showAreas(bool show);
void showWaypoints(bool show);
void showRouteWaypoints(bool show);
void clearMapCache();
@ -78,6 +85,7 @@ private slots:
private:
PathItem *addTrack(const Track &track);
PathItem *addRoute(const Route &route);
void addArea(const Area &area);
void addWaypoints(const QVector<Waypoint> &waypoints);
void addPOI(const QList<Waypoint> &waypoints);
void loadPOI();
@ -90,6 +98,7 @@ private:
void zoom(int zoom, const QPoint &pos);
void digitalZoom(int zoom);
void updatePOIVisibility();
void skipColor() {_palette.nextColor();}
void mouseDoubleClickEvent(QMouseEvent *event);
void wheelEvent(QWheelEvent *event);
@ -104,37 +113,28 @@ private:
QList<TrackItem*> _tracks;
QList<RouteItem*> _routes;
QList<WaypointItem*> _waypoints;
QList<AreaItem*> _areas;
QHash<SearchPointer<Waypoint>, WaypointItem*> _pois;
RectC _tr, _rr, _wr;
RectC _tr, _rr, _wr, _ar;
qreal _res;
Map *_map;
POI *_poi;
Palette _palette;
Units _units;
CoordinatesFormat _coordinatesFormat;
qreal _mapOpacity;
qreal _opacity;
QColor _backgroundColor;
bool _showMap;
bool _showTracks;
bool _showRoutes;
bool _showWaypoints;
bool _showWaypointLabels;
bool _showPOI;
bool _showPOILabels;
bool _showMap, _showTracks, _showRoutes, _showAreas, _showWaypoints,
_showWaypointLabels, _showPOI, _showPOILabels, _showRouteWaypoints;
bool _overlapPOIs;
bool _showRouteWaypoints;
int _trackWidth;
int _routeWidth;
Qt::PenStyle _trackStyle;
Qt::PenStyle _routeStyle;
int _waypointSize;
int _poiSize;
QColor _waypointColor;
QColor _poiColor;
QColor _markerColor;
int _trackWidth, _routeWidth, _areaWidth;
Qt::PenStyle _trackStyle, _routeStyle, _areaStyle;
int _waypointSize, _poiSize;
QColor _backgroundColor, _waypointColor, _poiColor, _markerColor;
qreal _areaOpacity;
int _digitalZoom;
bool _plot;