aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui/divelogimportdialog.h
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2013-12-29 18:11:20 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-03 10:30:08 -0800
commitb052b790dfe1cddccebf1ea52197c6781eeaf775 (patch)
tree38aa1677dd898f7369d5ac27f1dbfa2fd6389dd5 /qt-ui/divelogimportdialog.h
parent646c6ba58b28cc2a2dec8e0a2187158623416b6e (diff)
downloadsubsurface-b052b790dfe1cddccebf1ea52197c6781eeaf775.tar.gz
Refactoring import to DiveLogImportDialog
Changing the import stuff to DiveLogImport. Now we should have one import function/dialog for importing divelogs instead of multiple menu entries. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelogimportdialog.h')
-rw-r--r--qt-ui/divelogimportdialog.h53
1 files changed, 53 insertions, 0 deletions
diff --git a/qt-ui/divelogimportdialog.h b/qt-ui/divelogimportdialog.h
new file mode 100644
index 000000000..9ecf32410
--- /dev/null
+++ b/qt-ui/divelogimportdialog.h
@@ -0,0 +1,53 @@
+#ifndef DIVELOGIMPORTDIALOG_H
+#define DIVELOGIMPORTDIALOG_H
+
+#include <QDialog>
+#include <QModelIndex>
+#include "../dive.h"
+#include "../divelist.h"
+
+namespace Ui {
+class DiveLogImportDialog;
+}
+
+class DiveLogImportDialog : public QDialog
+{
+ Q_OBJECT
+
+public:
+ explicit DiveLogImportDialog(QWidget *parent = 0);
+ ~DiveLogImportDialog();
+
+private slots:
+ void on_buttonBox_accepted();
+ void on_CSVFileSelector_clicked();
+ void on_knownImports_currentIndexChanged(int index);
+ void on_CSVFile_textEdited();
+ void unknownImports(int);
+ void unknownImports(bool);
+
+ void on_DiveLogFileSelector_clicked();
+ void on_DiveLogFile_editingFinished();
+
+private:
+ void unknownImports();
+
+ bool selector;
+ Ui::DiveLogImportDialog *ui;
+
+ struct CSVAppConfig {
+ QString name;
+ int time;
+ int depth;
+ int temperature;
+ int po2;
+ int cns;
+ int stopdepth;
+ QString separator;
+ };
+
+#define CSVAPPS 4
+ static const CSVAppConfig CSVApps[CSVAPPS];
+};
+
+#endif // DIVELOGIMPORTDIALOG_H