aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-13 09:17:13 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-13 09:17:13 -0800
commit6a70793ba843549bd8e1921a91a3af0e10702405 (patch)
tree68849dd992eb8415f8105a7d934797e5f2bcabe8 /qt-mobile
parent4b39971978b5c1fe2f50e83837eb5f8b2ce7ce47 (diff)
downloadsubsurface-6a70793ba843549bd8e1921a91a3af0e10702405.tar.gz
Location service: report number of recorded GPS fixes
This is mostly for debugging, to make sure that the recording of GPS fixes works as expected. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r--qt-mobile/gpslocation.cpp5
-rw-r--r--qt-mobile/gpslocation.h1
-rw-r--r--qt-mobile/qmlmanager.cpp3
3 files changed, 8 insertions, 1 deletions
diff --git a/qt-mobile/gpslocation.cpp b/qt-mobile/gpslocation.cpp
index 2459aeefd..35654b7ff 100644
--- a/qt-mobile/gpslocation.cpp
+++ b/qt-mobile/gpslocation.cpp
@@ -74,6 +74,11 @@ void GpsLocation::status(QString msg)
qmlUiShowMessage(qPrintable(msg));
}
+int GpsLocation::getGpsNum() const
+{
+ return geoSettings.value("count", 0).toInt();
+}
+
struct gpsTracker {
degrees_t latitude;
degrees_t longitude;
diff --git a/qt-mobile/gpslocation.h b/qt-mobile/gpslocation.h
index 9310875d8..044420d08 100644
--- a/qt-mobile/gpslocation.h
+++ b/qt-mobile/gpslocation.h
@@ -14,6 +14,7 @@ class GpsLocation : QObject
public:
GpsLocation(QObject *parent);
bool applyLocations();
+ int getGpsNum() const;
private:
QGeoPositionInfo lastPos;
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp
index 68f22fdc1..d2c105110 100644
--- a/qt-mobile/qmlmanager.cpp
+++ b/qt-mobile/qmlmanager.cpp
@@ -154,7 +154,8 @@ void QMLManager::applyGpsData()
QString QMLManager::logText() const
{
- return m_logText;
+ QString logText = m_logText + QString("\nNumer of GPS fixes: %1").arg(locationProvider->getGpsNum());
+ return logText;
}
void QMLManager::setLogText(const QString &logText)