aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-02-06 11:38:28 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-06 06:34:05 -0800
commitc84ef319a2d83affbd4a0f2f7c391cdfb25d09ee (patch)
treed0823cf0e41854e8faf9aeaa535ab6380c47645c /qt-ui/mainwindow.cpp
parent2a9289ac99f5be630e768a97dc30525c15e430ce (diff)
downloadsubsurface-c84ef319a2d83affbd4a0f2f7c391cdfb25d09ee.tar.gz
Create a toolbox on the left side of the new profile
For quick acess of preferences the show / hide stuff from the Settings dialog is now in that toolbox and in the future we can put a few more, like 'Show Notifications Panel' and 'Enable Legend' Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp60
1 files changed, 60 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 4330636ed..e9041653a 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -912,3 +912,63 @@ void MainWindow::editCurrentDive()
ui.InfoWidget->enableEdition(MainTab::MANUALLY_ADDED_DIVE);
}
}
+
+#define TOOLBOX_PREF_PROFILE(PREFS)\
+ QSettings s; \
+ s.beginGroup("TecDetails"); \
+ s.setValue(#PREFS, triggered); \
+ PreferencesDialog::instance()->emitSettingsChanged();
+
+void MainWindow::on_profCalcAllTissues_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(calcalltissues);
+}
+void MainWindow::on_profCalcCeiling_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(calcceiling);
+}
+void MainWindow::on_profDcCeiling_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(dcceiling);
+}
+void MainWindow::on_profEad_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(ead);
+}
+void MainWindow::on_profIncrement3m_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(calcceiling3m);
+}
+void MainWindow::on_profMod_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(mod);
+}
+void MainWindow::on_profNtl_tts_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(calcndltts);
+}
+void MainWindow::on_profPhe_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(phegraph);
+}
+void MainWindow::on_profPn2_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(pn2graph);
+}
+void MainWindow::on_profPO2_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(po2graph);
+}
+void MainWindow::on_profRuler_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(rulergraph);
+}
+void MainWindow::on_profSAC_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(show_sac);
+}
+void MainWindow::on_profUnusedTanks_clicked(bool triggered)
+{
+ TOOLBOX_PREF_PROFILE(display_unused_tanks);
+}
+#undef TOOLBOX_PREF_PROFILE \ No newline at end of file