diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2016-01-22 15:39:40 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-01-24 21:26:35 -0800 |
commit | e7412b11b99a67c4beb8841f6bca763519553f9d (patch) | |
tree | 382b9639bae09bdb361f61a24471c9b364c9f22e /subsurface-core/subsurface-qt/SettingsObjectWrapper.h | |
parent | df6eff917c351221c7c48557803f16ea5872f599 (diff) | |
download | subsurface-e7412b11b99a67c4beb8841f6bca763519553f9d.tar.gz |
Added a GeneralSettingsWrapper
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.h | 50 |
1 files changed, 43 insertions, 7 deletions
diff --git a/subsurface-core/subsurface-qt/SettingsObjectWrapper.h b/subsurface-core/subsurface-qt/SettingsObjectWrapper.h index c0d0cabd7..fd8cdac67 100644 --- a/subsurface-core/subsurface-qt/SettingsObjectWrapper.h +++ b/subsurface-core/subsurface-qt/SettingsObjectWrapper.h @@ -450,11 +450,51 @@ private: QString group; }; +class GeneralSettingsObjectWrapper : public QObject { + Q_OBJECT + Q_PROPERTY(QString default_filename READ defaultFilename WRITE setDefaultFilename NOTIFY defaultFilenameChanged) + Q_PROPERTY(QString default_cylinder READ defaultCylinder WRITE setDefaultCylinder NOTIFY defaultCylinderChanged) + Q_PROPERTY(short default_file_behavior READ defaultFileBehavior WRITE setDefaultFileBehavior NOTIFY defaultFileBehaviorChanged) + Q_PROPERTY(bool use_default_file READ useDefaultFile WRITE setUseDefaultFile NOTIFY useDefaultFileChanged) + Q_PROPERTY(int defaultsetpoint READ defaultSetPoint WRITE setDefaultSetPoint NOTIFY defaultSetPointChanged) + Q_PROPERTY(int o2consumption READ o2Consumption WRITE setO2Consumption NOTIFY o2ConsumptionChanged) + Q_PROPERTY(int pscr_ratio READ pscrRatio WRITE setPscrRatio NOTIFY pscrRatioChanged) + +public: + GeneralSettingsObjectWrapper(QObject *parent); + QString defaultFilename() const; + QString defaultCylinder() const; + short defaultFileBehavior() const; + bool useDefaultFile() const; + int defaultSetPoint() const; + int o2Consumption() const; + int pscrRatio() const; + +public slots: + void setDefaultFilename (const QString& value); + void setDefaultCylinder (const QString& value); + void setDefaultFileBehavior (short value); + void setUseDefaultFile (bool value); + void setDefaultSetPoint (int value); + void setO2Consumption (int value); + void setPscrRatio (int value); + +signals: + void defaultFilenameChanged(const QString& value); + void defaultCylinderChanged(const QString& value); + void defaultFileBehaviorChanged(short value); + void useDefaultFileChanged(bool value); + void defaultSetPointChanged(int value); + void o2ConsumptionChanged(int value); + void pscrRatioChanged(int value); +private: + QString group; + +}; + class SettingsObjectWrapper : public QObject { Q_OBJECT Q_PROPERTY(QString divelist_font READ divelistFont WRITE setDivelistFont NOTIFY divelistFontChanged) - Q_PROPERTY(QString default_filename READ defaultFilename WRITE setDefaultFilename NOTIFY defaultFilenameChanged) - Q_PROPERTY(QString default_cylinder READ defaultCylinder WRITE setDefaultCylinder NOTIFY defaultCylinderChanged) Q_PROPERTY(QString time_format READ timeFormat WRITE setTimeFormat NOTIFY timeFormatChanged) Q_PROPERTY(QString date_format READ dateFormat WRITE setDateFormat NOTIFY dateFormatChanged) Q_PROPERTY(QString date_format_short READ dateFormatShort WRITE setDateFormatShort NOTIFY dateFormatShortChanged) @@ -466,12 +506,7 @@ class SettingsObjectWrapper : public QObject { Q_PROPERTY(short unit_system READ unitSystem WRITE setUnitSystem NOTIFY uintSystemChanged) Q_PROPERTY(bool coordinates_traditional READ coordinatesTraditional WRITE setCoordinatesTraditional NOTIFY coordinatesTraditionalChanged) Q_PROPERTY(short save_userid_local READ saveUserIdLocal WRITE setSaveUserIdLocal NOTIFY saveUserIdLocalChanged) - Q_PROPERTY(int o2consumption READ o2Consumption WRITE setO2Consumption NOTIFY o2ConsumptionChanged) - Q_PROPERTY(int pscr_ratio READ pscrRatio WRITE setPscrRatio NOTIFY pscrRatioChanged) - Q_PROPERTY(int defaultsetpoint READ defaultSetPoint WRITE setDefaultSetPoint NOTIFY defaultSetPointChanged) Q_PROPERTY(bool show_pictures_in_profile READ showPicturesInProfile WRITE setShowPicturesInProfile NOTIFY showPicturesInProfileChanged) - Q_PROPERTY(bool use_default_file READ useDefaultFile WRITE setUseDefaultFile NOTIFY useDefaultFileChanged) - Q_PROPERTY(short default_file_behavior READ defaultFileBehavior WRITE setDefaultFileBehavior NOTIFY defaultFileBehaviorChanged) Q_PROPERTY(int time_threshold READ timeThreshold WRITE setTimeThreshold NOTIFY timeThresholdChanged) Q_PROPERTY(int distance_threshold READ distanceThreshold WRITE setDistanceThreshold NOTIFY distanceThresholdChanged) Q_PROPERTY(bool git_local_only READ gitLocalOnly WRITE setGitLocalOnly NOTIFY gitLocalOnlyChanged) @@ -484,6 +519,7 @@ class SettingsObjectWrapper : public QObject { CloudStorageSettings *cloud_storage; DivePlannerSettings *planner_settings; UnitsSettings *unit_settings; + GeneralSettingsObjectWrapper *general_settings; public: SettingsObjectWrapper(QObject *parent = NULL); }; |