diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2018-03-17 10:48:45 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2018-03-19 15:44:02 -0700 |
commit | cfd4c42829025abefc8f8c4f9b77a18c52722b39 (patch) | |
tree | 84e0540f5c9f731e95d6adc94ab324761acc7ebb /desktop-widgets/mainwindow.cpp | |
parent | b38eb45b295aaa346ad58e7ba3677456469a2fdd (diff) | |
download | subsurface-cfd4c42829025abefc8f8c4f9b77a18c52722b39.tar.gz |
Profile heatmap/heartrate: Only enable max one of these at same time
Only allow to enable maximum one of both items tissue heatmap or
heartrate in profile.
This is done by always switching off the other one at the moment you
turn on one of the two items (heatmap or heartrate).
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index d0c5a0790..4027c6d61 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -292,6 +292,9 @@ MainWindow::MainWindow() : QMainWindow(), connect(ui.profTankbar, &QAction::triggered, sWrapper->techDetails, &TechnicalDetailsSettings::setTankBar); connect(ui.profTissues, &QAction::triggered, sWrapper->techDetails, &TechnicalDetailsSettings::setPercentageGraph); + connect(ui.profTissues, &QAction::triggered, this, &MainWindow::unsetProfHR); + connect(ui.profHR, &QAction::triggered, this, &MainWindow::unsetProfTissues); + connect(ui.profPhe, &QAction::triggered, sWrapper->pp_gas, &PartialPressureGasSettings::setShowPhe); connect(ui.profPn2, &QAction::triggered, sWrapper->pp_gas, &PartialPressureGasSettings::setShowPn2); connect(ui.profPO2, &QAction::triggered, sWrapper->pp_gas, &PartialPressureGasSettings::setShowPo2); @@ -2037,3 +2040,19 @@ void MainWindow::hideProgressBar() progressDialog = NULL; } } + +void MainWindow::unsetProfHR() +{ + SettingsObjectWrapper *sWrapper = SettingsObjectWrapper::instance(); + + ui.profHR->setChecked(false); + sWrapper->techDetails->setHRgraph(false); +} + +void MainWindow::unsetProfTissues() +{ + SettingsObjectWrapper *sWrapper = SettingsObjectWrapper::instance(); + + ui.profTissues->setChecked(false); + sWrapper->techDetails->setPercentageGraph(false); +} |