summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 90b2406cb..5bf190e78 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -221,13 +221,27 @@ void MainWindow::on_actionPrint_triggered()
qDebug("actionPrint");
}
+void MainWindow::disableDcShortcuts()
+{
+ ui->actionPreviousDC->setShortcut(QKeySequence());
+ ui->actionNextDC->setShortcut(QKeySequence());
+}
+
+void MainWindow::enableDcShortcuts()
+{
+ ui->actionPreviousDC->setShortcut(Qt::Key_Left);
+ ui->actionNextDC->setShortcut(Qt::Key_Right);
+}
+
void MainWindow::on_actionDivePlanner_triggered()
{
+ disableDcShortcuts();
ui->stackedWidget->setCurrentIndex(1);
}
void MainWindow::showProfile()
{
+ enableDcShortcuts();
ui->stackedWidget->setCurrentIndex(0);
}