mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Add optional support for stopdepth import from csv
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
5eccd73a30
commit
26656310ab
6 changed files with 52 additions and 6 deletions
|
|
@ -6,8 +6,8 @@
|
|||
|
||||
const CSVImportDialog::CSVAppConfig CSVImportDialog::CSVApps[CSVAPPS] = {
|
||||
{"", },
|
||||
{"APD Log Viewer", 0, 1, 15, 6, 17, "Tab"},
|
||||
{"XP5", 0, 1, 9, -1, -1, "Tab"},
|
||||
{"APD Log Viewer", 0, 1, 15, 6, 17, 18, "Tab"},
|
||||
{"XP5", 0, 1, 9, -1, -1, -1, "Tab"},
|
||||
{NULL,}
|
||||
};
|
||||
|
||||
|
|
@ -33,6 +33,8 @@ CSVImportDialog::CSVImportDialog(QWidget *parent) :
|
|||
connect(ui->po2CheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool)));
|
||||
connect(ui->CSVcns, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int)));
|
||||
connect(ui->cnsCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool)));
|
||||
connect(ui->CSVstopdepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int)));
|
||||
connect(ui->stopdepthCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool)));
|
||||
}
|
||||
|
||||
CSVImportDialog::~CSVImportDialog()
|
||||
|
|
@ -49,6 +51,7 @@ void CSVImportDialog::on_buttonBox_accepted()
|
|||
ui->CSVDepth->value(), VALUE_IF_CHECKED(CSVTemperature),
|
||||
VALUE_IF_CHECKED(CSVpo2),
|
||||
VALUE_IF_CHECKED(CSVcns),
|
||||
VALUE_IF_CHECKED(CSVstopdepth),
|
||||
&error);
|
||||
if (error != NULL) {
|
||||
|
||||
|
|
@ -92,6 +95,7 @@ void CSVImportDialog::on_knownImports_currentIndexChanged(int index)
|
|||
SET_VALUE_AND_CHECKBOX(CSVTemperature, temperatureCheckBox, CSVApps[index].temperature);
|
||||
SET_VALUE_AND_CHECKBOX(CSVpo2, po2CheckBox, CSVApps[index].po2);
|
||||
SET_VALUE_AND_CHECKBOX(CSVcns, cnsCheckBox, CSVApps[index].cns);
|
||||
SET_VALUE_AND_CHECKBOX(CSVstopdepth, stopdepthCheckBox, CSVApps[index].stopdepth);
|
||||
}
|
||||
|
||||
void CSVImportDialog::unknownImports(bool arg1)
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ private:
|
|||
int temperature;
|
||||
int po2;
|
||||
int cns;
|
||||
int stopdepth;
|
||||
QString separator;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -183,6 +183,23 @@
|
|||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="1">
|
||||
<widget class="QSpinBox" name="CSVstopdepth">
|
||||
<property name="enabled">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>0</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="5" column="0">
|
||||
<widget class="QCheckBox" name="stopdepthCheckBox">
|
||||
<property name="text">
|
||||
<string>Stopdepth</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>label</zorder>
|
||||
<zorder>label_2</zorder>
|
||||
|
|
@ -194,6 +211,8 @@
|
|||
<zorder>CSVpo2</zorder>
|
||||
<zorder>cnsCheckBox</zorder>
|
||||
<zorder>CSVcns</zorder>
|
||||
<zorder>stopdepthCheckBox</zorder>
|
||||
<zorder>CSVstopdepth</zorder>
|
||||
</widget>
|
||||
<widget class="QGroupBox" name="groupBox_4">
|
||||
<property name="geometry">
|
||||
|
|
@ -274,5 +293,11 @@
|
|||
<receiver>CSVcns</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>stopdepthCheckBox</sender>
|
||||
<signal>clicked(bool)</signal>
|
||||
<receiver>CSVstopdepth</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
</connection>
|
||||
</connections>
|
||||
</ui>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue