-
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMapController.h
More file actions
29 lines (23 loc) · 870 Bytes
/
MapController.h
File metadata and controls
29 lines (23 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <QObject>
#include <QGeoCoordinate>
class MapController : public QObject
{
Q_OBJECT
public:
explicit MapController(QObject *parent = nullptr);
void setMap(QObject *mapObj);
Q_INVOKABLE void addMarker(const QString &id, double lat, double lon, const QString &label, const QString &iconSource);
Q_INVOKABLE void removeMarker(const QString &id);
Q_INVOKABLE void addPolyline(const QList<QGeoCoordinate> &coordinates, const QString &mcolor, int width);
Q_INVOKABLE void clearMarkers();
private:
QObject *m_map = nullptr;
public slots:
void receiveDistance(double distance);
void receiveAzimuth(double azimuth);
void receiveCallLatLon(QGeoCoordinate callLatLon);
signals:
void distanceChanged(QString dist_str);
void azimuthChanged(QString azimut_str);
void callLatLonChanged(QString callLatLon_str);
};