summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/configuredivecomputerdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/configuredivecomputerdialog.cpp')
-rw-r--r--desktop-widgets/configuredivecomputerdialog.cpp31
1 files changed, 18 insertions, 13 deletions
diff --git a/desktop-widgets/configuredivecomputerdialog.cpp b/desktop-widgets/configuredivecomputerdialog.cpp
index 8df184788..428b326e4 100644
--- a/desktop-widgets/configuredivecomputerdialog.cpp
+++ b/desktop-widgets/configuredivecomputerdialog.cpp
@@ -38,6 +38,8 @@ GasSpinBoxItemDelegate::~GasSpinBoxItemDelegate()
QWidget *GasSpinBoxItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
+ Q_UNUSED(option)
+ Q_UNUSED(index)
// Create the spinbox and give it it's settings
QSpinBox *sb = new QSpinBox(parent);
if (type == PERCENT) {
@@ -82,6 +84,8 @@ GasTypeComboBoxItemDelegate::~GasTypeComboBoxItemDelegate()
QWidget *GasTypeComboBoxItemDelegate::createEditor(QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
+ Q_UNUSED(option)
+ Q_UNUSED(index)
// Create the combobox and populate it
QComboBox *cb = new QComboBox(parent);
cb->addItem(QString("Disabled"));
@@ -327,6 +331,7 @@ ConfigureDiveComputerDialog::~ConfigureDiveComputerDialog()
void ConfigureDiveComputerDialog::closeEvent(QCloseEvent *event)
{
+ Q_UNUSED(event)
dc_close();
QSettings settings;
@@ -472,9 +477,9 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC3()
deviceDetails->alwaysShowppO2 = ui.alwaysShowppO2->isChecked();
deviceDetails->tempSensorOffset = ui.tempSensorOffsetDoubleSpinBox->value() * 10;
deviceDetails->safetyStopLength = ui.safetyStopLengthSpinBox->value();
- deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox->value();
- deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox->value();
- deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox->value();
+ deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox->value() * 10;
+ deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox->value() * 10;
+ deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox->value() * 10;
//set gas values
gas gas1;
@@ -605,9 +610,9 @@ void ConfigureDiveComputerDialog::populateDeviceDetailsOSTC()
deviceDetails->decoGasConsumption = ui.decoGasConsumption_3->value();
deviceDetails->graphicalSpeedIndicator = ui.graphicalSpeedIndicator_3->isChecked();
deviceDetails->safetyStopLength = ui.safetyStopLengthSpinBox_3->value();
- deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox_3->value();
- deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox_3->value();
- deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox_3->value();
+ deviceDetails->safetyStopStartDepth = ui.safetyStopStartDepthDoubleSpinBox_3->value() * 10;
+ deviceDetails->safetyStopEndDepth = ui.safetyStopEndDepthDoubleSpinBox_3->value() * 10;
+ deviceDetails->safetyStopResetDepth = ui.safetyStopResetDepthDoubleSpinBox_3->value() * 10;
//set gas values
gas gas1;
@@ -856,9 +861,9 @@ void ConfigureDiveComputerDialog::reloadValuesOSTC3()
ui.alwaysShowppO2->setChecked(deviceDetails->alwaysShowppO2);
ui.tempSensorOffsetDoubleSpinBox->setValue((double)deviceDetails->tempSensorOffset / 10.0);
ui.safetyStopLengthSpinBox->setValue(deviceDetails->safetyStopLength);
- ui.safetyStopStartDepthDoubleSpinBox->setValue(deviceDetails->safetyStopStartDepth);
- ui.safetyStopEndDepthDoubleSpinBox->setValue(deviceDetails->safetyStopEndDepth);
- ui.safetyStopResetDepthDoubleSpinBox->setValue(deviceDetails->safetyStopResetDepth);
+ ui.safetyStopStartDepthDoubleSpinBox->setValue(deviceDetails->safetyStopStartDepth / 10.0);
+ ui.safetyStopEndDepthDoubleSpinBox->setValue(deviceDetails->safetyStopEndDepth / 10.0);
+ ui.safetyStopResetDepthDoubleSpinBox->setValue(deviceDetails->safetyStopResetDepth / 10.0);
//load gas 1 values
ui.ostc3GasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen)));
@@ -983,9 +988,9 @@ setNumberOfDives
ui.decoGasConsumption_3->setValue(deviceDetails->decoGasConsumption);
ui.graphicalSpeedIndicator_3->setChecked(deviceDetails->graphicalSpeedIndicator);
ui.safetyStopLengthSpinBox_3->setValue(deviceDetails->safetyStopLength);
- ui.safetyStopStartDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopStartDepth);
- ui.safetyStopEndDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopEndDepth);
- ui.safetyStopResetDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopResetDepth);
+ ui.safetyStopStartDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopStartDepth / 10.0);
+ ui.safetyStopEndDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopEndDepth / 10.0);
+ ui.safetyStopResetDepthDoubleSpinBox_3->setValue(deviceDetails->safetyStopResetDepth / 10.0);
//load gas 1 values
ui.ostcGasTable->setItem(0, 1, new QTableWidgetItem(QString::number(deviceDetails->gas1.oxygen)));
@@ -1270,6 +1275,6 @@ void ConfigureDiveComputerDialog::dc_close()
ui.DiveComputerList->setEnabled(true);
ui.logToFile->setEnabled(true);
ui.updateFirmwareButton->setEnabled(false);
- ui.progressBar->setFormat("Disonnected from device");
+ ui.progressBar->setFormat("Disconnected from device");
ui.progressBar->setValue(0);
}