diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2015-07-22 18:06:30 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-07-22 11:21:50 -0700 |
commit | c9a98a4f7b558ad2e7cbc52ebf2104480b6a5685 (patch) | |
tree | b52dfda56b24811794cb51a47b8cc82019ca319c /qt-ui | |
parent | ac4871c699d56d7d2163c4cc22dfd154e8cf7342 (diff) | |
download | subsurface-c9a98a4f7b558ad2e7cbc52ebf2104480b6a5685.tar.gz |
Add a known type for second DC on APD import
This patch adds importing of sensor values from the second DC on APD log
import.
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/divelogimportdialog.cpp | 8 | ||||
-rw-r--r-- | qt-ui/divelogimportdialog.h | 2 |
2 files changed, 6 insertions, 4 deletions
diff --git a/qt-ui/divelogimportdialog.cpp b/qt-ui/divelogimportdialog.cpp index 7eb3f48f6..59edd2c43 100644 --- a/qt-ui/divelogimportdialog.cpp +++ b/qt-ui/divelogimportdialog.cpp @@ -13,7 +13,8 @@ const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = // time, depth, temperature, po2, sensor1, sensor2, sensor3, cns, ndl, tts, stopdepth, pressure, setpoint // indices are 0 based, -1 means the column doesn't exist { "Manual import", }, - { "APD Log Viewer", 0, 1, 15, 6, 3, 4, 5, 17, -1, -1, 18, -1, 2, "Tab" }, + { "APD Log Viewer - DC1", 0, 1, 15, 6, 3, 4, 5, 17, -1, -1, 18, -1, 2, "Tab" }, + { "APD Log Viewer - DC2", 0, 1, 15, 6, 7, 8, 9, 17, -1, -1, 18, -1, 2, "Tab" }, { "XP5", 0, 1, 9, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "Tab" }, { "SensusCSV", 9, 10, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, "," }, { "Seabear CSV", 0, 1, 5, -1, -1, -1, -1, -1, 2, 3, 4, 6, -1, ";" }, @@ -24,6 +25,7 @@ const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] = static enum { MANUAL, APD, + APD2, XP5, SENSUS, SEABEAR, @@ -446,13 +448,13 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) } // Special handling for APD Log Viewer - if ((triggeredBy == KNOWNTYPES && value == APD) || (triggeredBy == INITIAL && fileNames.first().endsWith(".apd", Qt::CaseInsensitive))) { + if ((triggeredBy == KNOWNTYPES && (value == APD || value == APD2)) || (triggeredBy == INITIAL && fileNames.first().endsWith(".apd", Qt::CaseInsensitive))) { apd=true; firstLine = "Sample time\tSample depth\tSample setpoint\tSample sensor1 pO₂\tSample sensor2 pO₂\tSample sensor3 pO₂\tSample pO₂\t\t\t\t\t\t\t\t\tSample temperature\t\tSample CNS\tSample stopdepth"; blockSignals(true); ui->CSVSeparator->setCurrentText(tr("Tab")); if (triggeredBy == INITIAL && fileNames.first().contains(".apd", Qt::CaseInsensitive)) - ui->knownImports->setCurrentText("APD Log Viewer"); + ui->knownImports->setCurrentText("APD Log Viewer - DC1"); blockSignals(false); } diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h index c5c750973..050090f97 100644 --- a/qt-ui/divelogimportdialog.h +++ b/qt-ui/divelogimportdialog.h @@ -114,7 +114,7 @@ private: QString separator; }; -#define CSVAPPS 7 +#define CSVAPPS 8 static const CSVAppConfig CSVApps[CSVAPPS]; }; |