summaryrefslogtreecommitdiffstats
path: root/subsurface-core/subsurface-qt/SettingsObjectWrapper.h
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2016-01-14 16:21:28 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-15 05:56:28 -0800
commit455f7bd51ba3a0b2be2dca01d936cd0073a6db36 (patch)
tree060206492dedd85450597a8223f8c6f960f3ea52 /subsurface-core/subsurface-qt/SettingsObjectWrapper.h
parent8e61c36ca737c49be2989816cda5dd66706fc4d9 (diff)
downloadsubsurface-455f7bd51ba3a0b2be2dca01d936cd0073a6db36.tar.gz
Settings QObjectification: unit system
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/subsurface-qt/SettingsObjectWrapper.h')
-rw-r--r--subsurface-core/subsurface-qt/SettingsObjectWrapper.h23
1 files changed, 17 insertions, 6 deletions
diff --git a/subsurface-core/subsurface-qt/SettingsObjectWrapper.h b/subsurface-core/subsurface-qt/SettingsObjectWrapper.h
index bf45a11b9..3275113ea 100644
--- a/subsurface-core/subsurface-qt/SettingsObjectWrapper.h
+++ b/subsurface-core/subsurface-qt/SettingsObjectWrapper.h
@@ -48,6 +48,7 @@ signals:
};
class TechnicalDetailsSettings : public QObject {
+ Q_OBJECT
Q_PROPERTY(double modpO2 READ modp02 WRITE setModp02 NOTIFY modpO2Changed)
Q_PROPERTY(short ead READ ead WRITE setEad NOTIFY eadChanged)
Q_PROPERTY(short mod READ mod WRITE setMod NOTIFY modChanged);
@@ -254,7 +255,7 @@ class CloudStorageSettings : public QObject {
Q_PROPERTY(QString email READ email WRITE setEmail NOTIFY emailChanged)
Q_PROPERTY(QString email_encoded READ emailEncoded WRITE setEmailEncoded NOTIFY emailEncodedChanged)
Q_PROPERTY(QString userid READ userId WRITE setUserId NOTIFY userIdChanged)
- Q_PROPERTY(QString base_url READ baseUrl WRITE setBaseURL NOTIFY baseUrlChanged)
+ Q_PROPERTY(QString base_url READ baseUrl WRITE setBaseUrl NOTIFY baseUrlChanged)
Q_PROPERTY(QString git_url READ gitUrl WRITE setGitUrl NOTIFY gitUrlChanged)
Q_PROPERTY(bool save_password_local READ savePasswordLocal WRITE setSavePasswordLocal NOTIFY savePasswordLocalChanged)
Q_PROPERTY(short verification_status READ verificationStatus WRITE setVerificationStatus NOTIFY verificationStatusChanged)
@@ -279,7 +280,7 @@ public slots:
void setEmailEncoded(const QString& value);
void setUserId(const QString& value);
void setBaseUrl(const QString& value);
- void setCloudUrl(const QString& value);
+ void setGitUrl(const QString& value);
void setSavePasswordLocal(bool value);
void setVerificationStatus(short value);
void setBackgroundSync(bool value);
@@ -300,6 +301,7 @@ private:
};
class DivePlannerSettings : public QObject {
+ Q_OBJECT
Q_PROPERTY(bool last_stop READ lastStop WRITE setLastStop NOTIFY lastStopChanged)
Q_PROPERTY(bool verbatim_plan READ verbatimPlan WRITE setVerbatimPlan NOTIFY verbatimPlanChanged)
Q_PROPERTY(bool display_runtime READ displayRuntime WRITE setDisplayRuntime NOTIFY displayRuntimeChanged)
@@ -403,6 +405,19 @@ private:
* grab the Q_PROPERTYES and create a wrapper class like the ones above.
*/
+class UnitsSettings : public QObject {
+ Q_OBJECT
+ Q_PROPERTY(units::length length READ divelistFont WRITE setDivelistFont NOTIFY divelistFontChanged)
+ Q_PROPERTY(units::pressure pressure READ defaultFilename WRITE setDefaultFilename NOTIFY defaultFilenameChanged)
+ Q_PROPERTY(units::volume volume READ defaultCylinder WRITE setDefaultCylinder NOTIFY defaultCylinderChanged)
+ Q_PROPERTY(units::temperature temperature READ timeFormat WRITE setTimeFormat NOTIFY timeFormatChanged)
+ Q_PROPERTY(units::weight weight READ dateFormat WRITE setDateFormat NOTIFY dateFormatChanged)
+ Q_PROPERTY(units::vertical_speed_time vertical_speed_time READ dateFormatShort WRITE setDateFormatShort NOTIFY dateFormatShortChanged)
+ Q_PROPERTY(QString unit_system READ unitSystem WRITE setUnitSystem NOTIFY unitSystemChanged)
+ Q_PROPERTY(bool coordinates_traditional READ coordinatesTraditional WRITE setCoordinatesTraditional NOTIFY coordinatesTraditionalChanged)
+
+};
+
class SettingsObjectWrapper : public QObject {
Q_OBJECT
Q_PROPERTY(QString divelist_font READ divelistFont WRITE setDivelistFont NOTIFY divelistFontChanged)
@@ -436,10 +451,6 @@ class SettingsObjectWrapper : public QObject {
ProxySettings *proxy;
CloudStorageSettings *cloud_storage;
DivePlannerSettings *planner_settings;
- // Units
- struct units units;
-
-
public:
SettingsObjectWrapper(QObject *parent = NULL);