diff options
author | Rick Walsh <rickmwalsh@gmail.com> | 2016-09-02 07:52:17 +1000 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-09-04 07:29:42 -0700 |
commit | 7b3665827a3fdf6717be5419b41641d8e2d95c93 (patch) | |
tree | e7aa2c13f56ac42136b0a3c95e0e622effc3dabf /core | |
parent | d8a6b917a5ec2d3be40908864d74faed8b0e47b2 (diff) | |
download | subsurface-7b3665827a3fdf6717be5419b41641d8e2d95c93.tar.gz |
Settings fixup: gflow and gfhigh are int
With the recent setting cleanup, gradient factors were set to bool, so were
saved as 1/1, rather than say 50/80. This commit fixes that.
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/subsurface-qt/SettingsObjectWrapper.cpp | 8 | ||||
-rw-r--r-- | core/subsurface-qt/SettingsObjectWrapper.h | 16 |
2 files changed, 12 insertions, 12 deletions
diff --git a/core/subsurface-qt/SettingsObjectWrapper.cpp b/core/subsurface-qt/SettingsObjectWrapper.cpp index a329e0452..8c8762b65 100644 --- a/core/subsurface-qt/SettingsObjectWrapper.cpp +++ b/core/subsurface-qt/SettingsObjectWrapper.cpp @@ -301,12 +301,12 @@ bool TechnicalDetailsSettings::calcndltts() const return prefs.calcndltts; } -bool TechnicalDetailsSettings::gflow() const +int TechnicalDetailsSettings::gflow() const { return prefs.gflow; } -bool TechnicalDetailsSettings::gfhigh() const +int TechnicalDetailsSettings::gfhigh() const { return prefs.gfhigh; } @@ -496,7 +496,7 @@ void TechnicalDetailsSettings::setCalcndltts(bool value) emit calcndlttsChanged(value); } -void TechnicalDetailsSettings::setGflow(bool value) +void TechnicalDetailsSettings::setGflow(int value) { if (value == prefs.gflow) return; @@ -509,7 +509,7 @@ void TechnicalDetailsSettings::setGflow(bool value) emit gflowChanged(value); } -void TechnicalDetailsSettings::setGfhigh(bool value) +void TechnicalDetailsSettings::setGfhigh(int value) { if (value == prefs.gfhigh) return; diff --git a/core/subsurface-qt/SettingsObjectWrapper.h b/core/subsurface-qt/SettingsObjectWrapper.h index 129fd2325..3a2568f98 100644 --- a/core/subsurface-qt/SettingsObjectWrapper.h +++ b/core/subsurface-qt/SettingsObjectWrapper.h @@ -113,8 +113,8 @@ class TechnicalDetailsSettings : public QObject { Q_PROPERTY(bool calcceiling3m READ calcceiling3m WRITE setCalcceiling3m NOTIFY calcceiling3mChanged) Q_PROPERTY(bool calcalltissues READ calcalltissues WRITE setCalcalltissues NOTIFY calcalltissuesChanged) Q_PROPERTY(bool calcndltts READ calcndltts WRITE setCalcndltts NOTIFY calcndlttsChanged) - Q_PROPERTY(bool gflow READ gflow WRITE setGflow NOTIFY gflowChanged) - Q_PROPERTY(bool gfhigh READ gfhigh WRITE setGfhigh NOTIFY gfhighChanged) + Q_PROPERTY(int gflow READ gflow WRITE setGflow NOTIFY gflowChanged) + Q_PROPERTY(int gfhigh READ gfhigh WRITE setGfhigh NOTIFY gfhighChanged) Q_PROPERTY(bool hrgraph READ hrgraph WRITE setHRgraph NOTIFY hrgraphChanged) Q_PROPERTY(bool tankbar READ tankBar WRITE setTankBar NOTIFY tankBarChanged) Q_PROPERTY(bool percentagegraph READ percentageGraph WRITE setPercentageGraph NOTIFY percentageGraphChanged) @@ -139,8 +139,8 @@ public: bool calcceiling3m() const; bool calcalltissues() const; bool calcndltts() const; - bool gflow() const; - bool gfhigh() const; + int gflow() const; + int gfhigh() const; bool hrgraph() const; bool tankBar() const; bool percentageGraph() const; @@ -164,8 +164,8 @@ public slots: void setCalcceiling3m(bool value); void setCalcalltissues(bool value); void setCalcndltts(bool value); - void setGflow(bool value); - void setGfhigh(bool value); + void setGflow(int value); + void setGfhigh(int value); void setHRgraph(bool value); void setTankBar(bool value); void setPercentageGraph(bool value); @@ -189,8 +189,8 @@ signals: void calcceiling3mChanged(bool value); void calcalltissuesChanged(bool value); void calcndlttsChanged(bool value); - void gflowChanged(bool value); - void gfhighChanged(bool value); + void gflowChanged(int value); + void gfhighChanged(int value); void hrgraphChanged(bool value); void tankBarChanged(bool value); void percentageGraphChanged(bool value); |