mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
CSV import: make predefined imports work again
We need to reparse the file when the known type changes and want to make sure that we only try to guess the separator and the columns if the user hasn't told us otherwise. For the predefined imports this then looks up the correct columns and places the correct headings there - and then allows the user to modify them if needed. This has been lightly tested, there may be dragons. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
db988aa62b
commit
5f4770a5bd
2 changed files with 103 additions and 44 deletions
|
@ -80,11 +80,14 @@ class DiveLogImportDialog : public QDialog {
|
|||
public:
|
||||
explicit DiveLogImportDialog(QStringList fn, QWidget *parent = 0);
|
||||
~DiveLogImportDialog();
|
||||
|
||||
enum whatChanged { INITIAL, SEPARATOR, KNOWNTYPES };
|
||||
private
|
||||
slots:
|
||||
void on_buttonBox_accepted();
|
||||
void loadFileContents();
|
||||
void loadFileContentsSeperatorSelected(int value);
|
||||
void loadFileContentsKnownTypesSelected(int value);
|
||||
void loadFileContents(int value, enum whatChanged triggeredBy);
|
||||
|
||||
private:
|
||||
bool selector;
|
||||
QStringList fileNames;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue