1#ifndef IVS3D_MAPHANDLER_H
2#define IVS3D_MAPHANDLER_H
4#include <QGeoCoordinate>
40 void addPoints(
const QList<QPair<QPointF, bool>>& m_gpsData);
42 void updatePoints(
const QList<QPair<QPointF, bool>>& m_changedPoints);
44 void setPolygon(
const QPolygonF& poly);
107 void circleSignal(
const QGeoCoordinate& coordinate, QString name,
bool used);
151 void onQmlGpsClicked(
const QString& text);
153 void onQmlMapClicked(
const QString& text);
155 void onQmlMapItems(
const QVariant& variant);
157 void onQmlDeleteSelection();
159 void onQmlSelectionBack();
161 void onQmlSelectionForward();
180 QPointF
minDistance(QPointF A, QPointF B, QPointF newPoint);
200 QList<QGeoPolygon> mPolyStack;
202 int mCurrentStackPos = -1;
The MapHandler is used to handel the qml map.
Definition maphandler.h:29
void emitCreatePolyline(const QGeoCoordinate &coordinate)
emitCreatePolyline method to emit the corresponding signal
Definition maphandler.h:68
void emitSetMapSelect(const QGeoPath &path)
emitSetMapSelect Method to emit the corresponding signal
Definition maphandler.h:76
QList< QPointF > mOrderedGpsList
List of GPS data in the order of acquisition.
Definition maphandler.h:189
QSet< QPointF > mChangedPoints
Save points that have been change with a new polygon.
Definition maphandler.h:195
void addPoints(const QList< QPair< QPointF, bool > > &m_gpsData)
addPoints Adds all given gps values as points on the map
Definition maphandler.cpp:22
QMap< QPointF, bool > mGpsMap
GPS points used or not.
Definition maphandler.h:186
QPolygonF geoPolyToPolyF()
Converts the current QGeoPolygon to QPolygonF.
Definition maphandler.cpp:198
void getMapItems()
getMapItems Used to signal that the map needs to return the current map items
void gpsClicked(QPointF gpsPoint, bool used)
gpsClicked Signal emitted when a gps points has been clicked
void newMapItems()
Definition maphandler.cpp:187
void gpsSelected(QPolygonF polyF)
gpsSelected Signal emitted when a new polygon has been selected
QMap< QPointF, int > mMapItems
Used to save the item list from the qml map.
Definition maphandler.h:198
QGeoPolygon mPolygon
The current polygon.
Definition maphandler.h:192
void createPolyline(const QGeoCoordinate &coordinate)
emitCreatePolyline Used to add points to the static polyline on the map (And will set the polyline vi...
void emitCircleSignal(const QGeoCoordinate &coordinate, QString name, bool used)
emitCircleSignal Method to emit the corresponding signal
Definition maphandler.h:52
void circleSignal(const QGeoCoordinate &coordinate, QString name, bool used)
circleSignal Used to create points on the map at the given coordinate
void setPoint(const int index, bool used)
emitSetPoint Used to update a points oppacity
QPointF pointAtGeo(int index)
Return the QPointF of the current QGeoPolygon at the given index.
Definition maphandler.cpp:227
void adjustMap(const QGeoCoordinate &coordinate)
adjustMap Used to center the map at the given coordinate
void drawGpsDataOnMap()
draw GPS data onto map.
Definition maphandler.cpp:72
void emitAdjustMapCenter(const QGeoCoordinate &coordinate)
emitAdjustMapCenter Method to emit the corresponding signal
Definition maphandler.h:60
void emitSetPoint(const int index, bool used)
emitSetPoint Method to emit the corresponding signal
Definition maphandler.h:85
QList< QLineF > geoPolyToLineList()
Definition maphandler.cpp:210
void setMapSelect(const QGeoPath &path)
emitSetMapSelect Used to updated the current user selected polygon on the map
void emitGetMapItems()
emitGetMapItems Method to emit the corresponding signal
Definition maphandler.h:92
QPointF minDistance(QPointF A, QPointF B, QPointF newPoint)
Definition maphandler.cpp:325