From 76d07635270bb3068b7d9a559b481d3c094f0d7b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 14 Nov 2015 09:10:06 -0800 Subject: Location service: make distance and time threshold configurable Right now the distance is always in meters, the mobile app doesn't deal with units at all, anyway. Signed-off-by: Dirk Hohndel --- qt-mobile/qmlmanager.h | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'qt-mobile/qmlmanager.h') diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h index b71dcfec5..1d5f8e412 100644 --- a/qt-mobile/qmlmanager.h +++ b/qt-mobile/qmlmanager.h @@ -17,6 +17,8 @@ class QMLManager : public QObject Q_PROPERTY(QString logText READ logText WRITE setLogText NOTIFY logTextChanged) Q_PROPERTY(bool locationServiceEnabled READ locationServiceEnabled WRITE setLocationServiceEnabled NOTIFY locationServiceEnabledChanged) Q_PROPERTY(QString ssrfGpsWebUserid READ ssrfGpsWebUserid WRITE setSsrfGpsWebUserid NOTIFY ssrfGpsWebUseridChanged) + Q_PROPERTY(int distanceThreshold READ distanceThreshold WRITE setDistanceThreshold NOTIFY distanceThresholdChanged) + Q_PROPERTY(int timeThreshold READ timeThreshold WRITE setTimeThreshold NOTIFY timeThresholdChanged) public: QMLManager(); ~QMLManager(); @@ -27,15 +29,21 @@ public: QString cloudPassword() const; void setCloudPassword(const QString &cloudPassword); - QString ssrfGpsWebUserid() const; - void setSsrfGpsWebUserid(const QString &userid); - bool saveCloudPassword() const; void setSaveCloudPassword(bool saveCloudPassword); + QString ssrfGpsWebUserid() const; + void setSsrfGpsWebUserid(const QString &userid); + bool locationServiceEnabled() const; void setLocationServiceEnabled(bool locationServiceEnable); + int distanceThreshold() const; + void setDistanceThreshold(int distance); + + int timeThreshold() const; + void setTimeThreshold(int time); + QString logText() const; void setLogText(const QString &logText); void appendTextToLog(const QString &newText); @@ -57,6 +65,8 @@ private: bool m_saveCloudPassword; QString m_logText; bool m_locationServiceEnabled; + int m_distanceThreshold; + int m_timeThreshold; GpsLocation *locationProvider; signals: @@ -66,6 +76,8 @@ signals: void saveCloudPasswordChanged(); void locationServiceEnabledChanged(); void logTextChanged(); + void timeThresholdChanged(); + void distanceThresholdChanged(); }; #endif -- cgit v1.2.3-70-g09d2