aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@intel.com>2016-01-13 17:13:10 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-01-15 05:53:59 -0800
commit5c62a0aac630adaf641ef59a65a28f0d84d6445b (patch)
tree3a580085a148eb1427dc9d51091161e601118174
parent9b37c6dfa142b73315f59980dc9aeed7c00a19c6 (diff)
downloadsubsurface-5c62a0aac630adaf641ef59a65a28f0d84d6445b.tar.gz
Settings QObjectification: minor cleanups
Rename a few methods wrongly named and place them on the correct place on the file. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--subsurface-core/subsurface-qt/SettingsObjectWrapper.cpp153
1 files changed, 77 insertions, 76 deletions
diff --git a/subsurface-core/subsurface-qt/SettingsObjectWrapper.cpp b/subsurface-core/subsurface-qt/SettingsObjectWrapper.cpp
index 7745f375b..edc3230f4 100644
--- a/subsurface-core/subsurface-qt/SettingsObjectWrapper.cpp
+++ b/subsurface-core/subsurface-qt/SettingsObjectWrapper.cpp
@@ -35,170 +35,171 @@ double PartialPressureGasSettings::pheThreshold() const
return prefs.pp_graphs.phe_threshold;
}
-double PartialPressureGasSettings:: modp02() const
+void PartialPressureGasSettings::setShowPo2(short value)
+{
+ QSettings s;
+ s.beginGroup(tecDetails);
+ s.setValue("po2graph", value);
+ prefs.pp_graphs.po2 = value;
+ emit showPo2Changed(value);
+}
+
+void PartialPressureGasSettings::setShowPn2(short value)
+{
+ QSettings s;
+ s.beginGroup(tecDetails);
+ s.setValue("pn2graph", value);
+ prefs.pp_graphs.pn2 = value;
+ emit showPn2Changed(value);
+}
+
+void PartialPressureGasSettings::setShowPhe(short value)
+{
+ QSettings s;
+ s.beginGroup(tecDetails);
+ s.setValue("phegraph", value);
+ prefs.pp_graphs.phe = value;
+ emit showPheChanged(value);
+}
+
+void PartialPressureGasSettings::setPo2Threshold(double value)
+{
+ QSettings s;
+ s.beginGroup(tecDetails);
+ s.setValue("po2threshold", value);
+ prefs.pp_graphs.po2_threshold = value;
+ emit po2ThresholdChanged(value);
+}
+
+void PartialPressureGasSettings::setPn2Threshold(double value)
+{
+ QSettings s;
+ s.beginGroup(tecDetails);
+ s.setValue("pn2threshold", value);
+ prefs.pp_graphs.pn2_threshold = value;
+ emit pn2ThresholdChanged(value);
+}
+
+void PartialPressureGasSettings::setPheThreshold(double value)
+{
+ QSettings s;
+ s.beginGroup(tecDetails);
+ s.setValue("phethreshold", value);
+ prefs.pp_graphs.phe_threshold = value;
+ emit pheThresholdChanged(value);
+}
+
+
+double TechnicalDetailsSettings:: modp02() const
{
return prefs.modpO2;
}
-short PartialPressureGasSettings::ead() const
+short TechnicalDetailsSettings::ead() const
{
return prefs.ead;
}
-short PartialPressureGasSettings::dcceiling() const
+short TechnicalDetailsSettings::dcceiling() const
{
return prefs.dcceiling;
}
-short PartialPressureGasSettings::redceiling() const
+short TechnicalDetailsSettings::redceiling() const
{
return prefs.redceiling;
}
-short PartialPressureGasSettings::calcceiling() const
+short TechnicalDetailsSettings::calcceiling() const
{
return prefs.calcceiling;
}
-short PartialPressureGasSettings::calcceiling3m() const
+short TechnicalDetailsSettings::calcceiling3m() const
{
return prefs.calcceiling3m;
}
-short PartialPressureGasSettings::calcalltissues() const
+short TechnicalDetailsSettings::calcalltissues() const
{
return prefs.calcalltissues;
}
-short PartialPressureGasSettings::calcndltts() const
+short TechnicalDetailsSettings::calcndltts() const
{
return prefs.calcndltts;
}
-short PartialPressureGasSettings::gflow() const
+short TechnicalDetailsSettings::gflow() const
{
return prefs.gflow;
}
-short PartialPressureGasSettings::gfhigh() const
+short TechnicalDetailsSettings::gfhigh() const
{
return prefs.gfhigh;
}
-short PartialPressureGasSettings::hrgraph() const
+short TechnicalDetailsSettings::hrgraph() const
{
return prefs.hrgraph;
}
-short PartialPressureGasSettings::tankBar() const
+short TechnicalDetailsSettings::tankBar() const
{
return prefs.tankbar;
}
-short PartialPressureGasSettings::percentageGraph() const
+short TechnicalDetailsSettings::percentageGraph() const
{
return prefs.percentagegraph;
}
-short PartialPressureGasSettings::rulerGraph() const
+short TechnicalDetailsSettings::rulerGraph() const
{
return prefs.rulergraph;
}
-bool PartialPressureGasSettings::showCCRSetpoint() const
+bool TechnicalDetailsSettings::showCCRSetpoint() const
{
return prefs.show_ccr_setpoint;
}
-bool PartialPressureGasSettings::showCCRSensors() const
+bool TechnicalDetailsSettings::showCCRSensors() const
{
return prefs.show_ccr_sensors;
}
-short PartialPressureGasSettings::zoomedPlot() const
+short TechnicalDetailsSettings::zoomedPlot() const
{
return prefs.zoomed_plot;
}
-short PartialPressureGasSettings::showSac() const
+short TechnicalDetailsSettings::showSac() const
{
return prefs.show_sac;
}
-bool PartialPressureGasSettings::gfLowAtMaxDepth() const
+bool TechnicalDetailsSettings::gfLowAtMaxDepth() const
{
return prefs.gf_low_at_maxdepth;
}
-short PartialPressureGasSettings::displayUnusedTanks() const
+short TechnicalDetailsSettings::displayUnusedTanks() const
{
return prefs.display_unused_tanks;
}
-short PartialPressureGasSettings::showAverageDepth() const
+short TechnicalDetailsSettings::showAverageDepth() const
{
return prefs.show_average_depth;
}
-short int PartialPressureGasSettings::mod() const
+short int TechnicalDetailsSettings::mod() const
{
return prefs.mod;
}
-void PartialPressureGasSettings::setShowPo2(short value)
-{
- QSettings s;
- s.beginGroup(tecDetails);
- s.setValue("po2graph", value);
- prefs.pp_graphs.po2 = value;
- emit showPo2Changed(value);
-}
-
-void PartialPressureGasSettings::setShowPn2(short value)
-{
- QSettings s;
- s.beginGroup(tecDetails);
- s.setValue("pn2graph", value);
- prefs.pp_graphs.pn2 = value;
- emit showPn2Changed(value);
-}
-
-void PartialPressureGasSettings::setShowPhe(short value)
-{
- QSettings s;
- s.beginGroup(tecDetails);
- s.setValue("phegraph", value);
- prefs.pp_graphs.phe = value;
- emit showPheChanged(value);
-}
-
-void PartialPressureGasSettings::setPo2Threshold(double value)
-{
- QSettings s;
- s.beginGroup(tecDetails);
- s.setValue("po2threshold", value);
- prefs.pp_graphs.po2_threshold = value;
- emit po2ThresholdChanged(value);
-}
-
-void PartialPressureGasSettings::setPn2Threshold(double value)
-{
- QSettings s;
- s.beginGroup(tecDetails);
- s.setValue("pn2threshold", value);
- prefs.pp_graphs.pn2_threshold = value;
- emit pn2ThresholdChanged(value);
-}
-
-void PartialPressureGasSettings::setPheThreshold(double value)
-{
- QSettings s;
- s.beginGroup(tecDetails);
- s.setValue("phethreshold", value);
- prefs.pp_graphs.phe_threshold = value;
- emit pheThresholdChanged(value);
-}
-
void TechnicalDetailsSettings::setModpO2(double value)
{
QSettings s;