diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-12-02 18:49:02 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-12-02 18:49:02 -0800 |
commit | f17041e1cb2e708e2968f7c313e7af559132ccc1 (patch) | |
tree | ca08bea947fb2a977a9e4bdb4d9b5a0e3e3b0e55 /qt-mobile/qmlmanager.h | |
parent | 789c32bf4ca93813095beefa9d0c4bc662a354d2 (diff) | |
download | subsurface-f17041e1cb2e708e2968f7c313e7af559132ccc1.tar.gz |
QML-UI: refuse to save to cloud unless you loaded from cloud, first
This prevents people from overwriting a perfectly fine repository with an empty
one. Typically happens when you first enter your cloud credentials and then
don't Load Dives right away.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile/qmlmanager.h')
-rw-r--r-- | qt-mobile/qmlmanager.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-mobile/qmlmanager.h b/qt-mobile/qmlmanager.h index 07a7b9f60..c76fce975 100644 --- a/qt-mobile/qmlmanager.h +++ b/qt-mobile/qmlmanager.h @@ -18,6 +18,7 @@ class QMLManager : public QObject Q_PROPERTY(bool locationServiceEnabled READ locationServiceEnabled WRITE setLocationServiceEnabled NOTIFY locationServiceEnabledChanged) Q_PROPERTY(int distanceThreshold READ distanceThreshold WRITE setDistanceThreshold NOTIFY distanceThresholdChanged) Q_PROPERTY(int timeThreshold READ timeThreshold WRITE setTimeThreshold NOTIFY timeThresholdChanged) + Q_PROPERTY(bool loadFromCloud READ loadFromCloud WRITE setLoadFromCloud NOTIFY loadFromCloudChanged) public: QMLManager(); ~QMLManager(); @@ -40,6 +41,9 @@ public: int timeThreshold() const; void setTimeThreshold(int time); + bool loadFromCloud() const; + void setLoadFromCloud(bool done); + QString logText() const; void setLogText(const QString &logText); void appendTextToLog(const QString &newText); @@ -64,6 +68,7 @@ private: int m_distanceThreshold; int m_timeThreshold; GpsLocation *locationProvider; + bool m_loadFromCloud; signals: void cloudUserNameChanged(); @@ -73,6 +78,7 @@ signals: void logTextChanged(); void timeThresholdChanged(); void distanceThresholdChanged(); + void loadFromCloudChanged(); }; #endif |