2015-11-11 18:50:55 +00:00
|
|
|
#ifndef GPSLOCATION_H
|
|
|
|
#define GPSLOCATION_H
|
|
|
|
|
2015-11-11 18:52:52 +00:00
|
|
|
#include <QObject>
|
2015-11-11 18:50:55 +00:00
|
|
|
#include <QGeoCoordinate>
|
2015-11-11 18:52:52 +00:00
|
|
|
#include <QGeoPositionInfoSource>
|
|
|
|
#include <QGeoPositionInfo>
|
2015-11-11 18:50:55 +00:00
|
|
|
|
2015-11-11 18:52:52 +00:00
|
|
|
class GpsLocation : QObject
|
2015-11-11 18:50:55 +00:00
|
|
|
{
|
2015-11-11 18:52:52 +00:00
|
|
|
Q_OBJECT
|
2015-11-11 18:50:55 +00:00
|
|
|
public:
|
2015-11-11 18:52:52 +00:00
|
|
|
GpsLocation(QObject *parent);
|
|
|
|
|
|
|
|
private:
|
|
|
|
QGeoPositionInfo lastPos;
|
2015-11-11 20:32:54 +00:00
|
|
|
QGeoPositionInfoSource *gpsSource;
|
2015-11-11 19:16:59 +00:00
|
|
|
void status(QString msg);
|
2015-11-11 18:50:55 +00:00
|
|
|
|
|
|
|
signals:
|
|
|
|
|
|
|
|
public slots:
|
2015-11-11 18:52:52 +00:00
|
|
|
void newPosition(QGeoPositionInfo pos);
|
|
|
|
void updateTimeout();
|
2015-11-11 18:50:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // GPSLOCATION_H
|