16 #ifndef QGSQUICKSIMULATEDPOSITIONSOURCE_H
17 #define QGSQUICKSIMULATEDPOSITIONSOURCE_H
30 #include "qgis_quick.h"
33 #include <QtPositioning>
51 class QUICK_NO_EXPORT QgsQuickSimulatedPositionSource :
public QGeoPositionInfoSource
55 QgsQuickSimulatedPositionSource( QObject *parent,
double longitude,
double latitude,
double flightRadius );
57 QGeoPositionInfo lastKnownPosition(
bool )
const {
return mLastPosition; }
58 PositioningMethods supportedPositioningMethods()
const {
return AllPositioningMethods; }
59 int minimumUpdateInterval()
const {
return 1000; }
60 Error error()
const {
return QGeoPositionInfoSource::NoError; }
63 virtual void startUpdates();
64 virtual void stopUpdates();
66 virtual void requestUpdate(
int timeout = 5000 );
69 void readNextPosition();
72 void readRandomPosition();
73 void readConstantPosition();
75 std::unique_ptr< QTimer > mTimer;
76 QGeoPositionInfo mLastPosition;
79 double mFlightRadius = 0;
80 double mLongitude = 0;
86 #endif // QGSQUICKSIMULATEDPOSITIONSOURCE_H