diff options
author | Lubomir I. Ivanov <neolit123@gmail.com> | 2014-03-11 18:30:58 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-03-11 11:30:31 -0700 |
commit | 466f160c01127c1a2aad37742f53a9a0b97eb274 (patch) | |
tree | 1b0c0b409ba2da12896551089e20ca7a0d0dad52 /qt-ui/mainwindow.cpp | |
parent | b382228b7dccc8e2c6b4af6ae23e0a285055c454 (diff) | |
download | subsurface-466f160c01127c1a2aad37742f53a9a0b97eb274.tar.gz |
Profile2: provide means to disable the tool buttons
Once the poster is displayed when there are no dives in the list,
we may also want to disable the QToolButtons (PO2, SAC, etc..),
until a new dive is loaded and the profile is redrawn.
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index ccba66d70..34ff4baf4 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -166,6 +166,23 @@ void MainWindow::cleanUpEmpty() setTitle(MWTF_DEFAULT); } +void MainWindow::setToolButtonsEnabled(bool enabled) +{ + ui.profPO2->setEnabled(enabled); + ui.profPn2->setEnabled(enabled); + ui.profPhe->setEnabled(enabled); + ui.profDcCeiling->setEnabled(enabled); + ui.profCalcCeiling->setEnabled(enabled); + ui.profCalcAllTissues->setEnabled(enabled); + ui.profIncrement3m->setEnabled(enabled); + ui.profMod->setEnabled(enabled); + ui.profEad->setEnabled(enabled); + ui.profNdl_tts->setEnabled(enabled); + ui.profSAC->setEnabled(enabled); + ui.profRuler->setEnabled(enabled); + ui.profScaled->setEnabled(enabled); +} + void MainWindow::on_actionClose_triggered() { if (DivePlannerPointsModel::instance()->currentMode() != DivePlannerPointsModel::NOTHING || |