summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Lakshman <acrlakshman@gmail.com>2014-04-08 00:00:50 -0400
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-04-10 09:21:43 -0700
commit6a8d929876f5a8d0279d2a83248a5d7b59e0ae39 (patch)
tree97ce70f6851a4e2d756a946607298f6325edf9d3 /qt-ui/mainwindow.cpp
parent20bde81023938a64fd417e75af3b85f19789f9ac (diff)
downloadsubsurface-6a8d929876f5a8d0279d2a83248a5d7b59e0ae39.tar.gz
Feature to show or hide heart rate graph
Adds new push button "HR" to the button bar on the dive profile to toggle display of heart rate. TODO: New icon for the heart rate button is needed. Fixes #485 Signed-off-by: Lakshman Anumolu <acrlakshman@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 216f18275..88be2ca23 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -221,6 +221,7 @@ void MainWindow::setToolButtonsEnabled(bool enabled)
ui.profSAC->setEnabled(enabled);
ui.profRuler->setEnabled(enabled);
ui.profScaled->setEnabled(enabled);
+ ui.profHR->setEnabled(enabled);
}
void MainWindow::on_actionClose_triggered()
@@ -702,6 +703,7 @@ void MainWindow::readSettings()
TOOLBOX_PREF_BUTTON(pp_graphs.phe, phegraph, profPhe);
TOOLBOX_PREF_BUTTON(pp_graphs.pn2, pn2graph, profPn2);
TOOLBOX_PREF_BUTTON(pp_graphs.po2, po2graph, profPO2);
+ TOOLBOX_PREF_BUTTON(heart_rate, hrgraph, profHR);
ui.profRuler->setChecked(s.value("rulergraph").toBool());
TOOLBOX_PREF_BUTTON(show_sac, show_sac, profSAC);
}
@@ -1164,6 +1166,11 @@ void MainWindow::on_profPO2_clicked(bool triggered)
prefs.pp_graphs.po2 = triggered;
TOOLBOX_PREF_PROFILE(po2graph);
}
+void MainWindow::on_profHR_clicked(bool triggered)
+{
+ prefs.heart_rate = triggered;
+ TOOLBOX_PREF_PROFILE(hrgraph);
+}
void MainWindow::on_profRuler_clicked(bool triggered)
{
TOOLBOX_PREF_PROFILE(rulergraph);