Commit graph

8034 commits

Author SHA1 Message Date
Miika Turkia
f7e86b5838 Import surface event from Suunto DB
This is actually relevant information when someone surfaces
accidentally, thus we should not ignore it.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-21 08:47:19 -07:00
Robert C. Helling
187f7dab9f Add option to display GPS coordinates as decimals
This adds a field to the units preferences to have GPS coordinates
show as decimals (as for example Google maps does it).

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-20 10:34:10 -07:00
willem ferguson
0e78915c7e A few small changes to the user manual:
1) Descriptions of main menu items.
2) Windows drivers for the galileo dive computer.

Signed-off-by: willem ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-18 13:53:51 -07:00
Guillaume GARDET
5584158baa Documentation: Merge/update french user-manual translation
Merge/update french user-manual translation.

Signed-off-by: Guillaume GARDET <guillaume.gardet@free.fr>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-18 13:53:38 -07:00
Robert C. Helling
6730405624 Ask user about merging dives more than 30m apart
...and remember the answer.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-18 13:53:18 -07:00
Robert C. Helling
043bd3afb7 Make gaschange from contex menu act as a gaschange
so it affect no longer the previous leg but all the following ones
with the same gas (i.e. until the next gaschange).

This makes the add dive/planner behaviour more consistent
with the rest of the program regarding gas changes.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 15:07:06 -07:00
Robert C. Helling
907ccb0b71 Allow "oxygen" as a gas name
...as this what comes in when the user selects this gas in the
add dive/dive planner contet menu.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 15:07:02 -07:00
Tomaz Canabrava
253d9ff300 Use the QtWaitingSpinner instead of blocking the MainTab
We shouldn't allow the user to change the location when we are probing
the web for the correct places if we are updating an old file from
Subsurface. This makes use of a pleasant spinner that works beautifully.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 15:02:57 -07:00
Tomaz Canabrava
c2f77353ee Better name for the disable/enable geolocation edit
'enable' and 'disable' is too generic, and we are only
blocking the geolocation edit.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 15:00:45 -07:00
Tomaz Canabrava
b59084dc1f Add a new class, QtWaitingSpinner, MIT Licensed.
from https://github.com/snowwlex/QtWaitingSpinner

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 15:00:25 -07:00
Dirk Hohndel
c11bbe4f38 Fix easily reproduced crash
Open dive file. Click Location-manage. Pick a site. Click close. Click
Location-manage again. BOOM.
This seems to make sense, but since not a lot of the code is hooked up
yet, I'm not sure this is what we want in the end. But for now it prevents
an easily reproduced crash.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 14:05:24 -07:00
Tomaz Canabrava
10a0a252c8 Update the dive location when showing the dialog
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:54:08 -07:00
Tomaz Canabrava
0c33d585ea Implement the row count for location information
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:52:23 -07:00
Tomaz Canabrava
3235dd842e Implement the data method for location information
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:52:23 -07:00
Tomaz Canabrava
8115855428 Start the model for location information.
And implement the reset method.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:52:19 -07:00
Tomaz Canabrava
5eb572b9c6 Move Locationinformation to its own file.
The SimpleWidgets file was getting too big, and location information will
also need a new model - a good way to do not mix everything is to put
things in a new file.

[Dirk Hohndel: added missing include of stdint.h]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:51:13 -07:00
Tomaz Canabrava
d9ad829173 Change the Locationinformation to handle location editing
Add a few interface items to handle location editiing, a combobox to show
everything, and three buttons: add, edit, delete.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:45:46 -07:00
Tomaz Canabrava
c95998e4bd Fix the layout of the geo management
The layout was just plain ugly; this fixes that and also adds the
possibility to insert new controls that will be userfull for managing the
Locations.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:45:12 -07:00
Tomaz Canabrava
e61e127715 Remove extra ; at the end of lines.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:44:51 -07:00
Tomaz Canabrava
96850b9931 Don't enable the widgets before finishing the thread
The maintab should be disabled when the geolocation thread is
running - but if you changed the dive, it would reenabled it.
(actually this should be only on the location widget, I'll send
another path later)

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:42:53 -07:00
Tomaz Canabrava
2b99ae5781 Fix signal connections
I don't know what happened to me, I connected to some signals that didn't
exist at all.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:42:09 -07:00
Robert C. Helling
05552c7339 Show seconds in duration for free dives
For free dives (corresponding to dive mode or duration shorter than
15min), the display format for duration is changed to display minutes
and seconds.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:40:11 -07:00
Miika Turkia
21d1903656 Correct dive time in DLF import
Divesoft Freedom records the dive time in count of seconds since
1.1.2000 00:00:00, not noon.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-17 13:39:26 -07:00
Dirk Hohndel
2dd5781afe Make sure that the save file dialog actually is marked as such
While this worked on Linux, on the Mac we didn't have an input field to
enter the file name. With this we explicitly declare that this is a file
save dialog and that the user can specify a non-existing file name.

Fixes #872

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-11 15:26:56 -07:00
Dirk Hohndel
ebaa7d1fd0 Multi dive edit: treat buddy and divemaster as tag lists
So just like tags do "differential editing". Figure out what (or in this
case, who) was added / removed from the displayed dive and do the same for
all other selected dives.

This does seem a bit over top for divemaster, but this is more consistent
and therefore should make more sense to the user - assuming we ever have
one who runs into this.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-11 10:40:20 -07:00
Robert C. Helling
698b2b133f Only add disclaimer and runtime table if we added deco to replanne dive
As a side effect this changes the signature of plan(): Before it
returned an int that was supposed to be possibly an error but
we never bothered to check it. So now it's bool indicating if the
planner did add stops.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-11 07:57:09 -07:00
Linus Torvalds
3edec7c97d Fix initial scrolling problem
The initial selection change signal seems to potentially be sent
before the listview is even visible when we do the first "scrollTo()"
to the currently selected dive.

That, in turn, seems to result in that when the listview is actually
shown, it will be scroll the trip description off the visible area,
and force the current dive to be shown at the very top of the
divelist. Which is not very nice: we do want to scroll to the current
dive, but we don't want to hide the current trip in the process.

Ignoring the selection change if the listview isn't even visible seems
to fix things for me.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-11 07:33:31 -07:00
Tomaz Canabrava
9523132b6d Only show Collapse all when its needed
This makes Collapse All only visible when its needed, and it
also fixes a crash when invocking collapse all when there was
nothing to collapse.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-11 07:30:52 -07:00
Tomaz Canabrava
d6f45ec74d Only show expand all and collapse all options if there`s a need
This patch unclutter the menu by hidding collapse all
when all dives are collapsed, and expand all when all
dives are expanded.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-11 07:27:55 -07:00
Tomaz Canabrava
627de38c01 Get the location information in a separate thread
This makes Subsurface usable faster for those without a good internet
connection when they are opening an older data file.

While parsing, we are only feeding an vector of locations, after the
parsing is done, we traverse the vector searching for the information on
the web.

I need to also add a way to stop if there`s no internet connection - but
this will be another patch.

Also, fixed two small memory leaks from the old imp.

[Dirk Hohndel: cleaned up the whitespace mess]

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-10 11:14:20 -07:00
Robert C. Helling
412844c02b Keep old notes when saving as new dive in replan
... but discard an old disclaimer and runtime table if present.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-09 06:54:03 -07:00
Robert C. Helling
e538347424 Change menu entry for "replan"
Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-09 06:53:43 -07:00
Robert C. Helling
70c64eaa66 Only print gasname for a segment in planner if it differs from the previous one
This is to avoid visual clutter when replanning logged dives.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-08 10:04:22 -07:00
Robert C. Helling
9d8eb10421 Only warn when trying to replan a logged dive
If there are more than 100 samples, average some of them so we end up with no more than 100.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-08 10:02:45 -07:00
Miika Turkia
69b4a404b9 Ignore the gas_change alarm on MacDive import
As the gas changes can be parsed more reliably from the gases list, we
just ignore the gas_change events as redundant information.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:17:17 -07:00
Miika Turkia
30a60f34b6 Parse MacDive gas usage from gases list
Gas change events can be parsed properly from the gases list with clear
information on what the gas mixture was.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:17:10 -07:00
Miika Turkia
381f702017 Use function from commonTemplates on MacDive import
Get rid of duplicate function.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:17:03 -07:00
Miika Turkia
55a7715be0 Import tags from MacDive
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:16:57 -07:00
Miika Turkia
973713e9db Parse the MacDive gaschange values
Fixes #869

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:16:47 -07:00
Miika Turkia
9cd79776f2 Fix event name for MacDive gas changes
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-07 11:16:40 -07:00
Miika Turkia
707a1f7af7 Add new fields as extra data on MacDive import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:59:10 -07:00
Miika Turkia
49e10f6555 Add entryType as tag on MacDive import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:59:10 -07:00
Miika Turkia
c8bbc74447 Have computer data inside divecomputer tag
This includes all the data computer related data within the divecomputer
tag. All the extra noise is just indentation (apart from moving the
divecomputer end tag).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:59:10 -07:00
Miika Turkia
c16592a29b Re-order the MacDive import
Next commit will do indentation so this one will keep it clear of what
actually occurs.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:59:10 -07:00
Miika Turkia
3255a0f5c6 Support for new data format for MacDive
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:59:10 -07:00
Miika Turkia
178fb5152f Add new fields as extra data on MacDive import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:47 -07:00
Miika Turkia
01faebc99b Add entryType as tag on MacDive import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:41 -07:00
Miika Turkia
fdd714435e Have computer data inside divecomputer tag
This includes all the data computer related data within the divecomputer
tag. All the extra noise is just indentation (apart from moving the
divecomputer end tag).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:29 -07:00
Miika Turkia
4f5db4a11f Re-order the MacDive import
Next commit will do indentation so this one will keep it clear of what
actually occurs.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:24 -07:00
Miika Turkia
6cd71882f2 Support for new data format for MacDive
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-05-04 10:55:20 -07:00