summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Robert Helling <helling@lmu.de>2014-06-26 17:04:39 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-26 15:40:16 -0700
commitd2a834b0cdcf9adae750192dbb04f8a3efeeb74a (patch)
tree1dcd5d7ca1d1210b6eefa21314f2c099ceaa93d0 /qt-ui
parent5b5a25db780187ed34a9388a4b111bb44c1ce548 (diff)
downloadsubsurface-d2a834b0cdcf9adae750192dbb04f8a3efeeb74a.tar.gz
Rearrange planner UI elements
This is my first attempt at grouping UI elements of the planner in a sensible way. It might still be sensible to combine the two bottom panes into one. In addition there is a new field "altutude" which is sychronized with the surface pressure as for planning we often know the altitude of the dive site rather than the atmospheric pressure. 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.cpp56
-rw-r--r--qt-ui/diveplanner.h3
-rw-r--r--qt-ui/diveplanner.ui111
-rw-r--r--qt-ui/mainwindow.cpp5
-rw-r--r--qt-ui/mainwindow.ui187
-rw-r--r--qt-ui/plannerSettings.ui677
6 files changed, 562 insertions, 477 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index 0708b6aef..1afd62e13 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -241,6 +241,8 @@ void DiveHandler::mouseMoveEvent(QGraphicsSceneMouseEvent *event)
DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidget(parent, f)
{
ui.setupUi(this);
+ if (prefs.units.METERS == units::FEET)
+ ui.atmHeight->setSuffix("ft");
ui.tableWidget->setTitle(tr("Dive Planner Points"));
ui.tableWidget->setModel(DivePlannerPointsModel::instance());
DivePlannerPointsModel::instance()->setRecalc(true);
@@ -270,18 +272,8 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg
ui.tableWidget->setBtnToolTip(tr("add dive data point"));
connect(ui.startTime, SIGNAL(timeChanged(QTime)), plannerModel, SLOT(setStartTime(QTime)));
- connect(ui.ATMPressure, SIGNAL(textChanged(QString)), this, SLOT(atmPressureChanged(QString)));
- connect(ui.bottomSAC, SIGNAL(valueChanged(int)), this, SLOT(bottomSacChanged(int)));
- connect(ui.decoStopSAC, SIGNAL(valueChanged(int)), this, SLOT(decoSacChanged(int)));
- connect(ui.gfhigh, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFHigh(int)));
- connect(ui.gfhigh, SIGNAL(editingFinished()), plannerModel, SLOT(emitDataChanged()));
- connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int)));
- connect(ui.gflow, SIGNAL(editingFinished()), plannerModel, SLOT(emitDataChanged()));
- connect(ui.printPlan, SIGNAL(pressed()), this, SLOT(printDecoPlan()));
- connect(ui.drop_stone_mode, SIGNAL(toggled(bool)), plannerModel, SLOT(setDropStoneMode(bool)));
-#ifdef NO_PRINTING
- ui.printPlan->hide();
-#endif
+ connect(ui.ATMPressure, SIGNAL(valueChanged(int)), this, SLOT(atmPressureChanged(int)));
+ connect(ui.atmHeight, SIGNAL(valueChanged(int)), this, SLOT(heightChanged(int)));
// Creating (and canceling) the plan
connect(ui.buttonBox, SIGNAL(accepted()), plannerModel, SLOT(createPlan()));
@@ -291,11 +283,8 @@ DivePlannerWidget::DivePlannerWidget(QWidget *parent, Qt::WindowFlags f) : QWidg
/* set defaults. */
ui.startTime->setTime(QTime(1, 0));
- ui.ATMPressure->setText("1013");
- ui.bottomSAC->setValue(20);
- ui.decoStopSAC->setValue(17);
- ui.gflow->setValue(prefs.gflow);
- ui.gfhigh->setValue(prefs.gfhigh);
+ ui.ATMPressure->setValue(1013);
+ ui.atmHeight->setValue(0);
setMinimumWidth(0);
setMinimumHeight(0);
@@ -311,9 +300,23 @@ void DivePlannerPointsModel::addCylinder_clicked()
CylindersModel::instance()->add();
}
-void DivePlannerWidget::atmPressureChanged(const QString &pressure)
+void DivePlannerWidget::atmPressureChanged(const int pressure)
{
- plannerModel->setSurfacePressure(pressure.toInt());
+ const char *depthunit;
+
+ plannerModel->setSurfacePressure(pressure);
+ ui.atmHeight->blockSignals(true);
+ ui.atmHeight->setValue((int) get_depth_units((int)(log(1013.0 / pressure) * 7800000), NULL,NULL));
+ ui.atmHeight->blockSignals(false);
+}
+
+void DivePlannerWidget::heightChanged(const int height)
+{
+ int pressure = (int) (1013.0 * exp(- (double) units_to_depth((double) height) / 7800000.0));
+ ui.ATMPressure->blockSignals(true);
+ ui.ATMPressure->setValue(pressure);
+ ui.ATMPressure->blockSignals(false);
+ plannerModel->setSurfacePressure(pressure);
}
void DivePlannerWidget::bottomSacChanged(const int bottomSac)
@@ -350,6 +353,7 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
ui.bottompo2->setValue(prefs.bottompo2 / 1000.0);
ui.decopo2->setValue(prefs.decopo2 / 1000.0);
+
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)));
@@ -367,6 +371,18 @@ PlannerSettingsWidget::PlannerSettingsWidget(QWidget *parent, Qt::WindowFlags f)
connect(ui.descRate, SIGNAL(valueChanged(int)), plannerModel, SLOT(emitDataChanged()));
connect(ui.bottompo2, SIGNAL(valueChanged(double)), this, SLOT(setBottomPo2(double)));
connect(ui.decopo2, SIGNAL(valueChanged(double)), this, SLOT(setDecoPo2(double)));
+ connect(ui.drop_stone_mode, SIGNAL(toggled(bool)), plannerModel, SLOT(setDropStoneMode(bool)));
+ connect(ui.bottomSAC, SIGNAL(valueChanged(int)), this, SLOT(bottomSacChanged(int)));
+ connect(ui.decoStopSAC, SIGNAL(valueChanged(int)), this, SLOT(decoSacChanged(int)));
+ connect(ui.gfhigh, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFHigh(int)));
+// connect(ui.gfhigh, SIGNAL(valueChanged()), plannerModel, SLOT(emitDataChanged()));
+ connect(ui.gflow, SIGNAL(valueChanged(int)), plannerModel, SLOT(setGFLow(int)));
+// connect(ui.gflow, SIGNAL(valueChanged()), plannerModel, SLOT(emitDataChanged()));
+
+ ui.bottomSAC->setValue(20);
+ ui.decoStopSAC->setValue(17);
+ ui.gflow->setValue(prefs.gflow);
+ ui.gfhigh->setValue(prefs.gfhigh);
setMinimumWidth(0);
setMinimumHeight(0);
@@ -605,11 +621,13 @@ void DivePlannerPointsModel::setDecoSac(int sac)
void DivePlannerPointsModel::setGFHigh(const int gfhigh)
{
diveplan.gfhigh = gfhigh;
+ plannerModel->emitDataChanged();
}
void DivePlannerPointsModel::setGFLow(const int ghflow)
{
diveplan.gflow = ghflow;
+ plannerModel->emitDataChanged();
}
void DivePlannerPointsModel::setSurfacePressure(int pressure)
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h
index 5955a5a8f..b80aa98da 100644
--- a/qt-ui/diveplanner.h
+++ b/qt-ui/diveplanner.h
@@ -136,7 +136,8 @@ public:
public
slots:
void settingsChanged();
- void atmPressureChanged(const QString &pressure);
+ void atmPressureChanged(const int pressure);
+ void heightChanged(const int height);
void bottomSacChanged(const int bottomSac);
void decoSacChanged(const int decosac);
void printDecoPlan();
diff --git a/qt-ui/diveplanner.ui b/qt-ui/diveplanner.ui
index 33ec33cbd..fffed0d99 100644
--- a/qt-ui/diveplanner.ui
+++ b/qt-ui/diveplanner.ui
@@ -65,10 +65,10 @@
<property name="spacing">
<number>2</number>
</property>
- <item row="7" column="0" colspan="2">
- <widget class="TableView" name="cylinderTableWidget" native="true">
+ <item row="6" column="0" colspan="2">
+ <widget class="TableView" name="tableWidget" native="true">
<property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -81,10 +81,10 @@
</property>
</widget>
</item>
- <item row="8" column="0" colspan="2">
- <widget class="TableView" name="tableWidget" native="true">
+ <item row="5" column="0" colspan="2">
+ <widget class="TableView" name="cylinderTableWidget" native="true">
<property name="sizePolicy">
- <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+ <sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
@@ -95,24 +95,9 @@
<height>50</height>
</size>
</property>
+ <zorder>label_2</zorder>
</widget>
</item>
- <item row="3" column="1">
- <widget class="QSpinBox" name="decoStopSAC"/>
- </item>
- <item row="5" column="0">
- <widget class="QSpinBox" name="gflow">
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>150</number>
- </property>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QTimeEdit" name="startTime"/>
- </item>
<item row="0" column="0">
<widget class="QLabel" name="label">
<property name="text">
@@ -120,82 +105,50 @@
</property>
</widget>
</item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>GFLow</string>
- </property>
- </widget>
- </item>
- <item row="11" column="0" colspan="2">
+ <item row="9" column="0" colspan="2">
<widget class="QDialogButtonBox" name="buttonBox">
<property name="standardButtons">
<set>QDialogButtonBox::Abort|QDialogButtonBox::Save</set>
</property>
</widget>
</item>
- <item row="3" column="0">
- <widget class="QSpinBox" name="bottomSAC"/>
- </item>
- <item row="5" column="1">
- <widget class="QSpinBox" name="gfhigh">
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="maximum">
- <number>150</number>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>SAC on DECO Stop</string>
- </property>
- </widget>
+ <item row="1" column="0">
+ <widget class="QTimeEdit" name="startTime"/>
</item>
<item row="2" column="0">
- <widget class="QLabel" name="label_3">
+ <widget class="QLabel" name="label_7">
<property name="text">
- <string>Bottom SAC</string>
+ <string>Altitide</string>
</property>
</widget>
</item>
- <item row="4" column="1">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>GFHigh</string>
- </property>
- </widget>
- </item>
- <item row="0" column="1">
+ <item row="2" column="1">
<widget class="QLabel" name="label_2">
<property name="text">
<string>ATM Pressure</string>
</property>
</widget>
</item>
- <item row="1" column="1">
- <widget class="QLineEdit" name="ATMPressure">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
+ <item row="3" column="1">
+ <widget class="QSpinBox" name="ATMPressure">
+ <property name="suffix">
+ <string>bar</string>
</property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QCheckBox" name="drop_stone_mode">
- <property name="text">
- <string>Drop like a stone mode</string>
+ <property name="maximum">
+ <number>2000</number>
</property>
</widget>
</item>
- <item row="6" column="1">
- <widget class="QPushButton" name="printPlan">
- <property name="text">
- <string>Print</string>
+ <item row="3" column="0">
+ <widget class="QSpinBox" name="atmHeight">
+ <property name="suffix">
+ <string>m</string>
+ </property>
+ <property name="minimum">
+ <number>-2000</number>
+ </property>
+ <property name="maximum">
+ <number>10000</number>
</property>
</widget>
</item>
@@ -215,12 +168,6 @@
</customwidgets>
<tabstops>
<tabstop>startTime</tabstop>
- <tabstop>ATMPressure</tabstop>
- <tabstop>bottomSAC</tabstop>
- <tabstop>decoStopSAC</tabstop>
- <tabstop>gflow</tabstop>
- <tabstop>gfhigh</tabstop>
- <tabstop>printPlan</tabstop>
<tabstop>buttonBox</tabstop>
<tabstop>scrollArea</tabstop>
</tabstops>
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 13a441349..de624a79d 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -83,6 +83,11 @@ MainWindow::MainWindow() : QMainWindow(),
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()));
+ connect(ui.printPlan, SIGNAL(pressed()), ui.divePlannerWidget, SLOT(printDecoPlan()));
+#ifdef NO_PRINTING
+ ui.printPlan->hide();
+#endif
+
ui.mainErrorMessage->hide();
initialUiSetup();
readSettings();
diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui
index 8369b0e4b..d113cd7f6 100644
--- a/qt-ui/mainwindow.ui
+++ b/qt-ui/mainwindow.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>1418</width>
- <height>1084</height>
+ <width>1682</width>
+ <height>1151</height>
</rect>
</property>
<widget class="QWidget" name="centralwidget">
@@ -38,7 +38,7 @@
</property>
<widget class="QStackedWidget" name="infoPane">
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="page">
<layout class="QHBoxLayout" name="horizontalLayout_3">
@@ -109,43 +109,30 @@
<property name="spacing">
<number>0</number>
</property>
- <item row="0" column="0">
- <widget class="QToolButton" name="profPO2">
- <property name="toolTip">
- <string>Enable the pO2 Graph</string>
- </property>
- <property name="text">
- <string>...</string>
- </property>
- <property name="icon">
- <iconset resource="../subsurface.qrc">
- <normaloff>:/icon_o2</normaloff>:/icon_o2</iconset>
+ <item row="14" column="0">
+ <spacer name="verticalSpacer">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
</property>
- <property name="iconSize">
+ <property name="sizeHint" stdset="0">
<size>
- <width>24</width>
- <height>24</height>
+ <width>20</width>
+ <height>40</height>
</size>
</property>
- <property name="checkable">
- <bool>true</bool>
- </property>
- <property name="autoRaise">
- <bool>true</bool>
- </property>
- </widget>
+ </spacer>
</item>
- <item row="1" column="0">
- <widget class="QToolButton" name="profPn2">
+ <item row="2" column="0">
+ <widget class="QToolButton" name="profPhe">
<property name="toolTip">
- <string>Enable the pN2 Graph</string>
+ <string>Enable the pHe graph</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../subsurface.qrc">
- <normaloff>:/icon_n2</normaloff>:/icon_n2</iconset>
+ <normaloff>:/icon_he</normaloff>:/icon_he</iconset>
</property>
<property name="iconSize">
<size>
@@ -161,17 +148,17 @@
</property>
</widget>
</item>
- <item row="2" column="0">
- <widget class="QToolButton" name="profPhe">
+ <item row="5" column="0">
+ <widget class="QToolButton" name="profCalcAllTissues">
<property name="toolTip">
- <string>Enable the pHe graph</string>
+ <string>Calculate All Tissues</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../subsurface.qrc">
- <normaloff>:/icon_he</normaloff>:/icon_he</iconset>
+ <normaloff>:/icon_ceiling_alltissues</normaloff>:/icon_ceiling_alltissues</iconset>
</property>
<property name="iconSize">
<size>
@@ -245,17 +232,17 @@
</property>
</widget>
</item>
- <item row="5" column="0">
- <widget class="QToolButton" name="profCalcAllTissues">
+ <item row="10" column="0">
+ <widget class="QToolButton" name="profNdl_tts">
<property name="toolTip">
- <string>Calculate All Tissues</string>
+ <string>Show NDL / TTS</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../subsurface.qrc">
- <normaloff>:/icon_ceiling_alltissues</normaloff>:/icon_ceiling_alltissues</iconset>
+ <normaloff>:/icon_NDLTTS</normaloff>:/icon_NDLTTS</iconset>
</property>
<property name="iconSize">
<size>
@@ -375,17 +362,17 @@
</property>
</widget>
</item>
- <item row="10" column="0">
- <widget class="QToolButton" name="profNdl_tts">
+ <item row="11" column="0">
+ <widget class="QToolButton" name="profSAC">
<property name="toolTip">
- <string>Show NDL / TTS</string>
+ <string>Show SAC Rate</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../subsurface.qrc">
- <normaloff>:/icon_NDLTTS</normaloff>:/icon_NDLTTS</iconset>
+ <normaloff>:/icon_lung</normaloff>:/icon_lung</iconset>
</property>
<property name="iconSize">
<size>
@@ -401,17 +388,17 @@
</property>
</widget>
</item>
- <item row="11" column="0">
- <widget class="QToolButton" name="profSAC">
+ <item row="13" column="0">
+ <widget class="QToolButton" name="profScaled">
<property name="toolTip">
- <string>Show SAC Rate</string>
+ <string>Rescale depth axis</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../subsurface.qrc">
- <normaloff>:/icon_lung</normaloff>:/icon_lung</iconset>
+ <normaloff>:/scale</normaloff>:/scale</iconset>
</property>
<property name="iconSize">
<size>
@@ -453,17 +440,17 @@
</property>
</widget>
</item>
- <item row="13" column="0">
- <widget class="QToolButton" name="profScaled">
+ <item row="0" column="0">
+ <widget class="QToolButton" name="profPO2">
<property name="toolTip">
- <string>Rescale depth axis</string>
+ <string>Enable the pO2 Graph</string>
</property>
<property name="text">
<string>...</string>
</property>
<property name="icon">
<iconset resource="../subsurface.qrc">
- <normaloff>:/scale</normaloff>:/scale</iconset>
+ <normaloff>:/icon_o2</normaloff>:/icon_o2</iconset>
</property>
<property name="iconSize">
<size>
@@ -479,21 +466,34 @@
</property>
</widget>
</item>
- <item row="0" column="1" rowspan="15">
- <widget class="ProfileWidget2" name="newProfile"/>
- </item>
- <item row="14" column="0">
- <spacer name="verticalSpacer">
- <property name="orientation">
- <enum>Qt::Vertical</enum>
+ <item row="1" column="0">
+ <widget class="QToolButton" name="profPn2">
+ <property name="toolTip">
+ <string>Enable the pN2 Graph</string>
</property>
- <property name="sizeHint" stdset="0">
+ <property name="text">
+ <string>...</string>
+ </property>
+ <property name="icon">
+ <iconset resource="../subsurface.qrc">
+ <normaloff>:/icon_n2</normaloff>:/icon_n2</iconset>
+ </property>
+ <property name="iconSize">
<size>
- <width>20</width>
- <height>40</height>
+ <width>24</width>
+ <height>24</height>
</size>
</property>
- </spacer>
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="autoRaise">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1" rowspan="15">
+ <widget class="ProfileWidget2" name="newProfile"/>
</item>
</layout>
</widget>
@@ -504,7 +504,7 @@
</property>
<widget class="QStackedWidget" name="diveListPane">
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="DiveListView" name="ListWidget">
<property name="alternatingRowColors">
@@ -548,9 +548,9 @@
</widget>
<widget class="QStackedWidget" name="globePane">
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
- <widget class="QWidget" name="stackedWidgetPage1" native="true">
+ <widget class="QWidget" name="stackedWidgetPage1">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
<horstretch>0</horstretch>
@@ -570,22 +570,54 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QLabel" name="divePlanOutputLabel">
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>20</height>
- </size>
- </property>
- <property name="text">
- <string>Dive plan details</string>
- </property>
- </widget>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QLabel" name="divePlanOutputLabel">
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Dive plan details&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ <property name="textFormat">
+ <enum>Qt::RichText</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QPushButton" name="printPlan">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>Print</string>
+ </property>
+ <property name="autoDefault">
+ <bool>false</bool>
+ </property>
+ <property name="default">
+ <bool>false</bool>
+ </property>
+ <property name="flat">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ </layout>
</item>
<item>
<widget class="QTextEdit" name="divePlanOutput">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Preferred">
<horstretch>0</horstretch>
@@ -614,10 +646,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
- <widget class="KMessageWidget" name="mainErrorMessage" native="true">
- <zorder>mainSplitter</zorder>
- <zorder>mainSplitter</zorder>
- </widget>
+ <widget class="KMessageWidget" name="mainErrorMessage" native="true"/>
</item>
</layout>
</widget>
@@ -626,7 +655,7 @@ p, li { white-space: pre-wrap; }
<rect>
<x>0</x>
<y>0</y>
- <width>1418</width>
+ <width>1682</width>
<height>22</height>
</rect>
</property>
diff --git a/qt-ui/plannerSettings.ui b/qt-ui/plannerSettings.ui
index 57814eabb..271906e70 100644
--- a/qt-ui/plannerSettings.ui
+++ b/qt-ui/plannerSettings.ui
@@ -6,312 +6,397 @@
<rect>
<x>0</x>
<y>0</y>
- <width>963</width>
- <height>324</height>
+ <width>537</width>
+ <height>435</height>
</rect>
</property>
<property name="windowTitle">
<string>Form</string>
</property>
- <widget class="QWidget" name="gridLayoutWidget">
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>20</y>
- <width>872</width>
- <height>463</height>
- </rect>
- </property>
- <layout class="QGridLayout" name="gridLayout_2">
- <item row="1" column="2">
- <widget class="QFrame" name="frame_2">
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
+ <layout class="QHBoxLayout" name="horizontalLayout">
+ <item>
+ <widget class="QFrame" name="frame_3">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" name="gridLayout">
+ <item row="6" column="0">
+ <widget class="QLabel" name="label_9">
+ <property name="text">
+ <string>surface to the bottom</string>
+ </property>
+ </widget>
+ </item>
+ <item row="10" column="1">
+ <widget class="QDoubleSpinBox" name="bottompo2">
+ <property name="suffix">
+ <string>bar</string>
+ </property>
+ <property name="maximum">
+ <double>2.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.100000000000000</double>
+ </property>
+ <property name="value">
+ <double>1.400000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="6" column="1">
+ <widget class="QSpinBox" name="descRate">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="maximumSize">
+ <size>
+ <width>16777215</width>
+ <height>20</height>
+ </size>
+ </property>
+ <property name="suffix">
+ <string>m/min</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="value">
+ <number>18</number>
+ </property>
+ </widget>
+ </item>
+ <item row="11" column="1">
+ <widget class="QDoubleSpinBox" name="decopo2">
+ <property name="suffix">
+ <string>bar</string>
+ </property>
+ <property name="maximum">
+ <double>2.000000000000000</double>
+ </property>
+ <property name="singleStep">
+ <double>0.100000000000000</double>
+ </property>
+ <property name="value">
+ <double>1.600000000000000</double>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="ascRate75">
+ <property name="suffix">
+ <string>m/min</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="10" column="0">
+ <widget class="QLabel" name="label_6">
+ <property name="text">
+ <string>bottom pO₂</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="0">
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Descent rate&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QLabel" name="label_4">
+ <property name="text">
+ <string>6m/20ft to surface</string>
+ </property>
+ </widget>
+ </item>
+ <item row="11" column="0">
+ <widget class="QLabel" name="label_7">
+ <property name="text">
+ <string>deco pO₂</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="0">
+ <widget class="QLabel" name="label_2">
+ <property name="text">
+ <string>75%-50% avg. depth</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label">
+ <property name="text">
+ <string>below 75% avg. depth</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="0">
+ <widget class="QLabel" name="label_3">
+ <property name="text">
+ <string>50% avg. depth - 6m/20ft</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_5">
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Ascent rates&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item row="3" column="1">
+ <widget class="QSpinBox" name="ascRateStops">
+ <property name="suffix">
+ <string>m/min</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="1">
+ <widget class="QSpinBox" name="ascRateLast6m">
+ <property name="suffix">
+ <string>m/min</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="7" column="0">
+ <widget class="QLabel" name="label_12">
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Gas options&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item row="2" column="1">
+ <widget class="QSpinBox" name="ascRate50">
+ <property name="suffix">
+ <string>m/min</string>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
+ <item row="8" column="1">
+ <widget class="QSpinBox" name="bottomSAC"/>
+ </item>
+ <item row="8" column="0">
+ <widget class="QLabel" name="label_13">
+ <property name="text">
+ <string>bottom SAC</string>
+ </property>
+ </widget>
+ </item>
+ <item row="9" column="0">
+ <widget class="QLabel" name="label_14">
+ <property name="text">
+ <string>deco SAC</string>
+ </property>
+ </widget>
+ </item>
+ <item row="9" column="1">
+ <widget class="QSpinBox" name="decoStopSAC"/>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame_2">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Maximum" vsizetype="Maximum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::StyledPanel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <property name="sizeConstraint">
+ <enum>QLayout::SetNoConstraint</enum>
</property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_2">
- <item>
- <widget class="QCheckBox" name="lastStop">
- <property name="text">
- <string>Last Stop at 6m/20ft</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="backgasBreaks">
- <property name="text">
- <string>plan backgas breaks</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="Line" name="line">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QFrame" name="frame_4">
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QFormLayout" name="formLayout_2">
- <property name="fieldGrowthPolicy">
- <enum>QFormLayout::FieldsStayAtSizeHint</enum>
- </property>
- <item row="1" column="0">
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string> bottom pO₂</string>
- </property>
- </widget>
- </item>
- <item row="2" column="0">
- <widget class="QLabel" name="label_7">
- <property name="text">
- <string>deco pO₂</string>
- </property>
- </widget>
- </item>
- <item row="2" column="1">
- <widget class="QDoubleSpinBox" name="decopo2">
- <property name="suffix">
- <string>bar</string>
- </property>
- <property name="maximum">
- <double>2.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>0.100000000000000</double>
- </property>
- <property name="value">
- <double>1.600000000000000</double>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QDoubleSpinBox" name="bottompo2">
- <property name="suffix">
- <string>bar</string>
- </property>
- <property name="maximum">
- <double>2.000000000000000</double>
- </property>
- <property name="singleStep">
- <double>0.100000000000000</double>
- </property>
- <property name="value">
- <double>1.400000000000000</double>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="0">
- <widget class="QFrame" name="frame">
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout">
- <item>
- <widget class="QCheckBox" name="verbatim_plan">
- <property name="text">
- <string>verbatim diveplan</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="display_runtime">
- <property name="toolTip">
- <string>In dive plan, show runtime (absolute time) of stops</string>
- </property>
- <property name="text">
- <string>display runtime</string>
- </property>
- <property name="checked">
- <bool>true</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="display_duration">
- <property name="enabled">
- <bool>true</bool>
- </property>
- <property name="toolTip">
- <string>In dive plan, show duration (relative time) of stops</string>
- </property>
- <property name="text">
- <string>display segment duration</string>
- </property>
- <property name="checked">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QCheckBox" name="display_transitions">
- <property name="toolTip">
- <string>In diveplan, list transitions or treat them as implicit</string>
- </property>
- <property name="text">
- <string>display transitions in deco</string>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QFrame" name="frame_3">
- <property name="frameShape">
- <enum>QFrame::StyledPanel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <layout class="QFormLayout" name="formLayout">
- <item row="1" column="0">
- <widget class="QLabel" name="label">
- <property name="text">
- <string>below 75% avg. depth</string>
- </property>
- </widget>
- </item>
- <item row="3" column="0">
- <widget class="QLabel" name="label_2">
- <property name="text">
- <string>75%-50% avg. depth</string>
- </property>
- </widget>
- </item>
- <item row="4" column="0">
- <widget class="QLabel" name="label_3">
- <property name="text">
- <string>50% avg. depth - 6m/20ft</string>
- </property>
- </widget>
- </item>
- <item row="5" column="0">
- <widget class="QLabel" name="label_4">
- <property name="text">
- <string>6m/20ft to surface</string>
- </property>
- </widget>
- </item>
- <item row="0" column="0">
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Ascent rates</string>
- </property>
- </widget>
- </item>
- <item row="6" column="0">
- <widget class="QLabel" name="label_8">
- <property name="text">
- <string>Descent rate</string>
- </property>
- </widget>
- </item>
- <item row="8" column="0">
- <widget class="QLabel" name="label_9">
- <property name="text">
- <string>surface to the bottom</string>
- </property>
- </widget>
- </item>
- <item row="8" column="1">
- <widget class="QSpinBox" name="descRate">
- <property name="sizePolicy">
- <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
- <horstretch>0</horstretch>
- <verstretch>0</verstretch>
- </sizepolicy>
- </property>
- <property name="maximumSize">
- <size>
- <width>16777215</width>
- <height>20</height>
- </size>
- </property>
- <property name="suffix">
- <string>m/min</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- <property name="value">
- <number>18</number>
- </property>
- </widget>
- </item>
- <item row="1" column="1">
- <widget class="QSpinBox" name="ascRate75">
- <property name="suffix">
- <string>m/min</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="3" column="1">
- <widget class="QSpinBox" name="ascRate50">
- <property name="suffix">
- <string>m/min</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="4" column="1">
- <widget class="QSpinBox" name="ascRateStops">
- <property name="suffix">
- <string>m/min</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- <item row="5" column="1">
- <widget class="QSpinBox" name="ascRateLast6m">
- <property name="suffix">
- <string>m/min</string>
- </property>
- <property name="minimum">
- <number>1</number>
- </property>
- </widget>
- </item>
- </layout>
- </widget>
- </item>
- </layout>
- </widget>
+ <item>
+ <widget class="QLabel" name="label_10">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Planning options&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QFrame" name="frame">
+ <property name="frameShape">
+ <enum>QFrame::NoFrame</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <layout class="QGridLayout" name="gridLayout_2">
+ <item row="0" column="0">
+ <widget class="QLabel" name="label_15">
+ <property name="text">
+ <string>GF low</string>
+ </property>
+ </widget>
+ </item>
+ <item row="0" column="1">
+ <widget class="QSpinBox" name="gflow">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>150</number>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="0">
+ <widget class="QLabel" name="label_16">
+ <property name="text">
+ <string>GF high</string>
+ </property>
+ </widget>
+ </item>
+ <item row="1" column="1">
+ <widget class="QSpinBox" name="gfhigh">
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="maximum">
+ <number>150</number>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="drop_stone_mode">
+ <property name="text">
+ <string>Drop to first depth</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="lastStop">
+ <property name="text">
+ <string>Last Stop at 6m/20ft</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="backgasBreaks">
+ <property name="text">
+ <string>plan backgas breaks</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_11">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="text">
+ <string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Dive note options&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="display_runtime">
+ <property name="toolTip">
+ <string>In dive plan, show runtime (absolute time) of stops</string>
+ </property>
+ <property name="text">
+ <string>display runtime</string>
+ </property>
+ <property name="checked">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="display_duration">
+ <property name="enabled">
+ <bool>true</bool>
+ </property>
+ <property name="toolTip">
+ <string>In dive plan, show duration (relative time) of stops</string>
+ </property>
+ <property name="text">
+ <string>display segment duration</string>
+ </property>
+ <property name="checked">
+ <bool>false</bool>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="display_transitions">
+ <property name="toolTip">
+ <string>In diveplan, list transitions or treat them as implicit</string>
+ </property>
+ <property name="text">
+ <string>display transitions in deco</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="line">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>20</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="verbatim_plan">
+ <property name="text">
+ <string>verbatim diveplan</string>
+ </property>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ </item>
+ </layout>
</widget>
<tabstops>
- <tabstop>verbatim_plan</tabstop>
- <tabstop>display_runtime</tabstop>
- <tabstop>display_duration</tabstop>
- <tabstop>display_transitions</tabstop>
<tabstop>lastStop</tabstop>
<tabstop>backgasBreaks</tabstop>
- <tabstop>descRate</tabstop>
</tabstops>
<resources/>
<connections/>