2013-12-29 18:11:20 +02:00
|
|
|
#ifndef DIVELOGIMPORTDIALOG_H
|
|
|
|
#define DIVELOGIMPORTDIALOG_H
|
|
|
|
|
|
|
|
#include <QDialog>
|
2014-06-26 14:01:31 -03:00
|
|
|
|
2013-12-29 18:11:20 +02:00
|
|
|
#include "../dive.h"
|
|
|
|
#include "../divelist.h"
|
|
|
|
|
2014-05-22 11:40:22 -07:00
|
|
|
namespace Ui {
|
2014-02-27 20:09:57 -08:00
|
|
|
class DiveLogImportDialog;
|
2013-12-29 18:11:20 +02:00
|
|
|
}
|
|
|
|
|
2014-02-27 20:09:57 -08:00
|
|
|
class DiveLogImportDialog : public QDialog {
|
2013-12-29 18:11:20 +02:00
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2014-01-07 22:01:28 +02:00
|
|
|
explicit DiveLogImportDialog(QStringList *fn, QWidget *parent = 0);
|
2013-12-29 18:11:20 +02:00
|
|
|
~DiveLogImportDialog();
|
|
|
|
|
2014-02-27 20:09:57 -08:00
|
|
|
private
|
|
|
|
slots:
|
2013-12-29 18:11:20 +02:00
|
|
|
void on_buttonBox_accepted();
|
|
|
|
void on_knownImports_currentIndexChanged(int index);
|
|
|
|
void unknownImports();
|
|
|
|
|
2014-12-25 15:25:29 +02:00
|
|
|
void manualDiveNumber();
|
|
|
|
void manualDate();
|
|
|
|
void manualTime();
|
|
|
|
void manualLocation();
|
|
|
|
void manualGps();
|
|
|
|
void manualMaxDepth();
|
|
|
|
void manualMeanDepth();
|
|
|
|
void manualBuddy();
|
|
|
|
void manualNotes();
|
|
|
|
void manualTags();
|
|
|
|
void manualWeight();
|
|
|
|
void manualDuration();
|
|
|
|
void manualCylinderSize();
|
|
|
|
void manualStartPressure();
|
|
|
|
void manualEndPressure();
|
|
|
|
void manualO2();
|
|
|
|
void manualHe();
|
|
|
|
void manualAirTemp();
|
|
|
|
void manualWaterTemp();
|
|
|
|
|
2014-01-14 15:58:20 -02:00
|
|
|
private:
|
2013-12-29 18:11:20 +02:00
|
|
|
bool selector;
|
2014-01-07 22:01:28 +02:00
|
|
|
QStringList fileNames;
|
2013-12-29 18:11:20 +02:00
|
|
|
Ui::DiveLogImportDialog *ui;
|
2014-01-16 22:50:16 +02:00
|
|
|
QList<int> specialCSV;
|
2014-12-25 15:25:29 +02:00
|
|
|
int column;
|
2013-12-29 18:11:20 +02:00
|
|
|
|
|
|
|
struct CSVAppConfig {
|
|
|
|
QString name;
|
|
|
|
int time;
|
|
|
|
int depth;
|
|
|
|
int temperature;
|
|
|
|
int po2;
|
|
|
|
int cns;
|
2014-07-09 22:13:37 +02:00
|
|
|
int ndl;
|
2014-07-09 22:13:38 +02:00
|
|
|
int tts;
|
2013-12-29 18:11:20 +02:00
|
|
|
int stopdepth;
|
2014-07-10 20:54:18 +02:00
|
|
|
int pressure;
|
2013-12-29 18:11:20 +02:00
|
|
|
QString separator;
|
|
|
|
};
|
|
|
|
|
2014-12-26 16:11:38 +02:00
|
|
|
#define CSVAPPS 7
|
2013-12-29 18:11:20 +02:00
|
|
|
static const CSVAppConfig CSVApps[CSVAPPS];
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // DIVELOGIMPORTDIALOG_H
|