diff options
author | Robert C. Helling <helling@atdotde.de> | 2014-06-02 16:25:58 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-06-02 12:40:36 -0700 |
commit | 90885bfb8e9ac9eb21d969dd6de54b2ddb14c4cb (patch) | |
tree | e880e11d37ac162945185db0e136fdb960467fd4 /qt-ui/diveplanner.cpp | |
parent | cc012c1fa6ffca2c5c93fb79415b9a806cb3632c (diff) | |
download | subsurface-90885bfb8e9ac9eb21d969dd6de54b2ddb14c4cb.tar.gz |
Optionally strip diveplan to bare minimum
There are new check-boxes to modify the look of the diveplan in the notes.
The old behaviour appears with "verbatim display", others are shorter,
runtimes, stoplengths and transitions being optional. Also round to full
meters and minutes to remove optical clutter.
To be done: Remember these setting in the config.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.cpp')
-rw-r--r-- | qt-ui/diveplanner.cpp | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp index abe1c3a62..36c8538a1 100644 --- a/qt-ui/diveplanner.cpp +++ b/qt-ui/diveplanner.cpp @@ -273,6 +273,10 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg connect(ui.gfhigh, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFHigh(int))); connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int))); connect(ui.lastStop, SIGNAL(toggled(bool)), plannerModel, SLOT(setLastStop6m(bool))); + connect(ui.verbatim_plan, SIGNAL(toggled(bool)), plannerModel, SLOT(setVerbatim(bool))); + connect(ui.display_duration, SIGNAL(toggled(bool)), plannerModel, SLOT(setDisplayDuration(bool))); + connect(ui.display_runtime, SIGNAL(toggled(bool)), plannerModel, SLOT(setDisplayRuntime(bool))); + connect(ui.display_transitions, SIGNAL(toggled(bool)), plannerModel, SLOT(setDisplayTransitions(bool))); // Creating (and canceling) the plan connect(ui.buttonBox, SIGNAL(accepted()), plannerModel, SLOT(createPlan())); @@ -505,6 +509,30 @@ void DivePlannerPointsModel::setLastStop6m(bool value) emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); } +void DivePlannerPointsModel::setVerbatim(bool value) +{ + set_verbatim(value); + emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); +} + +void DivePlannerPointsModel::setDisplayRuntime(bool value) +{ + set_display_runtime(value); + emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); +} + +void DivePlannerPointsModel::setDisplayDuration(bool value) +{ + set_display_duration(value); + emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); +} + +void DivePlannerPointsModel::setDisplayTransitions(bool value) +{ + set_display_transitions(value); + emit dataChanged(createIndex(0, 0), createIndex(rowCount() - 1, COLUMNS - 1)); +} + void DivePlannerPointsModel::setStartTime(const QTime &t) { diveplan.when = (t.msec() + QDateTime::currentMSecsSinceEpoch()) / 1000 - gettimezoneoffset(); |