summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/divelogimportdialog.cpp14
-rw-r--r--qt-ui/divelogimportdialog.h1
-rw-r--r--qt-ui/divelogimportdialog.ui28
3 files changed, 35 insertions, 8 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp
index 3eb17ef7e..8e53a998c 100644
--- a/qt-ui/divelogimportdialog.cpp
+++ b/qt-ui/divelogimportdialog.cpp
@@ -6,12 +6,12 @@
#include "ui_divelogimportdialog.h"
const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = {
- // time, depth, temperature, po2, cns, stopdepth
+ // time, depth, temperature, po2, cns, ndl, stopdepth
{ "", },
- { "APD Log Viewer", 1, 2, 16, 7, 18, 19, "Tab" },
- { "XP5", 1, 2, 10, -1, -1, -1, "Tab" },
- { "SensusCSV", 10, 11, -1, -1, -1, -1, "," },
- { "Seabear CSV", 1, 2, 6, -1, -1, 5, ";" },
+ { "APD Log Viewer", 1, 2, 16, 7, 18, -1, 19, "Tab" },
+ { "XP5", 1, 2, 10, -1, -1, -1, -1, "Tab" },
+ { "SensusCSV", 10, 11, -1, -1, -1, -1, -1, "," },
+ { "Seabear CSV", 1, 2, 6, -1, -1, -1, 5, ";" },
{ NULL, }
};
@@ -45,6 +45,8 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDi
connect(ui->po2CheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
connect(ui->CSVcns, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
connect(ui->cnsCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
+ connect(ui->CSVndl, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
+ connect(ui->ndlCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
connect(ui->CSVstopdepth, SIGNAL(valueChanged(int)), this, SLOT(unknownImports()));
connect(ui->stopdepthCheckBox, SIGNAL(clicked(bool)), this, SLOT(unknownImports()));
QShortcut *close = new QShortcut(QKeySequence(Qt::CTRL + Qt::Key_W), this);
@@ -67,6 +69,7 @@ void DiveLogImportDialog::on_buttonBox_accepted()
ui->CSVDepth->value() - 1, VALUE_IF_CHECKED(CSVTemperature),
VALUE_IF_CHECKED(CSVpo2),
VALUE_IF_CHECKED(CSVcns),
+ VALUE_IF_CHECKED(CSVndl),
VALUE_IF_CHECKED(CSVstopdepth),
ui->CSVSeparator->currentIndex(),
specialCSV.contains(ui->knownImports->currentIndex()) ? CSVApps[ui->knownImports->currentIndex()].name.toUtf8().data() : "csv",
@@ -116,6 +119,7 @@ void DiveLogImportDialog::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(CSVndl, ndlCheckBox, CSVApps[index].ndl);
SET_VALUE_AND_CHECKBOX(CSVstopdepth, stopdepthCheckBox, CSVApps[index].stopdepth);
ui->CSVSeparator->blockSignals(true);
int separator_index = ui->CSVSeparator->findText(CSVApps[index].separator);
diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h
index f9df691db..ff81fe6da 100644
--- a/qt-ui/divelogimportdialog.h
+++ b/qt-ui/divelogimportdialog.h
@@ -36,6 +36,7 @@ private:
int temperature;
int po2;
int cns;
+ int ndl;
int stopdepth;
QString separator;
};
diff --git a/qt-ui/divelogimportdialog.ui b/qt-ui/divelogimportdialog.ui
index d6d07ce7f..0fbb96b99 100644
--- a/qt-ui/divelogimportdialog.ui
+++ b/qt-ui/divelogimportdialog.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>522</width>
- <height>352</height>
+ <height>385</height>
</rect>
</property>
<property name="windowTitle">
@@ -75,7 +75,7 @@
</property>
</widget>
</item>
- <item row="5" column="1">
+ <item row="7" column="1">
<widget class="QSpinBox" name="CSVstopdepth">
<property name="enabled">
<bool>false</bool>
@@ -88,7 +88,7 @@
</property>
</widget>
</item>
- <item row="5" column="0">
+ <item row="7" column="0">
<widget class="QCheckBox" name="stopdepthCheckBox">
<property name="text">
<string>Stopdepth</string>
@@ -139,6 +139,26 @@
</property>
</widget>
</item>
+ <item row="5" column="0">
+ <widget class="QCheckBox" name="ndlCheckBox">
+ <property name="text">
+ <string>NDL</string>
+ </property>
+ </widget>
+ </item>
+ <item row="5" column="1">
+ <widget class="QSpinBox" name="CSVndl">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="minimum">
+ <number>1</number>
+ </property>
+ <property name="value">
+ <number>1</number>
+ </property>
+ </widget>
+ </item>
<item row="4" column="0">
<widget class="QCheckBox" name="cnsCheckBox">
<property name="text">
@@ -147,6 +167,8 @@
</widget>
</item>
</layout>
+ <zorder>ndlCheckBox</zorder>
+ <zorder>CSVndl</zorder>
<zorder>label</zorder>
<zorder>label_2</zorder>
<zorder>CSVTime</zorder>