aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Anton Lundin <glance@acc.umu.se>2013-11-21 23:48:41 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-11-21 15:54:21 -0800
commit5eccd73a306298616da122ba4e653d4c8f391df8 (patch)
tree61e85992f9863bdd2f4913dd8c840c99cd88c5a9 /qt-ui
parent8dde12fa35e0e53f93efef8a99a7fe2e625e901c (diff)
downloadsubsurface-5eccd73a306298616da122ba4e653d4c8f391df8.tar.gz
Add optional support for cns import from csv files
Signed-off-by: Anton Lundin <glance@acc.umu.se> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/csvimportdialog.cpp8
-rw-r--r--qt-ui/csvimportdialog.h1
-rw-r--r--qt-ui/csvimportdialog.ui25
3 files changed, 32 insertions, 2 deletions
diff --git a/qt-ui/csvimportdialog.cpp b/qt-ui/csvimportdialog.cpp
index 8a213e055..281aa66f6 100644
--- a/qt-ui/csvimportdialog.cpp
+++ b/qt-ui/csvimportdialog.cpp
@@ -6,8 +6,8 @@
const CSVImportDialog::CSVAppConfig CSVImportDialog::CSVApps[CSVAPPS] = {
{"", },
- {"APD Log Viewer", 0, 1, 15, 6, "Tab"},
- {"XP5", 0, 1, 9, -1, "Tab"},
+ {"APD Log Viewer", 0, 1, 15, 6, 17, "Tab"},
+ {"XP5", 0, 1, 9, -1, -1, "Tab"},
{NULL,}
};
@@ -31,6 +31,8 @@ CSVImportDialog::CSVImportDialog(QWidget *parent) :
connect(ui->temperatureCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports(bool)));
connect(ui->CSVpo2, SIGNAL(valueChanged(int)), this, SLOT(unknownImports(int)));
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)));
}
CSVImportDialog::~CSVImportDialog()
@@ -46,6 +48,7 @@ void CSVImportDialog::on_buttonBox_accepted()
parse_csv_file(ui->CSVFile->text().toUtf8().data(), ui->CSVTime->value(),
ui->CSVDepth->value(), VALUE_IF_CHECKED(CSVTemperature),
VALUE_IF_CHECKED(CSVpo2),
+ VALUE_IF_CHECKED(CSVcns),
&error);
if (error != NULL) {
@@ -88,6 +91,7 @@ void CSVImportDialog::on_knownImports_currentIndexChanged(int index)
ui->CSVDepth->blockSignals(false);
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);
}
void CSVImportDialog::unknownImports(bool arg1)
diff --git a/qt-ui/csvimportdialog.h b/qt-ui/csvimportdialog.h
index b76882744..ec2f02347 100644
--- a/qt-ui/csvimportdialog.h
+++ b/qt-ui/csvimportdialog.h
@@ -38,6 +38,7 @@ private:
int depth;
int temperature;
int po2;
+ int cns;
QString separator;
};
diff --git a/qt-ui/csvimportdialog.ui b/qt-ui/csvimportdialog.ui
index fe70a075c..3b1167066 100644
--- a/qt-ui/csvimportdialog.ui
+++ b/qt-ui/csvimportdialog.ui
@@ -166,6 +166,23 @@
</property>
</widget>
</item>
+ <item row="4" column="1">
+ <widget class="QSpinBox" name="CSVcns">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="value">
+ <number>0</number>
+ </property>
+ </widget>
+ </item>
+ <item row="4" column="0">
+ <widget class="QCheckBox" name="cnsCheckBox">
+ <property name="text">
+ <string>Cns</string>
+ </property>
+ </widget>
+ </item>
</layout>
<zorder>label</zorder>
<zorder>label_2</zorder>
@@ -175,6 +192,8 @@
<zorder>CSVTemperature</zorder>
<zorder>po2CheckBox</zorder>
<zorder>CSVpo2</zorder>
+ <zorder>cnsCheckBox</zorder>
+ <zorder>CSVcns</zorder>
</widget>
<widget class="QGroupBox" name="groupBox_4">
<property name="geometry">
@@ -249,5 +268,11 @@
<receiver>CSVpo2</receiver>
<slot>setEnabled(bool)</slot>
</connection>
+ <connection>
+ <sender>cnsCheckBox</sender>
+ <signal>clicked(bool)</signal>
+ <receiver>CSVcns</receiver>
+ <slot>setEnabled(bool)</slot>
+ </connection>
</connections>
</ui>