diff options
author | Miika Turkia <miika.turkia@gmail.com> | 2020-05-04 07:57:54 +0300 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2020-05-04 10:43:40 +0200 |
commit | 05177cfc145d264ff99b7a0bf9e395862caf2435 (patch) | |
tree | b915d51f90e188ae71ab2dfef351eea957573828 /desktop-widgets | |
parent | e1c3f29b889456977d8cd73596f7395c93268e3c (diff) | |
download | subsurface-05177cfc145d264ff99b7a0bf9e395862caf2435.tar.gz |
CSV export: include dive mode field
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/divelogimportdialog.cpp | 41 |
1 files changed, 22 insertions, 19 deletions
diff --git a/desktop-widgets/divelogimportdialog.cpp b/desktop-widgets/divelogimportdialog.cpp index ceae878c6..877c6f7c8 100644 --- a/desktop-widgets/divelogimportdialog.cpp +++ b/desktop-widgets/divelogimportdialog.cpp @@ -67,7 +67,7 @@ enum Known { ColumnNameProvider::ColumnNameProvider(QObject *parent) : QAbstractListModel(parent) { - columnNames << tr("Dive #") << tr("Date") << tr("Time") << tr("Duration") << tr("Location") << tr("GPS") << tr("Weight") << tr("Cyl. size") << tr("Start pressure") << + columnNames << tr("Dive #") << tr("Date") << tr("Time") << tr("Duration") << tr("Mode") << tr("Location") << tr("GPS") << tr("Weight") << tr("Cyl. size") << tr("Start pressure") << tr("End pressure") << tr("Max. depth") << tr("Avg. depth") << tr("Divemaster") << tr("Buddy") << tr("Suit") << tr("Notes") << tr("Tags") << tr("Air temp.") << tr("Water temp.") << tr("O₂") << tr("He") << tr("Sample time") << tr("Sample depth") << tr("Sample temperature") << tr("Sample pO₂") << tr("Sample CNS") << tr("Sample NDL") << tr("Sample TTS") << tr("Sample stopdepth") << tr("Sample pressure") << @@ -720,23 +720,24 @@ void DiveLogImportDialog::loadFileContents(int value, whatChanged triggeredBy) headers.replace(3, tr("Duration")); headers.replace(4, tr("Max. depth")); headers.replace(5, tr("Avg. depth")); - headers.replace(6, tr("Air temp.")); - headers.replace(7, tr("Water temp.")); - headers.replace(8, tr("Cyl. size")); - headers.replace(9, tr("Start pressure")); - headers.replace(10, tr("End pressure")); - headers.replace(11, tr("O₂")); - headers.replace(12, tr("He")); - headers.replace(13, tr("Location")); - headers.replace(14, tr("GPS")); - headers.replace(15, tr("Divemaster")); - headers.replace(16, tr("Buddy")); - headers.replace(17, tr("Suit")); - headers.replace(18, tr("Rating")); - headers.replace(19, tr("Visibility")); - headers.replace(20, tr("Notes")); - headers.replace(21, tr("Weight")); - headers.replace(22, tr("Tags")); + headers.replace(6, tr("Mode")); + headers.replace(7, tr("Air temp.")); + headers.replace(8, tr("Water temp.")); + headers.replace(9, tr("Cyl. size")); + headers.replace(10, tr("Start pressure")); + headers.replace(11, tr("End pressure")); + headers.replace(12, tr("O₂")); + headers.replace(13, tr("He")); + headers.replace(14, tr("Location")); + headers.replace(15, tr("GPS")); + headers.replace(16, tr("Divemaster")); + headers.replace(17, tr("Buddy")); + headers.replace(18, tr("Suit")); + headers.replace(19, tr("Rating")); + headers.replace(20, tr("Visibility")); + headers.replace(21, tr("Notes")); + headers.replace(22, tr("Weight")); + headers.replace(23, tr("Tags")); blockSignals(true); ui->CSVSeparator->setCurrentText(separator); @@ -937,7 +938,7 @@ void DiveLogImportDialog::on_buttonBox_accepted() } else { for (int i = 0; i < fileNames.size(); ++i) { if (r.indexOf(tr("Sample time")) < 0) { - char *params[59]; + char *params[61]; int pnr = 0; params[pnr++] = strdup("numberField"); params[pnr++] = intdup(r.indexOf(tr("Dive #"))); @@ -947,6 +948,8 @@ void DiveLogImportDialog::on_buttonBox_accepted() params[pnr++] = intdup(r.indexOf(tr("Time"))); params[pnr++] = strdup("durationField"); params[pnr++] = intdup(r.indexOf(tr("Duration"))); + params[pnr++] = strdup("modeField"); + params[pnr++] = intdup(r.indexOf(tr("Mode"))); params[pnr++] = strdup("locationField"); params[pnr++] = intdup(r.indexOf(tr("Location"))); params[pnr++] = strdup("gpsField"); |