diff options
author | Robert C. Helling <helling@atdotde.de> | 2015-06-16 14:37:02 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-16 20:33:07 -0700 |
commit | eca7d998e102ee10fc5a765a2b8d4a2176a5e2f5 (patch) | |
tree | 220353eb368741e8922aad1342696a651ff8ee38 /qt-ui | |
parent | f66ea4cbb03c126fce3805d778c9f197fb6fa5e8 (diff) | |
download | subsurface-eca7d998e102ee10fc5a765a2b8d4a2176a5e2f5.tar.gz |
Set up signalling to display notes in planner again.
This got broken in a recent transition to more abstract models.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/diveplanner.cpp | 2 | ||||
-rw-r--r-- | qt-ui/mainwindow.cpp | 4 | ||||
-rw-r--r-- | qt-ui/mainwindow.h | 3 |
3 files changed, 6 insertions, 3 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index 7ab0aac86..e2a604b68 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -127,6 +127,8 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg plannerModel, SIGNAL(cylinderModelEdited())); connect(CylindersModel::instance(), SIGNAL(rowsRemoved(QModelIndex, int, int)), plannerModel, SIGNAL(cylinderModelEdited())); + connect(plannerModel, SIGNAL(calculatedPlanNotes()), MainWindow::instance(), SLOT(setPlanNotes())); + ui.tableWidget->setBtnToolTip(tr("Add dive data point")); connect(ui.startTime, SIGNAL(timeChanged(QTime)), plannerModel, SLOT(setStartTime(QTime))); diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 5621269b3..0095aaf97 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -619,9 +619,9 @@ void MainWindow::planCreated() refreshDisplay(); } -void MainWindow::setPlanNotes(const char *notes) +void MainWindow::setPlanNotes() { - plannerDetails()->divePlanOutput()->setHtml(notes); + plannerDetails()->divePlanOutput()->setHtml(displayed_dive.notes); } void MainWindow::printPlan() diff --git a/qt-ui/mainwindow.h b/qt-ui/mainwindow.h index 0cdc2e1c5..68c5baed3 100644 --- a/qt-ui/mainwindow.h +++ b/qt-ui/mainwindow.h @@ -88,7 +88,6 @@ public: PlannerDetails *plannerDetails() const; void setLoadedWithFiles(bool filesFromCommandLine); bool filesFromCommandLine() const; - void setPlanNotes(const char *notes); void printPlan(); void checkSurvey(QSettings *s); void setApplicationState(const QByteArray& state); @@ -188,6 +187,8 @@ slots: void planCreated(); void setEnabledToolbar(bool arg1); void enableDiveSiteCreation(); + void setPlanNotes(); + private: Ui::MainWindow ui; |