summaryrefslogtreecommitdiffstats
path: root/qt-ui/configuredivecomputerdialog.cpp
diff options
context:
space:
mode:
authorGravatar Joseph W. Joshua <joejoshw@gmail.com>2014-06-21 09:14:55 +0300
committerGravatar Thiago Macieira <thiago@macieira.org>2014-08-13 10:48:14 -0700
commita52beebbe9ba8d335d6d867a868166996dc6711e (patch)
tree14fa8d2b1e18d9cb57fedb4cf55550f8c056d703 /qt-ui/configuredivecomputerdialog.cpp
parent8b39d2fc172b72ade19a754f33575f663573f147 (diff)
downloadsubsurface-a52beebbe9ba8d335d6d867a868166996dc6711e.tar.gz
Implement saving of OSTC3 Gas Settings
Implements writing OSTC3 gas settings to the device. Signed-off-by: Joseph W. Joshua <joejoshw@gmail.com> Signed-off-by: Thiago Macieira <thiago@macieira.org>
Diffstat (limited to 'qt-ui/configuredivecomputerdialog.cpp')
-rw-r--r--qt-ui/configuredivecomputerdialog.cpp38
1 files changed, 38 insertions, 0 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 27c377a4e..a6dd95208 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -129,6 +129,44 @@ void ConfigureDiveComputerDialog::populateDeviceDetails()
deviceDetails->setDateFormat(ui->dateFormatComboBox->currentIndex());
deviceDetails->setCompassGain(ui->compassGainComboBox->currentIndex());
deviceDetails->setSyncTime(ui->dateTimeSyncCheckBox->isChecked());
+
+ //set gas values
+ gas gas1;
+ gas gas2;
+ gas gas3;
+ gas gas4;
+ gas gas5;
+
+ gas1.oxygen = ui->ostc3GasTable->item(0, 1)->text().toInt();
+ gas1.helium = ui->ostc3GasTable->item(0, 2)->text().toInt();
+ gas1.type = ui->ostc3GasTable->item(0, 3)->text().toInt();
+ gas1.depth = ui->ostc3GasTable->item(0, 4)->text().toInt();
+
+ gas2.oxygen = ui->ostc3GasTable->item(1, 1)->text().toInt();
+ gas2.helium = ui->ostc3GasTable->item(1, 2)->text().toInt();
+ gas2.type = ui->ostc3GasTable->item(1, 3)->text().toInt();
+ gas2.depth = ui->ostc3GasTable->item(1, 4)->text().toInt();
+
+ gas3.oxygen = ui->ostc3GasTable->item(2, 1)->text().toInt();
+ gas3.helium = ui->ostc3GasTable->item(2, 2)->text().toInt();
+ gas3.type = ui->ostc3GasTable->item(2, 3)->text().toInt();
+ gas3.depth = ui->ostc3GasTable->item(2, 4)->text().toInt();
+
+ gas4.oxygen = ui->ostc3GasTable->item(3, 1)->text().toInt();
+ gas4.helium = ui->ostc3GasTable->item(3, 2)->text().toInt();
+ gas4.type = ui->ostc3GasTable->item(3, 3)->text().toInt();
+ gas4.depth = ui->ostc3GasTable->item(3, 4)->text().toInt();
+
+ gas5.oxygen = ui->ostc3GasTable->item(4, 1)->text().toInt();
+ gas5.helium = ui->ostc3GasTable->item(4, 2)->text().toInt();
+ gas5.type = ui->ostc3GasTable->item(4, 3)->text().toInt();
+ gas5.depth = ui->ostc3GasTable->item(4, 4)->text().toInt();
+
+ deviceDetails->setGas1(gas1);
+ deviceDetails->setGas2(gas2);
+ deviceDetails->setGas3(gas3);
+ deviceDetails->setGas4(gas4);
+ deviceDetails->setGas5(gas5);
}
void ConfigureDiveComputerDialog::readSettings()