-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpositionsourcesimulator.h
32 lines (25 loc) · 1 KB
/
positionsourcesimulator.h
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
30
31
32
#ifndef POSITIONSOURCESIMULATOR_H
#define POSITIONSOURCESIMULATOR_H
#include <QGeoPositionInfoSource>
#include "zmqreciever.h"
class PositionSourceSimulator:public QGeoPositionInfoSource
{
public:
explicit PositionSourceSimulator( ZmqReciever* zmqReciever, QObject* parent = nullptr);
~PositionSourceSimulator();
QGeoPositionInfo lastKnownPosition(bool fromSatellitePositioningMethodsOnly = false) const override;
PositioningMethods supportedPositioningMethods() const override;
int minimumUpdateInterval() const override;
QGeoPositionInfoSource::Error error() const override;
public slots:
void startUpdates() override;
void stopUpdates() override;
void requestUpdate(int timeout = 0) override;
void updateFromZmq(QVector< double> newLocation);
private:
QGeoPositionInfo m_currentPosition;
QGeoPositionInfoSource::Error m_lastError = QGeoPositionInfoSource::NoError;
bool m_started;
ZmqReciever* m_zmqReciever = nullptr;
};
#endif // POSITIONSOURCESIMULATOR_H