Commit graph

10 commits

Author SHA1 Message Date
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
Robert C. Helling
20fa943d25 Don't complain about missing GPS source unless mobile
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 19:08:37 -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
Lubomir I. Ivanov
ebdcc7fd54 gpslocation.cpp: fix signed vs unsinged int comparison warning
QDateTime::toTime_t() is misleading as it does not return
a C time_t type, but a 'unsigned int' or rather the Qt
'uint' typedef.

To prevent the warning we cast it to 'time_t' and to
comply with the 'lastTime' variable.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18 19:21:38 -08:00
Dirk Hohndel
418a345287 Location service: when applying GPS locations mark divelist changed
Lubomir pointed out that this variable was unused. Oops.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-18 19:19:56 -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.cpp (Browse further)