From 5f4770a5bd361b2bf0675f3e0de869242861f8e3 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 7 Jan 2015 17:02:42 -0800 Subject: 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 --- qt-ui/divelogimportdialog.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'qt-ui/divelogimportdialog.h') 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; -- cgit v1.2.3-70-g09d2