diff options
author | jan Iversen <jan@casacondor.com> | 2020-01-20 10:48:31 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-01-20 15:45:20 -0800 |
commit | d924afdf52b578c3afccfc7e702acdbb7800d38c (patch) | |
tree | 532ad29abd843d603529f6d1c5e9c8bbe8995776 /qt-models | |
parent | b1751ac0c601846d7e2dcf629bfd157bda4d39ef (diff) | |
download | subsurface-d924afdf52b578c3afccfc7e702acdbb7800d38c.tar.gz |
qt-models: add suffix Display to unit system aware asc/desc setters
Change ascent/descent setter function names to set_<name>Display
to show the value is prepared for displaying (common for desktop and QML).
Signed-off-by: jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 10 | ||||
-rw-r--r-- | qt-models/diveplannermodel.h | 10 |
2 files changed, 10 insertions, 10 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index d3f9c4c6c..7694b185e 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -515,7 +515,7 @@ void DivePlannerPointsModel::setLastStop6m(bool value) emitDataChanged(); } -void DivePlannerPointsModel::setAscrate75(int rate) +void DivePlannerPointsModel::setAscrate75Display(int rate) { qPrefDivePlanner::set_ascrate75(lrint(rate * UNIT_FACTOR)); emitDataChanged(); @@ -525,7 +525,7 @@ int DivePlannerPointsModel::ascrate75Display() return lrint((float)prefs.ascrate75 / UNIT_FACTOR); } -void DivePlannerPointsModel::setAscrate50(int rate) +void DivePlannerPointsModel::setAscrate50Display(int rate) { qPrefDivePlanner::set_ascrate50(lrint(rate * UNIT_FACTOR)); emitDataChanged(); @@ -535,7 +535,7 @@ int DivePlannerPointsModel::ascrate50Display() return lrint((float)prefs.ascrate50 / UNIT_FACTOR); } -void DivePlannerPointsModel::setAscratestops(int rate) +void DivePlannerPointsModel::setAscratestopsDisplay(int rate) { qPrefDivePlanner::set_ascratestops(lrint(rate * UNIT_FACTOR)); emitDataChanged(); @@ -545,7 +545,7 @@ int DivePlannerPointsModel::ascratestopsDisplay() return lrint((float)prefs.ascratestops / UNIT_FACTOR); } -void DivePlannerPointsModel::setAscratelast6m(int rate) +void DivePlannerPointsModel::setAscratelast6mDisplay(int rate) { qPrefDivePlanner::set_ascratelast6m(lrint(rate * UNIT_FACTOR)); emitDataChanged(); @@ -555,7 +555,7 @@ int DivePlannerPointsModel::ascratelast6mDisplay() return lrint((float)prefs.ascratelast6m / UNIT_FACTOR); } -void DivePlannerPointsModel::setDescrate(int rate) +void DivePlannerPointsModel::setDescrateDisplay(int rate) { qPrefDivePlanner::set_descrate(lrint(rate * UNIT_FACTOR)); emitDataChanged(); diff --git a/qt-models/diveplannermodel.h b/qt-models/diveplannermodel.h index 88cca5879..23d9ada02 100644 --- a/qt-models/diveplannermodel.h +++ b/qt-models/diveplannermodel.h @@ -104,11 +104,11 @@ slots: void setSurfaceSegment(int duration); void setSacFactor(double factor); void setProblemSolvingTime(int minutes); - void setAscrate75(int rate); - void setAscrate50(int rate); - void setAscratestops(int rate); - void setAscratelast6m(int rate); - void setDescrate(int rate); + void setAscrate75Display(int rate); + void setAscrate50Display(int rate); + void setAscratestopsDisplay(int rate); + void setAscratelast6mDisplay(int rate); + void setDescrateDisplay(int rate); signals: void planCreated(); |