From 9195f247c4b05a0cb849cf998355dc3ec3b65641 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 11 Nov 2015 10:54:36 -0800 Subject: Location service: move files around to fit new directory layout Signed-off-by: Dirk Hohndel --- gpslocation.cpp | 32 -------------------------------- 1 file changed, 32 deletions(-) delete mode 100644 gpslocation.cpp (limited to 'gpslocation.cpp') diff --git a/gpslocation.cpp b/gpslocation.cpp deleted file mode 100644 index da4734897..000000000 --- a/gpslocation.cpp +++ /dev/null @@ -1,32 +0,0 @@ -#include "gpslocation.h" -#include - - -GpsLocation::GpsLocation(QObject *parent) -{ - QGeoPositionInfoSource *gpsSource = QGeoPositionInfoSource::createDefaultSource(parent); - if (gpsSource != 0) { - qDebug() << "have position source" << gpsSource->sourceName(); - connect(gpsSource, SIGNAL(positionUpdated(QGeoPositionInfo)), this, SLOT(newPosition(QGeoPositionInfo))); - connect(gpsSource, SIGNAL(updateTimeout()), this, SLOT(updateTimeout())); - lastPos = gpsSource->lastKnownPosition(); - gpsSource->requestUpdate(1000); - QGeoCoordinate lastCoord = lastPos.coordinate(); - if (lastCoord.isValid()) { - qDebug() << lastCoord.toString(); - } else { - qDebug() << "invalid last position"; - } - } else { - qDebug() << "don't have GPS source"; - } -} -void GpsLocation::newPosition(QGeoPositionInfo pos) -{ - qDebug() << "received new position" << pos.coordinate().toString(); -} - -void GpsLocation::updateTimeout() -{ - qDebug() << "request to get new position timed out"; -} -- cgit v1.2.3-70-g09d2