summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp68
-rw-r--r--qt-ui/configuredivecomputerdialog.ui22
2 files changed, 79 insertions, 11 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index a6dd95208..f878ec11a 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -167,6 +167,44 @@ void ConfigureDiveComputerDialog::populateDeviceDetails()
deviceDetails->setGas3(gas3);
deviceDetails->setGas4(gas4);
deviceDetails->setGas5(gas5);
+
+ //set dil values
+ gas dil1;
+ gas dil2;
+ gas dil3;
+ gas dil4;
+ gas dil5;
+
+ dil1.oxygen = ui->ostc3DilTable->item(0, 1)->text().toInt();
+ dil1.helium = ui->ostc3DilTable->item(0, 2)->text().toInt();
+ dil1.type = ui->ostc3DilTable->item(0, 3)->text().toInt();
+ dil1.depth = ui->ostc3DilTable->item(0, 4)->text().toInt();
+
+ dil2.oxygen = ui->ostc3DilTable->item(1, 1)->text().toInt();
+ dil2.helium = ui->ostc3DilTable->item(1, 2)->text().toInt();
+ dil2.type = ui->ostc3DilTable->item(1, 3)->text().toInt();
+ dil2.depth = ui->ostc3DilTable->item(1, 4)->text().toInt();
+
+ dil3.oxygen = ui->ostc3DilTable->item(2, 1)->text().toInt();
+ dil3.helium = ui->ostc3DilTable->item(2, 2)->text().toInt();
+ dil3.type = ui->ostc3DilTable->item(2, 3)->text().toInt();
+ dil3.depth = ui->ostc3DilTable->item(2, 4)->text().toInt();
+
+ dil4.oxygen = ui->ostc3DilTable->item(3, 1)->text().toInt();
+ dil4.helium = ui->ostc3DilTable->item(3, 2)->text().toInt();
+ dil4.type = ui->ostc3DilTable->item(3, 3)->text().toInt();
+ dil4.depth = ui->ostc3DilTable->item(3, 4)->text().toInt();
+
+ dil5.oxygen = ui->ostc3DilTable->item(4, 1)->text().toInt();
+ dil5.helium = ui->ostc3DilTable->item(4, 2)->text().toInt();
+ dil5.type = ui->ostc3DilTable->item(4, 3)->text().toInt();
+ dil5.depth = ui->ostc3DilTable->item(4, 4)->text().toInt();
+
+ deviceDetails->setDil1(dil1);
+ deviceDetails->setDil2(dil2);
+ deviceDetails->setDil3(dil3);
+ deviceDetails->setDil4(dil4);
+ deviceDetails->setDil5(dil5);
}
void ConfigureDiveComputerDialog::readSettings()
@@ -270,6 +308,36 @@ void ConfigureDiveComputerDialog::reloadValues()
ui->ostc3GasTable->setItem(4,2, new QTableWidgetItem(QString::number(deviceDetails->gas5().helium)));
ui->ostc3GasTable->setItem(4,3, new QTableWidgetItem(QString::number(deviceDetails->gas5().type)));
ui->ostc3GasTable->setItem(4,4, new QTableWidgetItem(QString::number(deviceDetails->gas5().depth)));
+
+ //load dil 1 values
+ ui->ostc3DilTable->setItem(0,1, new QTableWidgetItem(QString::number(deviceDetails->dil1().oxygen)));
+ ui->ostc3DilTable->setItem(0,2, new QTableWidgetItem(QString::number(deviceDetails->dil1().helium)));
+ ui->ostc3DilTable->setItem(0,3, new QTableWidgetItem(QString::number(deviceDetails->dil1().type)));
+ ui->ostc3DilTable->setItem(0,4, new QTableWidgetItem(QString::number(deviceDetails->dil1().depth)));
+
+ //load dil 2 values
+ ui->ostc3DilTable->setItem(1,1, new QTableWidgetItem(QString::number(deviceDetails->dil2().oxygen)));
+ ui->ostc3DilTable->setItem(1,2, new QTableWidgetItem(QString::number(deviceDetails->dil2().helium)));
+ ui->ostc3DilTable->setItem(1,3, new QTableWidgetItem(QString::number(deviceDetails->dil2().type)));
+ ui->ostc3DilTable->setItem(1,4, new QTableWidgetItem(QString::number(deviceDetails->dil2().depth)));
+
+ //load dil 3 values
+ ui->ostc3DilTable->setItem(2,1, new QTableWidgetItem(QString::number(deviceDetails->dil3().oxygen)));
+ ui->ostc3DilTable->setItem(2,2, new QTableWidgetItem(QString::number(deviceDetails->dil3().helium)));
+ ui->ostc3DilTable->setItem(2,3, new QTableWidgetItem(QString::number(deviceDetails->dil3().type)));
+ ui->ostc3DilTable->setItem(2,4, new QTableWidgetItem(QString::number(deviceDetails->dil3().depth)));
+
+ //load dil 4 values
+ ui->ostc3DilTable->setItem(3,1, new QTableWidgetItem(QString::number(deviceDetails->dil4().oxygen)));
+ ui->ostc3DilTable->setItem(3,2, new QTableWidgetItem(QString::number(deviceDetails->dil4().helium)));
+ ui->ostc3DilTable->setItem(3,3, new QTableWidgetItem(QString::number(deviceDetails->dil4().type)));
+ ui->ostc3DilTable->setItem(3,4, new QTableWidgetItem(QString::number(deviceDetails->dil4().depth)));
+
+ //load dil 5 values
+ ui->ostc3DilTable->setItem(4,1, new QTableWidgetItem(QString::number(deviceDetails->dil5().oxygen)));
+ ui->ostc3DilTable->setItem(4,2, new QTableWidgetItem(QString::number(deviceDetails->dil5().helium)));
+ ui->ostc3DilTable->setItem(4,3, new QTableWidgetItem(QString::number(deviceDetails->dil5().type)));
+ ui->ostc3DilTable->setItem(4,4, new QTableWidgetItem(QString::number(deviceDetails->dil5().depth)));
}
diff --git a/qt-ui/configuredivecomputerdialog.ui b/qt-ui/configuredivecomputerdialog.ui
index 6099535e8..0f99e597a 100644
--- a/qt-ui/configuredivecomputerdialog.ui
+++ b/qt-ui/configuredivecomputerdialog.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>701</width>
- <height>620</height>
+ <width>699</width>
+ <height>618</height>
</rect>
</property>
<property name="windowTitle">
@@ -475,17 +475,17 @@
</row>
<column>
<property name="text">
- <string>Gas No.</string>
+ <string/>
</property>
</column>
<column>
<property name="text">
- <string>%He</string>
+ <string>%O2</string>
</property>
</column>
<column>
<property name="text">
- <string>%O2</string>
+ <string>%He</string>
</property>
</column>
<column>
@@ -554,7 +554,7 @@
</row>
<column>
<property name="text">
- <string>Gas No.</string>
+ <string/>
</property>
</column>
<column>
@@ -579,27 +579,27 @@
</column>
<item row="0" column="0">
<property name="text">
- <string>Gas 1</string>
+ <string>Dil 1</string>
</property>
</item>
<item row="1" column="0">
<property name="text">
- <string>Gas 2</string>
+ <string>Dil 2</string>
</property>
</item>
<item row="2" column="0">
<property name="text">
- <string>Gas 3</string>
+ <string>Dil 3</string>
</property>
</item>
<item row="3" column="0">
<property name="text">
- <string>Gas 4</string>
+ <string>Dil 4</string>
</property>
</item>
<item row="4" column="0">
<property name="text">
- <string>Gas 5</string>
+ <string>Dil 5</string>
</property>
</item>
</widget>