mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Preconfigured import of Subsurface CSV log file
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e471335af6
commit
1e04aec7fd
5 changed files with 367 additions and 1 deletions
|
@ -12,6 +12,7 @@ const DiveLogImportDialog::CSVAppConfig DiveLogImportDialog::CSVApps[CSVAPPS] =
|
|||
{ "XP5", 1, 2, 10, -1, -1, -1, -1, -1, -1, "Tab" },
|
||||
{ "SensusCSV", 10, 11, -1, -1, -1, -1, -1, -1, -1, "," },
|
||||
{ "Seabear CSV", 1, 2, 6, -1, -1, 3, 4, 5, 7, ";" },
|
||||
{ "SubsurfaceCSV", -1, -1, -1, -1, -1, -1, -1, -1, -1, "," },
|
||||
{ NULL, }
|
||||
};
|
||||
|
||||
|
@ -25,6 +26,7 @@ DiveLogImportDialog::DiveLogImportDialog(QStringList *fn, QWidget *parent) : QDi
|
|||
|
||||
/* Add indexes of XSLTs requiring special handling to the list */
|
||||
specialCSV << 3;
|
||||
specialCSV << 5;
|
||||
|
||||
for (int i = 0; !CSVApps[i].name.isNull(); ++i)
|
||||
ui->knownImports->addItem(CSVApps[i].name);
|
||||
|
@ -160,8 +162,10 @@ void DiveLogImportDialog::on_knownImports_currentIndexChanged(int index)
|
|||
{
|
||||
if (specialCSV.contains(index)) {
|
||||
ui->groupBox_3->setEnabled(false);
|
||||
ui->CSVUnits->setEnabled(false);
|
||||
} else {
|
||||
ui->groupBox_3->setEnabled(true);
|
||||
ui->CSVUnits->setEnabled(true);
|
||||
}
|
||||
if (index == 0)
|
||||
return;
|
||||
|
|
|
@ -64,7 +64,7 @@ private:
|
|||
QString separator;
|
||||
};
|
||||
|
||||
#define CSVAPPS 6
|
||||
#define CSVAPPS 7
|
||||
static const CSVAppConfig CSVApps[CSVAPPS];
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue