aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/configuredivecomputerdialog.cpp
diff options
context:
space:
mode:
authorGravatar Joseph W. Joshua <joejoshw@gmail.com>2014-06-11 11:09:01 +0300
committerGravatar Thiago Macieira <thiago@macieira.org>2014-08-13 10:48:14 -0700
commit09ec8a44e5c48b6b6a2e4ebb1253fd3cd94154ae (patch)
tree8e446dedf7e8ee9ac3eca4ade11ec0ea46bce238 /qt-ui/configuredivecomputerdialog.cpp
parentaad60ef6da3308960767a47cb750c2ba9aab54bd (diff)
downloadsubsurface-09ec8a44e5c48b6b6a2e4ebb1253fd3cd94154ae.tar.gz
Add Support for more OSTC 3 Settings
Adds support for more OSTC 3 Settings to the reading, writing, backup and restore functions. These settings are: last deco, units, sampling rate, salinity, dive mode colour and compass gain. 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.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/qt-ui/configuredivecomputerdialog.cpp b/qt-ui/configuredivecomputerdialog.cpp
index 2f8771ed7..c50306f1a 100644
--- a/qt-ui/configuredivecomputerdialog.cpp
+++ b/qt-ui/configuredivecomputerdialog.cpp
@@ -127,10 +127,16 @@ void ConfigureDiveComputerDialog::fill_device_list(int dc_type)
void ConfigureDiveComputerDialog::populateDeviceDetails()
{
+ deviceDetails->setCustomText(ui->customTextLlineEdit->text());
+ deviceDetails->setLastDeco(ui->lastDecoSpinBox->value());
deviceDetails->setBrightness(ui->brightnessComboBox->currentIndex());
+ deviceDetails->setUnits(ui->unitsComboBox->currentIndex());
+ deviceDetails->setSamplingRate(ui->samplingRateComboBox->currentIndex());
+ deviceDetails->setSalinity(ui->salinitySpinBox->value());
+ deviceDetails->setDiveModeColor(ui->diveModeColour->currentIndex());
deviceDetails->setLanguage(ui->languageComboBox->currentIndex());
deviceDetails->setDateFormat(ui->dateFormatComboBox->currentIndex());
- deviceDetails->setCustomText(ui->customTextLlineEdit->text());
+ deviceDetails->setCompassGain(ui->compassGainComboBox->currentIndex());
deviceDetails->setSyncTime(ui->dateTimeSyncCheckBox->isChecked());
}
@@ -224,9 +230,15 @@ void ConfigureDiveComputerDialog::reloadValues()
ui->serialNoLineEdit->setText(deviceDetails->serialNo());
ui->firmwareVersionLineEdit->setText(deviceDetails->firmwareVersion());
ui->customTextLlineEdit->setText(deviceDetails->customText());
+ ui->lastDecoSpinBox->setValue(deviceDetails->lastDeco());
ui->brightnessComboBox->setCurrentIndex(deviceDetails->brightness());
+ ui->unitsComboBox->setCurrentIndex(deviceDetails->units());
+ ui->samplingRateComboBox->setCurrentIndex(deviceDetails->samplingRate());
+ ui->salinitySpinBox->setValue(deviceDetails->salinity());
+ ui->diveModeColour->setCurrentIndex(deviceDetails->diveModeColor());
ui->languageComboBox->setCurrentIndex(deviceDetails->language());
ui->dateFormatComboBox->setCurrentIndex(deviceDetails->dateFormat());
+ ui->compassGainComboBox->setCurrentIndex(deviceDetails->compassGain());
}