From 062515ba6f92fa7b4d72403ed195b28ad6d996f7 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 20 Jun 2013 18:48:21 -0300 Subject: Added back the menu entry 'Dive Planner' Added back the menu entry Dive Planner, and removed the calee code from the Print action. Signed-off-by: Tomaz Canabrava --- qt-ui/mainwindow.cpp | 12 ++++++++++-- qt-ui/mainwindow.h | 1 + qt-ui/mainwindow.ui | 9 ++++++++- 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 75fb21a64..b61f962c4 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -179,11 +179,19 @@ void MainWindow::on_actionExportUDDF_triggered() void MainWindow::on_actionPrint_triggered() { - // hijacking the print action for a while. - DivePlanner::instance()->show(); qDebug("actionPrint"); } +void MainWindow::on_actionDivePlanner_triggered() +{ + DivePlanner *planner = DivePlanner::instance(); + if (planner->exec() == QDialog::Accepted){ + struct dive *d = planner->getDive(); + qDebug() << "Finish me."; + } +} + + void MainWindow::on_actionPreferences_triggered() { PreferencesDialog::instance()->show(); diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 0693f07fd..85825958d 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -83,6 +83,7 @@ private slots: void on_actionInputPlan_triggered(); void on_actionAboutSubsurface_triggered(); void on_actionUserManual_triggered(); + void on_actionDivePlanner_triggered(); void current_dive_changed(int divenr); void initialUiSetup(); diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 1a985f812..1dfb8a27b 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -103,7 +103,7 @@ 0 0 763 - 34 + 20 @@ -152,6 +152,8 @@ + + @@ -368,6 +370,11 @@ Ctrl+4 + + + Dive Planner + + -- cgit v1.2.3-70-g09d2