From 90885bfb8e9ac9eb21d969dd6de54b2ddb14c4cb Mon Sep 17 00:00:00 2001 From: "Robert C. Helling" Date: Mon, 2 Jun 2014 16:25:58 +0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/diveplanner.cpp | 28 ++ qt-ui/diveplanner.h | 4 + qt-ui/diveplanner.ui | 170 ++++++---- qt-ui/mainwindow.ui | 840 +++++++++++++++++++++++++------------------------- 4 files changed, 560 insertions(+), 482 deletions(-) (limited to 'qt-ui') 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(); diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index a26038b2f..f96094059 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -73,6 +73,10 @@ slots: void setDecoSac(int sac); void setStartTime(const QTime &t); void setLastStop6m(bool value); + void setVerbatim(bool value); + void setDisplayRuntime(bool value); + void setDisplayDuration(bool value); + void setDisplayTransitions(bool value); void createPlan(); void remove(const QModelIndex &index); void cancelPlan(); diff --git a/qt-ui/diveplanner.ui b/qt-ui/diveplanner.ui index 558be069d..fe3f46086 100644 --- a/qt-ui/diveplanner.ui +++ b/qt-ui/diveplanner.ui @@ -62,36 +62,58 @@ 2 - - + + + + + 0 + 0 + + + + + 0 + 50 + + + - - - - Bottom SAC + + + + + 0 + 0 + + + + + 0 + 50 + - - - - GFHigh + + + + + + + 1 + + + 150 - - + + - SAC on DECO Stop + Start Time - - - - - - @@ -99,16 +121,26 @@ - - - - 1 + + + + + + + QDialogButtonBox::Abort|QDialogButtonBox::Save - - 150 + + + + + + Last Stop at 6m + + + @@ -119,66 +151,74 @@ - - + + - Last Stop at 6m + verbatim diveplan - - - - - 0 - 0 - - - - - 0 - 50 - + + + + SAC on DECO Stop - - - - - 0 - 0 - + + + + Bottom SAC - - - 0 - 50 - + + + + + + GFHigh - - - - QDialogButtonBox::Abort|QDialogButtonBox::Save + + + + ATM Pressure - - + + - - + + + + In dive plan, show duration (relative time) of stops + - Start Time + display stop duration - - + + + + In dive plan, show runtime (absolute time) of stops + - ATM Pressure + display runtime + + + true + + + + + + + In diveplan, list transitions or treat them as implicit + + + display transitions diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index d73f19077..1dd6db59f 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -86,409 +86,409 @@ - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - Enable the pO2 Graph - - - ... - - - - :/icon_o2:/icon_o2 - - - - 24 - 24 - - - - true - - - true - - - - - - - Enable the pN2 Graph - - - ... - - - - :/icon_n2:/icon_n2 - - - - 24 - 24 - - - - true - - - true - - - - - - - Enable the pHe graph - - - ... - - - - :/icon_he:/icon_he - - - - 24 - 24 - - - - true - - - true - - - - - - - true - - - Show the DC Reported Ceiling - - - ... - - - - :/icon_ceiling_dc:/icon_ceiling_dc - - - - 24 - 24 - - - - true - - - true - - - - - - - true - - - Show the Calculated Ceiling - - - ... - - - - :/icon_ceiling_calculated:/icon_ceiling_calculated - - - - 24 - 24 - - - - true - - - true - - - - - - - Calculate All Tissues - - - ... - - - - :/icon_ceiling_alltissues:/icon_ceiling_alltissues - - - - 24 - 24 - - - - true - - - true - - - - - - - Show Calculated Ceiling with 3m Increments - - - ... - - - - :/icon_ceiling_3m:/icon_ceiling_3m - - - - 24 - 24 - - - - true - - - true - - - - - - - Show/hide heart rate - - - ... - - - - :/icon_HR:/icon_HR - - - - 24 - 24 - - - - true - - - true - - - - - - - Enable MOD - - - ... - - - - :/icon_mod:/icon_mod - - - - 24 - 24 - - - - true - - - true - - - - - - - Enable EAD, END, and EADD - - - ... - - - - :/icon_ead:/icon_ead - - - - 24 - 24 - - - - true - - - true - - - - - - - Show NDL / TTS - - - ... - - - - :/icon_NDLTTS:/icon_NDLTTS - - - - 24 - 24 - - - - true - - - true - - - - - - - Show SAC Rate - - - ... - - - - :/icon_lung:/icon_lung - - - - 24 - 24 - - - - true - - - true - - - - - - - Enable / Disable the Ruler - - - ... - - - - :/units:/units - - - - 24 - 24 - - - - true - - - true - - - - - - - Rescale depth axis - - - ... - - - - :/scale:/scale - - - - 24 - 24 - - - - true - - - true - - - - - - - - - - Qt::Vertical - - - - 20 - 40 - - - - - + + + 0 + + + 0 + + + 0 + + + 0 + + + 0 + + + + + Enable the pO2 Graph + + + ... + + + + :/icon_o2:/icon_o2 + + + + 24 + 24 + + + + true + + + true + + + + + + + Enable the pN2 Graph + + + ... + + + + :/icon_n2:/icon_n2 + + + + 24 + 24 + + + + true + + + true + + + + + + + Enable the pHe graph + + + ... + + + + :/icon_he:/icon_he + + + + 24 + 24 + + + + true + + + true + + + + + + + true + + + Show the DC Reported Ceiling + + + ... + + + + :/icon_ceiling_dc:/icon_ceiling_dc + + + + 24 + 24 + + + + true + + + true + + + + + + + true + + + Show the Calculated Ceiling + + + ... + + + + :/icon_ceiling_calculated:/icon_ceiling_calculated + + + + 24 + 24 + + + + true + + + true + + + + + + + Calculate All Tissues + + + ... + + + + :/icon_ceiling_alltissues:/icon_ceiling_alltissues + + + + 24 + 24 + + + + true + + + true + + + + + + + Show Calculated Ceiling with 3m Increments + + + ... + + + + :/icon_ceiling_3m:/icon_ceiling_3m + + + + 24 + 24 + + + + true + + + true + + + + + + + Show/hide heart rate + + + ... + + + + :/icon_HR:/icon_HR + + + + 24 + 24 + + + + true + + + true + + + + + + + Enable MOD + + + ... + + + + :/icon_mod:/icon_mod + + + + 24 + 24 + + + + true + + + true + + + + + + + Enable EAD, END, and EADD + + + ... + + + + :/icon_ead:/icon_ead + + + + 24 + 24 + + + + true + + + true + + + + + + + Show NDL / TTS + + + ... + + + + :/icon_NDLTTS:/icon_NDLTTS + + + + 24 + 24 + + + + true + + + true + + + + + + + Show SAC Rate + + + ... + + + + :/icon_lung:/icon_lung + + + + 24 + 24 + + + + true + + + true + + + + + + + Enable / Disable the Ruler + + + ... + + + + :/units:/units + + + + 24 + 24 + + + + true + + + true + + + + + + + Rescale depth axis + + + ... + + + + :/scale:/scale + + + + 24 + 24 + + + + true + + + true + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + @@ -497,7 +497,7 @@ - 0 + 1 @@ -536,15 +536,26 @@ 0 - - - - Dive plan details - + + + + Dive plan details + - + - + + + font: 13pt "Courier"; + + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"> +<html><head><meta name="qrichtext" content="1" /><style type="text/css"> +p, li { white-space: pre-wrap; } +</style></head><body style=" font-family:'Courier'; font-size:13pt; font-weight:400; font-style:normal;"> +<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-family:'.Curier New';"><br /></p></body></html> + + @@ -570,7 +581,7 @@ 0 0 1418 - 20 + 22 @@ -971,11 +982,6 @@
globe.h
1 - - DivePlannerGraphics - QGraphicsView -
diveplanner.h
-
DivePlannerWidget QWidget -- cgit v1.2.3-70-g09d2