diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/settings/qPrefCloudStorage.cpp | 22 | ||||
-rw-r--r-- | core/settings/qPrefCloudStorage.h | 8 |
2 files changed, 29 insertions, 1 deletions
diff --git a/core/settings/qPrefCloudStorage.cpp b/core/settings/qPrefCloudStorage.cpp index 675e379d6..24b73394b 100644 --- a/core/settings/qPrefCloudStorage.cpp +++ b/core/settings/qPrefCloudStorage.cpp @@ -78,7 +78,6 @@ HANDLE_PREFERENCE_INT(CloudStorage, "cloud_verification_status", cloud_verificat HANDLE_PREFERENCE_BOOL(CloudStorage, "save_password_local", save_password_local); - QString qPrefCloudStorage::diveshare_uid() { return qPrefPrivate::propValue(keyFromGroupAndName("", "diveshareExport/uid"), "").toString(); @@ -98,3 +97,24 @@ void qPrefCloudStorage::set_diveshare_private(bool value) qPrefPrivate::propSetValue(keyFromGroupAndName("", "diveshareExport/private"), value, false); emit instance()->diveshare_privateChanged(value); } + +QString qPrefCloudStorage::divelogde_user() +{ + return qPrefPrivate::propValue(keyFromGroupAndName("", "divelogde_user"), "").toString(); +} +void qPrefCloudStorage::set_divelogde_user(const QString &value) +{ + qPrefPrivate::propSetValue(keyFromGroupAndName("", "divelogde_user"), value, ""); + emit instance()->divelogde_userChanged(value); +} + + +QString qPrefCloudStorage::divelogde_pass() +{ + return qPrefPrivate::propValue(keyFromGroupAndName("", "divelogde_pass"), "").toString(); +} +void qPrefCloudStorage::set_divelogde_pass(const QString &value) +{ + qPrefPrivate::propSetValue(keyFromGroupAndName("", "divelogde_pass"), value, ""); + emit instance()->divelogde_passChanged(value); +} diff --git a/core/settings/qPrefCloudStorage.h b/core/settings/qPrefCloudStorage.h index 58aa3a175..025c155f6 100644 --- a/core/settings/qPrefCloudStorage.h +++ b/core/settings/qPrefCloudStorage.h @@ -19,6 +19,8 @@ class qPrefCloudStorage : public QObject { Q_PROPERTY(bool save_password_local READ save_password_local WRITE set_save_password_local NOTIFY save_password_localChanged) Q_PROPERTY(QString diveshare_userid READ diveshare_uid WRITE set_diveshare_uid NOTIFY diveshare_uidChanged); Q_PROPERTY(bool diveshare_private READ diveshare_private WRITE set_diveshare_private NOTIFY diveshare_privateChanged); + Q_PROPERTY(QString divelogde_user READ divelogde_user WRITE set_divelogde_user NOTIFY divelogde_userChanged); + Q_PROPERTY(QString divelogde_pass READ divelogde_pass WRITE set_divelogde_pass NOTIFY divelogde_passChanged); public: static qPrefCloudStorage *instance(); @@ -50,6 +52,8 @@ public: static bool save_password_local() { return prefs.save_password_local; } static QString diveshare_uid(); static bool diveshare_private(); + static QString divelogde_user(); + static QString divelogde_pass(); public slots: static void set_cloud_auto_sync(bool value); @@ -63,6 +67,8 @@ public slots: static void set_save_password_local(bool value); static void set_diveshare_uid(const QString &value); static void set_diveshare_private(bool value); + static void set_divelogde_user(const QString &value); + static void set_divelogde_pass(const QString &value); signals: void cloud_auto_syncChanged(bool value); @@ -76,6 +82,8 @@ signals: void save_password_localChanged(bool value); void diveshare_uidChanged(const QString &value); void diveshare_privateChanged(bool value); + void divelogde_userChanged(const QString &value); + void divelogde_passChanged(const QString &value); private: qPrefCloudStorage() {} |