diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2014-05-28 15:54:04 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-28 17:02:46 -0700 |
commit | 86d7f6ace06adf13fe5045a217c4f264356a01df (patch) | |
tree | e45777cafa6ecd5d0edde3e611541323d70f9562 /qt-ui/mainwindow.cpp | |
parent | 412317c91ff5212ea5e53fc4fd12cfdae4c04571 (diff) | |
download | subsurface-86d7f6ace06adf13fe5045a217c4f264356a01df.tar.gz |
Move code from the Planner that doesn't belongs there.
Moved the connections between DivePlannerPointsModel and
MainWindow from inside the Planner class to the MainWindow.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 52eb3d115..9a325cef4 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -77,7 +77,8 @@ MainWindow::MainWindow() : QMainWindow(), connect(ui.actionRecent3, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool))); connect(ui.actionRecent4, SIGNAL(triggered(bool)), this, SLOT(recentFileTriggered(bool))); connect(information(), SIGNAL(addDiveFinished()), ui.newProfile, SLOT(setProfileState())); - + connect(DivePlannerPointsModel::instance(), SIGNAL(planCreated()), MainWindow::instance(), SLOT(planCreated())); + connect(DivePlannerPointsModel::instance(), SIGNAL(planCanceled()), MainWindow::instance(), SLOT(planCanceled())); ui.mainErrorMessage->hide(); initialUiSetup(); readSettings(); @@ -406,6 +407,13 @@ void MainWindow::planCanceled() refreshDisplay(); } +void MainWindow::planCreated() +{ + removeFakeDiveForAddAndPlan(); + showProfile(); + refreshDisplay(); +} + void MainWindow::on_actionDivePlanner_triggered() { if(!plannerStateClean()) |