diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-01-07 17:02:42 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-01-07 17:02:42 -0800 |
commit | 5f4770a5bd361b2bf0675f3e0de869242861f8e3 (patch) | |
tree | a3ca0cc70ce822d134c77b70bc0ca44e88cf5f4c /qt-ui/divelogimportdialog.h | |
parent | db988aa62b58461e7e1046e36dd0eea70f9c7f88 (diff) | |
download | subsurface-5f4770a5bd361b2bf0675f3e0de869242861f8e3.tar.gz |
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>
Diffstat (limited to 'qt-ui/divelogimportdialog.h')
-rw-r--r-- | qt-ui/divelogimportdialog.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h index e8421583c..9281b2b10 100644 --- a/qt-ui/divelogimportdialog.h +++ b/qt-ui/divelogimportdialog.h @@ -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; |