Commit graph

20 commits

Author SHA1 Message Date
Dirk Hohndel
7be962bfc2 Move subsurface-core to core and qt-mobile to mobile-widgets
Having subsurface-core as a directory name really messes with
autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an
autocomplete conflict and also was inconsistent with the desktop-widget
name for the directory containing the "other" UI.

And while cleaning up the resulting change in the path name for include
files, I decided to clean up those even more to make them consistent
overall.

This could have been handled in more commits, but since this requires a
make clean before the build, it seemed more sensible to do it all in one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04 22:33:58 -07:00
Dirk Hohndel
19e95efd6f Random whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-11 06:14:45 -08:00
Dirk Hohndel
4f10f7f7ae QML UI: refresh divelist after GPS data was successfully applied
And create a helper to do so to make the code simpler.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10 20:44:22 -08:00
Dirk Hohndel
69619ef5aa GPS data: delete fixes on the server
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10 20:44:21 -08:00
Dirk Hohndel
88291f605c GPS data: more fixes
- load the data from settings as we start
- improve upload to server
- keep settings and in memory model in sync

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10 20:44:21 -08:00
Dirk Hohndel
33142ed7f8 Reimplement the internal repesentation of GPS fixes
Instead of using the Settings as our data structure and constantly accessing
them, we now have a QMap for the GPS fixes and only access the Settings to keep
them in sync with the QMap. This should significantly speed things up.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10 20:44:21 -08:00
Dirk Hohndel
b1f90b6aa0 QML UI: partial, slow and incomplete implementation of delete GPS fix
This only deletes the fix on the mobile device, not on the server.
And it is really really slow. Re-reading the data from the settings just isn't
a smart way to do this.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08 23:18:41 -08:00
Tomaz Canabrava
89eed5d36e Untangle Library Linkage
with the adittion of gpslistmodel/location, the libraries
qt-models had a direct dependency on subsurface-core, and
subsurface-core had a direct dependency on qt-models, this is
bad.

Moving a bit of code around I'v managed to clean this out, and
also to clear a bit of uneeded code (GpsTracker and gpsTracker where
basically the same thing.)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08 08:04:04 -08:00
Dirk Hohndel
7b155774c5 Compile fix
This makes the desktop version compile again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07 22:43:13 -08:00
Dirk Hohndel
06dcc9ab8d Populate the model with the GPS fixes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07 21:41:52 -08:00
Dirk Hohndel
1c66e399fa Download gps locations in the mobile app
This is not the same as the existing download to apply the gps fixes to the
dive list. This allows us to download and store the GPS fixes in the settings.

I may end up changing things around to have a shared implementation for
downloading the GPS fixes, but for now this seemed easier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07 21:32:24 -08:00
Dirk Hohndel
a7f8a7574e Create GpsListModel in order to be able to display GPS fixes
This will allow us to visualize the GPS fixes that are currently stored in the
QML UI.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07 21:29:05 -08:00
Dirk Hohndel
14a09689a4 Location service: get the current position
If we have a fix that is fewer than 5 minutes old, take it, otherwise trigger
an update.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01 17:26:18 -08:00
Dirk Hohndel
66cd83a70f Location service: support the concept of waiting for a position
There may be reasons where we want to get the position even if the criteria
aren't met.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01 17:26:14 -08:00
Dirk Hohndel
a611bb22f7 Location service: restructure the way GpsSource is managed
It makes much more sense to have this as a private member of the class instead
of a static in one of the functions.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01 17:26:09 -08:00
Dirk Hohndel
962341ae9f Add instance method for GpsLocation
This way we can call members from different parts of the code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-02 14:30:47 -08:00
Dirk Hohndel
2311bc2378 Subsurface-mobile: don't create the GPS source until it is needed
This should accelerate the startup of the UI a little more.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30 10:58:18 -08:00
Dirk Hohndel
5756ce281f applyLocations should be a void function
Another issue pointed out by Lubomir.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18 19:23:19 -08:00
Dirk Hohndel
ca5b751610 Location service: check presence of location source
In theory this should only report a location service if this is a
satellite based service, but sadly geoclue appears to claim that there is
a satellite based service in my Linux VM - so I'm doubtful that this does
what the documentation says it does.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18 19:15:59 -08:00
Dirk Hohndel
456cc3955a Location service: move into subsurface-core
While this is primarily something targeted at a mobile device, with many
of the 2 in 1 devices it is possible that the user might be running the
desktop version of Subsurface on a mobile device.

As a first step to make it possible to collect GPS fixes on such a device
we need to make the infrastructure to do so available in the desktop
application as well.

This still needs to be hooked up in the desktop UI.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18 18:34:49 -08:00
Renamed from qt-mobile/gpslocation.h (Browse further)