diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-02-23 14:32:25 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-02-23 14:32:25 -0800 |
commit | 41abab72533a31affe7746568e3d6fc3d8f94981 (patch) | |
tree | d18a023b00753aaee60c6c8d30eca3591c58c41a /qt-ui | |
parent | 9712999e666bd0040625a6eb924432c265f748bc (diff) | |
download | subsurface-41abab72533a31affe7746568e3d6fc3d8f94981.tar.gz |
Calculate minimum and maximum heartrate
And setup the axis accordingly.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/profile/profilewidget2.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp index 9152f1c76..a8f1e0e33 100644 --- a/qt-ui/profile/profilewidget2.cpp +++ b/qt-ui/profile/profilewidget2.cpp @@ -345,10 +345,14 @@ void ProfileWidget2::plotDives(QList<dive*> dives) temperatureAxis->setMinimum(pInfo.mintemp); temperatureAxis->setMaximum(pInfo.maxtemp); - heartBeatAxis->setMinimum(20); // FIXME: find minimum - heartBeatAxis->setMaximum(200); // FIXME: find maximum - heartBeatAxis->updateTicks(); // this shows the ticks - + if (pInfo.maxhr) { + heartBeatAxis->setMinimum(pInfo.minhr); + heartBeatAxis->setMaximum(pInfo.maxhr); + heartBeatAxis->updateTicks(); // this shows the ticks + heartBeatAxis->setVisible(true); + } else { + heartBeatAxis->setVisible(false); + } timeAxis->setMaximum(maxtime); int i, incr; |