summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-15 08:11:14 -0600
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-08-15 08:11:14 -0600
commite8d430341c1102c0da1a3847ad2d39f41fc642d3 (patch)
tree2d07fdeb70e25c5411f707d90d77c3c3cb0cbff9 /qt-ui/mainwindow.cpp
parente71119b40bac8d6dc33449e33329f235350b08f5 (diff)
downloadsubsurface-e8d430341c1102c0da1a3847ad2d39f41fc642d3.tar.gz
TankBar: hook into prefs and make ppGraphs resize accordingly
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 1a4594bab..687fc778d 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -242,6 +242,7 @@ void MainWindow::setToolButtonsEnabled(bool enabled)
ui.profScaled->setEnabled(enabled);
ui.profHR->setEnabled(enabled);
ui.profTogglePicture->setEnabled(enabled);
+ ui.profTankbar->setEnabled(enabled);
}
bool MainWindow::okToClose(QString message)
@@ -796,6 +797,7 @@ void MainWindow::readSettings()
TOOLBOX_PREF_BUTTON(rulergraph, rulergraph, profRuler);
TOOLBOX_PREF_BUTTON(show_sac, show_sac, profSAC);
TOOLBOX_PREF_BUTTON(show_pictures_in_profile, show_pictures_in_profile, profTogglePicture);
+ TOOLBOX_PREF_BUTTON(tankbar, tankbar, profTankbar);
s.endGroup();
s.beginGroup("DiveComputer");
default_dive_computer_vendor = getSetting(s, "dive_computer_vendor");
@@ -1270,6 +1272,7 @@ TOOLBOX_PREF_PROFILE(profRuler, rulergraph, rulergraph);
TOOLBOX_PREF_PROFILE(profSAC, show_sac, show_sac);
TOOLBOX_PREF_PROFILE(profScaled, zoomed_plot, zoomed_plot);
TOOLBOX_PREF_PROFILE(profTogglePicture, show_pictures_in_profile, show_pictures_in_profile);
+TOOLBOX_PREF_PROFILE(profTankbar, tankbar, tankbar);
void MainWindow::turnOffNdlTts()
{
@@ -1289,10 +1292,11 @@ void MainWindow::on_actionExport_triggered()
void MainWindow::setEnabledToolbar(bool arg1)
{
- QList<QToolButton*> toolBar; toolBar << ui.profCalcAllTissues << ui.profCalcCeiling
- << ui.profDcCeiling << ui.profEad << ui.profHR << ui.profIncrement3m
- << ui.profMod << ui.profNdl_tts << ui.profNdl_tts << ui.profPhe << ui.profPn2
- << ui.profPO2 << ui.profRuler << ui.profSAC << ui.profScaled << ui.profTogglePicture;
+ QList<QToolButton*> toolBar;
+ toolBar << ui.profCalcAllTissues << ui.profCalcCeiling << ui.profDcCeiling << ui.profEad <<
+ ui.profHR << ui.profIncrement3m << ui.profMod << ui.profNdl_tts << ui.profNdl_tts <<
+ ui.profPhe << ui.profPn2 << ui.profPO2 << ui.profRuler << ui.profSAC << ui.profScaled <<
+ ui.profTogglePicture << ui.profTankbar;
Q_FOREACH(QToolButton *b, toolBar)
b->setEnabled(arg1);
}