diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2016-01-11 19:58:33 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-01-11 15:47:07 -0800 |
commit | e897d2c463f52f88aa8dd5fdf92bb1a4c1d2c3fc (patch) | |
tree | be2f4758d5c0cfa733d79813280c95f6644c5f57 /subsurface-core/subsurface-qt | |
parent | 525fe51f5d49f57929b861f8eaecd83016245f16 (diff) | |
download | subsurface-e897d2c463f52f88aa8dd5fdf92bb1a4c1d2c3fc.tar.gz |
Implement more reader accessors for PartialPressureGasSettings
Also, the QtHelper.cpp file told me that some propertiies
where also TecDetails, graph related, so I moved them
to the correct preferences.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'subsurface-core/subsurface-qt')
-rw-r--r-- | subsurface-core/subsurface-qt/SettingsObjectWrapper.cpp | 105 | ||||
-rw-r--r-- | subsurface-core/subsurface-qt/SettingsObjectWrapper.h | 69 |
2 files changed, 149 insertions, 25 deletions
diff --git a/subsurface-core/subsurface-qt/SettingsObjectWrapper.cpp b/subsurface-core/subsurface-qt/SettingsObjectWrapper.cpp index 551db302c..a08e6aec1 100644 --- a/subsurface-core/subsurface-qt/SettingsObjectWrapper.cpp +++ b/subsurface-core/subsurface-qt/SettingsObjectWrapper.cpp @@ -33,6 +33,111 @@ double PartialPressureGasSettings::pheThreshold() const return prefs.pp_graphs.phe_threshold; } +double PartialPressureGasSettings:: modp02() const +{ + return prefs.modpO2; +} + +short PartialPressureGasSettings::ead() const +{ + return prefs.ead; +} + +short PartialPressureGasSettings::dcceiling() const +{ + return prefs.dcceiling; +} + +short PartialPressureGasSettings::redceiling() const +{ + return prefs.redceiling; +} + +short PartialPressureGasSettings::calcceiling() const +{ + return prefs.calcceiling; +} + +short PartialPressureGasSettings::calcceiling3m() const +{ + return prefs.calcceiling3m; +} + +short PartialPressureGasSettings::calcalltissues() const +{ + return prefs.calcalltissues; +} + +short PartialPressureGasSettings::calcndltts() const +{ + return prefs.calcndltts; +} + +short PartialPressureGasSettings::gflow() const +{ + return prefs.gflow; +} + +short PartialPressureGasSettings::gfhigh() const +{ + return prefs.gfhigh; +} + +short PartialPressureGasSettings::hrgraph() const +{ + return prefs.hrgraph; +} + +short PartialPressureGasSettings::tankBar() const +{ + return prefs.tankbar; +} + +short PartialPressureGasSettings::percentageGraph() const +{ + return prefs.percentagegraph; +} + +short PartialPressureGasSettings::rulerGraph() const +{ + return prefs.rulergraph; +} + +bool PartialPressureGasSettings::showCCRSetpoint() const +{ + return prefs.show_ccr_setpoint; +} + +bool PartialPressureGasSettings::showCCRSensors() const +{ + return prefs.show_ccr_sensors; +} + +short PartialPressureGasSettings::zoomedPlot() const +{ + return prefs.zoomed_plot; +} + +short PartialPressureGasSettings::showSac() const +{ + return prefs.show_sac; +} + +bool PartialPressureGasSettings::gfLowAtMaxDepth() const +{ + return prefs.gf_low_at_maxdepth; +} + +short PartialPressureGasSettings::displayUnusedTanks() const +{ + return prefs.display_unused_tanks; +} + +short PartialPressureGasSettings::showAverageDepth() const +{ + return prefs.show_average_depth; +} + void PartialPressureGasSettings::setShowPo2(short value) { QSettings s; diff --git a/subsurface-core/subsurface-qt/SettingsObjectWrapper.h b/subsurface-core/subsurface-qt/SettingsObjectWrapper.h index f3cf0ec12..e276dcb29 100644 --- a/subsurface-core/subsurface-qt/SettingsObjectWrapper.h +++ b/subsurface-core/subsurface-qt/SettingsObjectWrapper.h @@ -20,6 +20,28 @@ class PartialPressureGasSettings : public QObject { Q_PROPERTY(double po2_threshold READ po2Threshold WRITE setPo2Threshold NOTIFY po2ThresholdChanged) Q_PROPERTY(double pn2_threshold READ pn2Threshold WRITE setPn2Threshold NOTIFY pn2ThresholdChanged) Q_PROPERTY(double phe_threshold READ pheThreshold WRITE setPheThreshold NOTIFY pheThresholdChanged) + Q_PROPERTY(double modpO2 READ modp02 WRITE setModp02 NOTIFY modpO2Changed) + Q_PROPERTY(short ead READ ead WRITE setEad NOTIFY eadChanged) + Q_PROPERTY(short dcceiling READ dcceiling WRITE setDCceiling NOTIFY dcceilingChanged) + Q_PROPERTY(short redceiling READ redceiling WRITE setRedceiling NOTIFY redceilingChanged) + Q_PROPERTY(short calcceiling READ calcceiling WRITE setCalcceiling NOTIFY calcceilingChanged) + Q_PROPERTY(short calcceiling3m READ calcceiling3m WRITE setCalcceiling3m NOTIFY calcceiling3mChanged) + Q_PROPERTY(short calcalltissues READ calcalltissues WRITE setCalcalltissues NOTIFY calcalltissuesChanged) + Q_PROPERTY(short calcndltts READ calcndltts WRITE setCalcndltts NOTIFY calcndlttsChanged) + Q_PROPERTY(short gflow READ gflow WRITE setGflow NOTIFY gflowChanged) + Q_PROPERTY(short gfhigh READ gfhigh WRITE setGfhigh NOTIFY gfhighChanged) + Q_PROPERTY(short hrgraph READ hrgraph WRITE setHRgraph NOTIFY hrgraphChanged) + Q_PROPERTY(short tankbar READ tankBar WRITE setTankBar NOTIFY tankBarChanged) + Q_PROPERTY(short percentagegraph READ percentageGraph WRITE setPercentageGraph NOTIFY percentageGraphChanged) + Q_PROPERTY(short rulergraph READ rulerGraph WRITE setRulerGraph NOTIFY rulerGraphChanged) + Q_PROPERTY(bool show_ccr_setpoint READ showCCRSetpoint WRITE setShowCCRSetpoint NOTIFY showCCRSetpointChanged) + Q_PROPERTY(bool show_ccr_sensors READ showCCRSensors WRITE setShowCCRSensors NOTIFY showCCRSensorsChanged) + Q_PROPERTY(short zoomed_plot READ zoomedPlot WRITE setZoomedPlot NOTIFY zoomedPlotChanged) + Q_PROPERTY(short show_sac READ showSac WRITE setShowSac NOTIFY showSacChanged) + Q_PROPERTY(bool gf_low_at_maxdepth READ gfLowAtMaxDepth WRITE setGfLowAtMaxDepth NOTIFY gfLowAtMaxDepthChanged) + Q_PROPERTY(short display_unused_tanks READ displayUnusedTanks WRITE setDisplayUnusedTanks NOTIFY displayUnusedTanksChanged) + Q_PROPERTY(short show_average_depth READ showAverageDepth WRITE setShowAverageDepth NOTIFY showAverageDepthChanged) + public: PartialPressureGasSettings(QObject *parent); short showPo2() const; @@ -28,6 +50,28 @@ public: double po2Threshold() const; double pn2Threshold() const; double pheThreshold() const; + double modp02() const; + short ead() const; + short dcceiling() const; + short redceiling() const; + short calcceiling() const; + short calcceiling3m() const; + short calcalltissues() const; + short calcndltts() const; + short gflow() const; + short gfhigh() const; + short hrgraph() const; + short tankBar() const; + short percentageGraph() const; + short rulerGraph() const; + bool showCCRSetpoint() const; + bool showCCRSensors() const; + short zoomedPlot() const; + short showSac() const; + bool gfLowAtMaxDepth() const; + short displayUnusedTanks() const; + short showAverageDepth() const; + public slots: void setShowPo2(short value); void setShowPn2(short value); @@ -109,34 +153,10 @@ class SettingsObjectWrapper : public QObject { Q_PROPERTY(bool date_format_override READ dateFormatOverride WRITE setDateFormatOverride NOTIFY dateFormatOverrideChanged) Q_PROPERTY(double font_size READ fontSize WRITE setFontSize NOTIFY fontSizeChanged) Q_PROPERTY(short mod READ mod WRITE setMod NOTIFY modChanged); - - Q_PROPERTY(double modpO2 READ modp02 WRITE setModp02 NOTIFY modpO2Changed) - Q_PROPERTY(short ead READ ead WRITE setEad NOTIFY eadChanged) - Q_PROPERTY(short dcceiling READ dcceiling WRITE setDCceiling NOTIFY dcceilingChanged) - Q_PROPERTY(short redceiling READ redceiling WRITE setRedceiling NOTIFY redceilingChanged) - Q_PROPERTY(short calcceiling READ calcceiling WRITE setCalcceiling NOTIFY calcceilingChanged) - Q_PROPERTY(short calcceiling3m READ calcceiling3m WRITE setCalcceiling3m NOTIFY calcceiling3mChanged) - Q_PROPERTY(short calcalltissues READ calcalltissues WRITE setCalcalltissues NOTIFY calcalltissuesChanged) - Q_PROPERTY(short calcndltts READ calcndltts WRITE setCalcndltts NOTIFY calcndlttsChanged) - Q_PROPERTY(short gflow READ gflow WRITE setGflow NOTIFY gflowChanged) - Q_PROPERTY(short gfhigh READ gfhigh WRITE setGfhigh NOTIFY gfhighChanged) Q_PROPERTY(int animation_speed READ animationSpeed WRITE setAnimationSpeed NOTIFY animationSpeedChanged) - - Q_PROPERTY(bool gf_low_at_maxdepth READ gfLowAtMaxDepth WRITE setGfLowAtMaxDepth NOTIFY gfLowAtMaxDepthChanged) - Q_PROPERTY(bool show_ccr_setpoint READ showCCRSetpoint WRITE setShowCCRSetpoint NOTIFY showCCRSetpointChanged) - Q_PROPERTY(bool show_ccr_sensors READ showCCRSensors WRITE setShowCCRSensors NOTIFY showCCRSensorsChanged) Q_PROPERTY(short display_invalid_dives READ displayInvalidDives WRITE setDisplayInvalidDives NOTIFY displayInvalidDivesChanged) 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 show_sac READ showSac WRITE setShowSac NOTIFY showSacChanged) - Q_PROPERTY(short display_unused_tanks READ displayUnusedTanks WRITE setDisplayUnusedTanks NOTIFY displayUnusedTanksChanged) - Q_PROPERTY(short show_average_depth READ showAverageDepth WRITE setShowAverageDepth NOTIFY showAverageDepthChanged) - - Q_PROPERTY(short zoomed_plot READ zoomedPlot WRITE setZoomedPlot NOTIFY zoomedPlotChanged) - Q_PROPERTY(short hrgraph READ hrgraph WRITE setHRgraph NOTIFY hrgraphChanged) - Q_PROPERTY(short percentagegraph READ percentageGraph WRITE setPercentageGraph NOTIFY percentageGraphChanged) - Q_PROPERTY(short rulergraph READ rulerGraph WRITE setRulerGraph NOTIFY rulerGraphChanged) - Q_PROPERTY(short tankbar READ tankBar WRITE setTankBar NOTIFY tankBarChanged) Q_PROPERTY(short save_userid_local READ saveUserIdLocal WRITE setSaveUserIdLocal NOTIFY saveUserIdLocalChanged) Q_PROPERTY(QString userid READ userId WRITE setUserId NOTIFY userIdChanged) Q_PROPERTY(int ascrate75 READ ascrate75 WRITE setAscrate75 NOTIFY ascrate75Changed) @@ -150,7 +170,6 @@ class SettingsObjectWrapper : public QObject { Q_PROPERTY(bool drop_stone_mode READ dropStoneMode WRITE setDropStoneMode NOTIFY dropStoneModeChanged) 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) Q_PROPERTY(bool display_duration READ displayDuration WRITE setDisplayDuration NOTIFY displayDurationChanged) Q_PROPERTY(bool display_transitions READ displayTransitions WRITE setDisplayTransitions NOTIFY displayTransitionsChanged) |