summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-10 10:45:13 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-10 10:49:00 -0700
commite69dbebf21a8bf7c5d02a12d93069e99d363ea64 (patch)
treee8d1ef57805d58f646a4ce0ac1ac87d771b55226 /qt-ui/mainwindow.cpp
parent56c4cced536b8b1bb7282f263deb24640632e884 (diff)
downloadsubsurface-e69dbebf21a8bf7c5d02a12d93069e99d363ea64.tar.gz
Make nextDC and previousDC work and assign shortcuts
Cursor right and left now work again to switch between divecomputers. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 160a657da..863e35088 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -45,6 +45,11 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()),
ui->ListWidget->setCurrentIndex(firstDiveOrTrip);
}
+void MainWindow::redrawProfile()
+{
+ ui->ProfileWidget->plot(get_dive(selected_dive));
+}
+
void MainWindow::on_actionNew_triggered()
{
qDebug("actionNew");
@@ -96,7 +101,7 @@ void MainWindow::dive_selection_changed(const QItemSelection& newSelection, cons
continue;
select_dive(get_divenr(d));
}
- ui->ProfileWidget->plot(get_dive(selected_dive));
+ redrawProfile();
ui->InfoWidget->updateDiveInfo(selected_dive);
}
@@ -239,12 +244,14 @@ void MainWindow::on_actionViewAll_triggered()
void MainWindow::on_actionPreviousDC_triggered()
{
- qDebug("actionPreviousDC");
+ dc_number--;
+ redrawProfile();
}
void MainWindow::on_actionNextDC_triggered()
{
- qDebug("actionNextDC");
+ dc_number++;
+ redrawProfile();
}
void MainWindow::on_actionSelectEvents_triggered()