aboutsummaryrefslogtreecommitdiffstats
path: root/core/gpslocation.h
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-15 06:01:14 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-04-15 13:22:16 -0700
commit71d74f9e3c7cb49ab93aef035dbf7735b5ae3454 (patch)
tree668579dde6e2bec4e566ebc35892d1310c2fd40f /core/gpslocation.h
parentc111c4bb022229e66fb15cf8a7967bf79180a441 (diff)
downloadsubsurface-71d74f9e3c7cb49ab93aef035dbf7735b5ae3454.tar.gz
QML UI: rewrite the commitChanges function
I couldn't figure out how to break this down into small, useful commits. Part of the problem is that I kept going while working on this and as you can see from looking at the commit, diff tries so hard to find small code fragments that moved around, that the diff overall becomes quite unreadable and it seemed impossible to recreate the sequence of steps after the fact. It all started with adding the parsing for the GPS coordinates. But while testing that code I found several issues with the rest of the function. Most importantly it seemed ridiculous that we carefully tried to match the texts that the DiveObjectHelper would create for the various fields, instead of just using the DiveObjectHelper to do just that. And once I had converted that I once again realized just how long and hard to understand that function was getting and decided to break out some of the more complex parts into their own helper functions. But of course all this didn't happen in this logical, structured, ordered way. Instead I did all of these things at the same time, testing, rearranging, etc. So in the end I went with one BIG commit that does all of this in one fell swoop. This adds four helper functions to deal with start time/date, duration, location and gps coordinates, and depth of the dive. To avoid mistakes when dealing with the GPS coordinates, there's another helper to encapsulate the creation of the dive site and we switched to a current GPS location. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'core/gpslocation.h')
-rw-r--r--core/gpslocation.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/core/gpslocation.h b/core/gpslocation.h
index 82b51a291..e1b485832 100644
--- a/core/gpslocation.h
+++ b/core/gpslocation.h
@@ -10,6 +10,8 @@
#include <QNetworkReply>
#include <QMap>
+#define GPS_CURRENT_POS QObject::tr("Waiting to aquire GPS location")
+
struct gpsTracker {
degrees_t latitude;
degrees_t longitude;