summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/importgps.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-22 13:25:58 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-01-24 09:51:02 -0800
commitee5a1564980acfa9c3aa0dbf457f4bdce0efbfcd (patch)
tree1bf11b8fb2c469b9be8d93e9fc71e68f52c229fc /desktop-widgets/importgps.h
parent1ecd5065a0f821bb9406b5f651ebf6db5d6c2040 (diff)
downloadsubsurface-ee5a1564980acfa9c3aa0dbf457f4bdce0efbfcd.tar.gz
core: move GPX parsing into core
This shouldn't be part of the desktop UI code; there's still the issue that we really shouldn't hand code XML parsing, but I'll leave that for later. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/importgps.h')
-rw-r--r--desktop-widgets/importgps.h15
1 files changed, 1 insertions, 14 deletions
diff --git a/desktop-widgets/importgps.h b/desktop-widgets/importgps.h
index 1cef9e57a..9de8c2895 100644
--- a/desktop-widgets/importgps.h
+++ b/desktop-widgets/importgps.h
@@ -4,27 +4,16 @@
#include "ui_importgps.h"
#include "desktop-widgets/locationinformation.h"
+#include "core/parse-gpx.h"
#include <QFile>
-struct dive_coords { // This structure holds important information after parsing the GPX file:
- time_t start_dive; // Start time of the current dive, obtained using current_dive (local time)
- time_t end_dive; // End time of current dive (local time)
- time_t start_track; // Start time of GPX track (UCT)
- time_t end_track; // End time of GPX track (UCT)
- double lon; // Longitude of the first trackpoint after the start of the dive
- double lat; // Latitude of the first trackpoint after the start of the dive
- int64_t settingsDiff_offset; // Local time difference between dive computer and GPS equipment
- int64_t timeZone_offset; // UCT international time zone offset of dive site
-};
-
class ImportGPS : public QDialog {
Q_OBJECT
public:
Ui::ImportGPS ui;
explicit ImportGPS(QWidget *parent, QString fileName, class Ui::LocationInformation *LocationUI);
struct dive_coords coords;
- int getCoordsFromFile();
void updateUI();
private
@@ -40,8 +29,6 @@ slots:
private:
QString fileName;
class Ui::LocationInformation *LocationUI;
- int getSubstring(QFile *f, QString *buf, char delim);
- int findXmlElement(QFile *f, QString target, QString *buf, char termc);
int pixmapSize;
};