mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Build a gui for configure OSTC 4
Signed-off-by: Anton Lundin <glance@acc.umu.se>
This commit is contained in:
parent
6e23ce1488
commit
0c276403ac
4 changed files with 1443 additions and 0 deletions
|
@ -175,6 +175,14 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDia
|
|||
ui.ostcDilTable->setItemDelegateForColumn(4, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH));
|
||||
ui.ostcSetPointTable->setItemDelegateForColumn(1, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::SETPOINT));
|
||||
ui.ostcSetPointTable->setItemDelegateForColumn(2, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH));
|
||||
ui.ostc4GasTable->setItemDelegateForColumn(1, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::PERCENT));
|
||||
ui.ostc4GasTable->setItemDelegateForColumn(2, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::PERCENT));
|
||||
ui.ostc4GasTable->setItemDelegateForColumn(3, new GasTypeComboBoxItemDelegate(this, GasTypeComboBoxItemDelegate::OSTC3));
|
||||
ui.ostc4GasTable->setItemDelegateForColumn(4, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH));
|
||||
ui.ostc4DilTable->setItemDelegateForColumn(3, new GasTypeComboBoxItemDelegate(this, GasTypeComboBoxItemDelegate::OSTC3));
|
||||
ui.ostc4DilTable->setItemDelegateForColumn(4, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH));
|
||||
ui.ostc4SetPointTable->setItemDelegateForColumn(1, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::SETPOINT));
|
||||
ui.ostc4SetPointTable->setItemDelegateForColumn(2, new GasSpinBoxItemDelegate(this, GasSpinBoxItemDelegate::DEPTH));
|
||||
|
||||
QSettings settings;
|
||||
settings.beginGroup("ConfigureDiveComputerDialog");
|
||||
|
@ -221,6 +229,27 @@ ConfigureDiveComputerDialog::ConfigureDiveComputerDialog(QWidget *parent) : QDia
|
|||
ui.ostcSetPointTable->setColumnWidth(i, width.toInt());
|
||||
}
|
||||
settings.endGroup();
|
||||
settings.beginGroup("ostc4GasTable");
|
||||
for (int i = 0; i < ui.ostc4GasTable->columnCount(); i++) {
|
||||
QVariant width = settings.value(QString("colwidth%1").arg(i));
|
||||
if (width.isValid())
|
||||
ui.ostc4GasTable->setColumnWidth(i, width.toInt());
|
||||
}
|
||||
settings.endGroup();
|
||||
settings.beginGroup("ostc4DilTable");
|
||||
for (int i = 0; i < ui.ostc4DilTable->columnCount(); i++) {
|
||||
QVariant width = settings.value(QString("colwidth%1").arg(i));
|
||||
if (width.isValid())
|
||||
ui.ostc4DilTable->setColumnWidth(i, width.toInt());
|
||||
}
|
||||
settings.endGroup();
|
||||
settings.beginGroup("ostc4SetPointTable");
|
||||
for (int i = 0; i < ui.ostc4SetPointTable->columnCount(); i++) {
|
||||
QVariant width = settings.value(QString("colwidth%1").arg(i));
|
||||
if (width.isValid())
|
||||
ui.ostc4SetPointTable->setColumnWidth(i, width.toInt());
|
||||
}
|
||||
settings.endGroup();
|
||||
settings.endGroup();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue