diff options
author | jan Iversen <jani@apache.org> | 2018-06-13 18:06:11 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-06-15 14:12:14 -0700 |
commit | b8eb348f546291c49e2d606649b3c85d23e43782 (patch) | |
tree | 8ca54d1f5aa363496de4b83e1b6200b92304a8a3 /mobile-widgets/qmlmanager.h | |
parent | 62ca5e90e13d65235d3cd53feffd0cb62cfbac43 (diff) | |
download | subsurface-b8eb348f546291c49e2d606649b3c85d23e43782.tar.gz |
mobile: move settings from qmlmanager to qmlprefs
add settings variables/functions to qmlprefs
remove settings variables/functions from qmlmanager
change manager. to prefs. in qml files for setting variables/functions
Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets/qmlmanager.h')
-rw-r--r-- | mobile-widgets/qmlmanager.h | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/mobile-widgets/qmlmanager.h b/mobile-widgets/qmlmanager.h index 6de279b4b..abc497e0c 100644 --- a/mobile-widgets/qmlmanager.h +++ b/mobile-widgets/qmlmanager.h @@ -21,21 +21,12 @@ class QMLManager : public QObject { Q_OBJECT - Q_ENUMS(cloud_status_qml) - Q_PROPERTY(QString cloudUserName MEMBER m_cloudUserName WRITE setCloudUserName NOTIFY cloudUserNameChanged) - Q_PROPERTY(QString cloudPassword MEMBER m_cloudPassword WRITE setCloudPassword NOTIFY cloudPasswordChanged) - Q_PROPERTY(QString cloudPin MEMBER m_cloudPin WRITE setCloudPin NOTIFY cloudPinChanged) Q_PROPERTY(QString logText READ logText WRITE setLogText NOTIFY logTextChanged) Q_PROPERTY(bool locationServiceEnabled MEMBER m_locationServiceEnabled WRITE setLocationServiceEnabled NOTIFY locationServiceEnabledChanged) Q_PROPERTY(bool locationServiceAvailable MEMBER m_locationServiceAvailable WRITE setLocationServiceAvailable NOTIFY locationServiceAvailableChanged) - Q_PROPERTY(int distanceThreshold MEMBER m_distanceThreshold WRITE setDistanceThreshold NOTIFY distanceThresholdChanged) - Q_PROPERTY(int timeThreshold MEMBER m_timeThreshold WRITE setTimeThreshold NOTIFY timeThresholdChanged) - Q_PROPERTY(QString theme READ theme WRITE setTheme NOTIFY themeChanged) Q_PROPERTY(bool loadFromCloud MEMBER m_loadFromCloud WRITE setLoadFromCloud NOTIFY loadFromCloudChanged) Q_PROPERTY(QString startPageText MEMBER m_startPageText WRITE setStartPageText NOTIFY startPageTextChanged) Q_PROPERTY(bool verboseEnabled MEMBER m_verboseEnabled WRITE setVerboseEnabled NOTIFY verboseEnabledChanged) - Q_PROPERTY(cloud_status_qml credentialStatus MEMBER m_credentialStatus WRITE setCredentialStatus NOTIFY credentialStatusChanged) - Q_PROPERTY(cloud_status_qml oldStatus MEMBER m_oldStatus WRITE setOldStatus NOTIFY oldStatusChanged) Q_PROPERTY(QString notificationText MEMBER m_notificationText WRITE setNotificationText NOTIFY notificationTextChanged) Q_PROPERTY(bool syncToCloud MEMBER m_syncToCloud WRITE setSyncToCloud NOTIFY syncToCloudChanged) Q_PROPERTY(int updateSelectedDive MEMBER m_updateSelectedDive WRITE setUpdateSelectedDive NOTIFY updateSelectedDiveChanged) @@ -45,9 +36,7 @@ class QMLManager : public QObject { Q_PROPERTY(QStringList divemasterList READ divemasterList NOTIFY divemasterListChanged) Q_PROPERTY(QStringList locationList READ locationList NOTIFY locationListChanged) Q_PROPERTY(QStringList cylinderInit READ cylinderInit CONSTANT) - Q_PROPERTY(bool showPin MEMBER m_showPin WRITE setShowPin NOTIFY showPinChanged) Q_PROPERTY(QString progressMessage MEMBER m_progressMessage WRITE setProgressMessage NOTIFY progressMessageChanged) - Q_PROPERTY(bool developer MEMBER m_developer WRITE setDeveloper NOTIFY developerChanged) Q_PROPERTY(bool btEnabled MEMBER m_btEnabled WRITE setBtEnabled NOTIFY btEnabledChanged) Q_PROPERTY(QString DC_vendor READ DC_vendor WRITE DC_setVendor) @@ -106,27 +95,10 @@ public: Q_INVOKABLE int getDetectedVendorIndex(); Q_INVOKABLE int getDetectedProductIndex(const QString ¤tVendorText); public: - enum cloud_status_qml { - CS_UNKNOWN, - CS_INCORRECT_USER_PASSWD, - CS_NEED_TO_VERIFY, - CS_VERIFIED, - CS_NOCLOUD - }; - static QMLManager *instance(); Q_INVOKABLE void registerError(QString error); QString consumeError(); - QString cloudUserName() const; - void setCloudUserName(const QString &cloudUserName); - - QString cloudPassword() const; - void setCloudPassword(const QString &cloudPassword); - - QString cloudPin() const; - void setCloudPin(const QString &cloudPin); - bool locationServiceEnabled() const; void setLocationServiceEnabled(bool locationServiceEnable); @@ -136,15 +108,6 @@ public: bool verboseEnabled() const; void setVerboseEnabled(bool verboseMode); - int distanceThreshold() const; - void setDistanceThreshold(int distance); - - int timeThreshold() const; - void setTimeThreshold(int time); - - QString theme() const; - void setTheme(QString theme); - bool loadFromCloud() const; void setLoadFromCloud(bool done); void syncLoadFromCloud(); @@ -152,12 +115,6 @@ public: QString startPageText() const; void setStartPageText(const QString& text); - cloud_status_qml credentialStatus() const; - void setCredentialStatus(const cloud_status_qml value); - - cloud_status_qml oldStatus() const; - void setOldStatus(const cloud_status_qml value); - QString logText() const; void setLogText(const QString &logText); @@ -176,9 +133,6 @@ public: QString progressMessage() const; void setProgressMessage(QString text); - bool developer() const; - void setDeveloper(bool value); - bool btEnabled() const; void setBtEnabled(bool value); @@ -189,8 +143,6 @@ public: QStringList divemasterList() const; QStringList locationList() const; QStringList cylinderInit() const; - bool showPin() const; - void setShowPin(bool enable); Q_INVOKABLE void setStatusbarColor(QColor color); void btHostModeChange(QBluetoothLocalDevice::HostMode state); @@ -227,8 +179,6 @@ public slots: void populateGpsData(); void cancelDownloadDC(); void clearGpsData(); - void clearCredentials(); - void cancelCredentialsPinSetup(); void copyAppLogToClipboard(); void finishSetup(); void openLocalThenRemote(QString url); @@ -256,9 +206,6 @@ private: SuitCompletionModel suitModel; DiveMasterCompletionModel divemasterModel; LocationInformationModel locationModel; - QString m_cloudUserName; - QString m_cloudPassword; - QString m_cloudPin; QString m_ssrfGpsWebUserid; QString m_startPageText; QString m_logText; @@ -266,8 +213,6 @@ private: bool m_locationServiceEnabled; bool m_locationServiceAvailable; bool m_verboseEnabled; - int m_distanceThreshold; - int m_timeThreshold; GpsLocation *locationProvider; bool m_loadFromCloud; static QMLManager *m_instance; @@ -277,8 +222,6 @@ private: bool m_syncToCloud; int m_updateSelectedDive; int m_selectedDiveTimestamp; - cloud_status_qml m_credentialStatus; - cloud_status_qml m_oldStatus; qreal m_lastDevicePixelRatio; QElapsedTimer timer; bool alreadySaving; @@ -287,10 +230,8 @@ private: bool checkDuration(DiveObjectHelper *myDive, struct dive *d, QString duration); bool checkDepth(DiveObjectHelper *myDive, struct dive *d, QString depth); bool currentGitLocalOnly; - bool m_showPin; Q_INVOKABLE DCDeviceData *m_device_data; QString m_progressMessage; - bool m_developer; bool m_btEnabled; void updateAllGlobalLists(); @@ -301,28 +242,18 @@ private: #endif signals: - void cloudUserNameChanged(); - void cloudPasswordChanged(); - void cloudPinChanged(); void locationServiceEnabledChanged(); void locationServiceAvailableChanged(); void verboseEnabledChanged(); void logTextChanged(); - void timeThresholdChanged(); - void themeChanged(); - void distanceThresholdChanged(); void loadFromCloudChanged(); void startPageTextChanged(); - void credentialStatusChanged(); - void oldStatusChanged(); void notificationTextChanged(); void syncToCloudChanged(); void updateSelectedDiveChanged(); void selectedDiveTimestampChanged(); - void showPinChanged(); void sendScreenChanged(QScreen *screen); void progressMessageChanged(); - void developerChanged(); void btEnabledChanged(); void suitListChanged(); void buddyListChanged(); |