Commit graph

13802 commits

Author SHA1 Message Date
Berthold Stoeger
f1830cd44e Profile: On dataChanged() only update pictures that actually changed
Only update those pictures of the DivePictureModel that actually changed.
This will be useful once pictures are loaded incrementally.

To do so, replace the pictures array by an array with stable ids. Before
this commit, not-shown pictures are left out of the pictures array, which
makes the mapping from DivePictureModel-ids to the picture array index
non-trivial.

Replace the QList<DivePictureItem *> by a std::vector<std::unique_ptr<DivePictureItem>>
to ease memory management. Sadly, owing to COW semantics, QVector is incompatible
with QScopedPointer.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-09 07:50:21 -07:00
Jeremie Guichard
f633cb81ae Fix minor typos and spelling mistakes in README.md and related
Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2018-04-09 07:48:01 -07:00
Jeremie Guichard
d64c48855d Add section describing use of CHANGELOG.md in CONTRIBUTING.md
Add description about file format
Add list of Areas that can be used

Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2018-04-07 11:36:41 -07:00
Miika Turkia
68ef735bde Update DM5 test data
Now that we read the temperatures properly, the test comparison must
also include them.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Miika Turkia
cfafbd1b37 changelog.md update
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Miika Turkia
b28e3db7f1 Temperature 0x7F appears to mean no reading
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Miika Turkia
6cfbe10bc3 Handle int and float temperatures
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Miika Turkia
e04dadc378 Explicitly mark DM4 conversion
Same as default branch, but as 0x01 appears to be converted from DM4 to
DM5, let's just be explicit about it.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Miika Turkia
06a2f36a62 Start to describe DM5 sampleBlob
Currently the best guess of sampleBlob format. Unfortunately there seems
to be some version of DM that stores the temperature in different
location that I have not been able to figure out yet. Note that some
version of DM does not utilize sampleBlob but specific blobs for each
value (temperature, pressure, ...).

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2018-04-07 11:33:09 -07:00
Murillo Bernardes
b257b7a027 ios: Link to static googlemaps library
Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-04-06 10:31:07 -07:00
Murillo Bernardes
ef5d4a123e ios: manually import google maps plugin
qmlimportscanner for some reason does not include
the googlemaps plugin in the generated file.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-04-06 10:31:07 -07:00
Murillo Bernardes
882120ba65 ios: remove googlemaps unecessary multiple builds
googlemaps archive is a fat file already, containing
armv7, arm64 and x86-64, so no need to build it
multiple times.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-04-06 10:31:07 -07:00
Dirk Hohndel
07366daea5 Update README and ReleaseNotes for 4.7.8
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-05 08:24:35 -07:00
Dirk Hohndel
d90f272cb1 Update a few more translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-05 08:21:35 -07:00
Jeremie Guichard
12dc1889c7 Add "Tags" column in Desktop app's dive list view
Add DiveItem::displayTags helper method to return Tags as a QString
New Tags column is
 by default inserted before "Photos" column
 by default disabled

Signed-off-by: Jeremie Guichard <djebrest@gmail.com>
2018-04-04 14:10:45 +03:00
Dirk Hohndel
78986589f0 Update CHANGELOG
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-03 11:55:48 -07:00
Dirk Hohndel
7e73b30e97 Revert "GPS: use applyGpsLocation::applyLocations from core"
This reverts commit 70e0e80de5.

This caused the GPS workflow to break for Linus. Let's revert
for 4.7.8 and figure out how to do this cleanup correctly, later.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-03 11:52:46 -07:00
Dirk Hohndel
ceaf26d198 Revert "cleanup: localize global variable"
This reverts commit fc7729eb78.

This caused the GPS workflow to break for Linus. Let's revert
for 4.7.8 and figure out how to do this cleanup correctly, later.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-03 11:52:19 -07:00
Dirk Hohndel
b4ddcbfb63 Add new dive computers to CHANGELOG
I think some of those were already supported in 4.7.7.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-03 11:30:33 -07:00
Dirk Hohndel
29185cb8ff Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-03 11:17:58 -07:00
Lubomir I. Ivanov
167db8fc18 mapwidget-mobile: initialize the map to [0,0]
Instead of showing the map zoomed over London by default,
initialize the center at [0,0] and show the whole globe.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-04-02 13:47:43 -07:00
Lubomir I. Ivanov
48c032bb8e mapwidget-mobile: do not animate the first selection
centerOnLocationHard() is added in MapPage.qml so that
on `firstRun` the map is hard panned to the desired location
without animation.

This affects the selection of a new "Dive details" -> "Map it" or
when opening a GPS location in the map.

The idea behind this change is to avoid starting the map animation
from an arbitrary location such as [0,0] or London. Also, to not
start the map zoomed out completely and then zoom in on a selected
dive.

For this change to work, add the helper getCoordinatesForUUID()
to qmlmapwidgethelper.cpp/.h and use it to obtain the
QGeoCoordinates for a dive site UUID.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-04-02 13:47:43 -07:00
Dirk Hohndel
2700f02dcd Android: add Atomics Aquatics Cobalt as device
This way plugging in a Cobalt should pop up a question if the
user wants to open Subsurface-mobile.

Unfortunately, this, too, fails on my Android devices, so I can't test
it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-02 13:37:38 -07:00
Dirk Hohndel
5467b5349e Update list of supported dive computers
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-02 12:25:16 -07:00
Dirk Hohndel
9ed40f0a22 Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-02 09:21:38 -07:00
Dirk Hohndel
3fa4d9bdd7 Update libdivecomputer submodule
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-01 10:54:30 -07:00
Berthold Stoeger
b01c9328b4 Dive pictures: extract timestamp from MP4 and related formats
Parse MP4s and related video files and extract the creation timestamp
from the "mdhd" (media header) atom.

Introduce helper function templates to extract arbitrary-length
unsigned integers in big-endian format from file or memory.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-01 16:04:48 +03:00
Berthold Stoeger
66b71c60a0 Dive pictures: use get_metadata() in dive_create_picture()
Thus, metadata has to be only read once and the picture_load_exif_data()
function can be removed.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-01 16:04:48 +03:00
Berthold Stoeger
9b2482aca9 Dive pictures: Move metadata functions into own translation unit
Move all metadata function into new core/metadata.cpp file.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-01 16:04:48 +03:00
Berthold Stoeger
d9df8c3f47 Debug: Error reporting for SHashedImage loading
Overwrite QImage::load() in SHashedImage so that we can perform better
error reporting.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-04-01 15:59:46 +03:00
Berthold Stoeger
376b737891 Debug: sprinkle debug messages in thumbnailing code
To ease trouble-shooting of the picture thumbnailer add a number
of debug- and info-messages.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-04-01 15:59:46 +03:00
Dirk Hohndel
028f53c63b Update libdivecomputer submodule
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-31 11:50:42 -07:00
Stefan Fuchs
02dcd219cf MXE Windows build script: Chance MXE make call in comment
In the comment/instruction how to build MXE add "libssh2" and "curl"
to the make call. This seems to be needed in newer versions of MXE.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-26 05:34:00 +03:00
Stefan Fuchs
bb922e8db2 MXE Windows build script: Do right build flavor also for googlemaps
Do the right build flavor also for the googlemaps plugin.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-26 05:34:00 +03:00
Dirk Hohndel
bca7f8ed61 Travis: test build against Qt 5.5
We do this in a docker environment to make things fast and easy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:58:04 -07:00
Dirk Hohndel
99bc940551 Use older API to remove dependency on Qt 5.8 or newer
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:40:32 -07:00
Dirk Hohndel
9e457e092c iOS: add MapLocationModel and corresponding helper
Thanks to Murillo Bernardes for reminding me to add the .h files as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:34:46 -07:00
Dirk Hohndel
ce8cad615a iOS: build googlemaps
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:33:54 -07:00
Dirk Hohndel
5edcf2aea2 cmake: move maplocationmodel to generic models
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:33:41 -07:00
Dirk Hohndel
78937ce572 iOS: build fix
Otherwise the moc build fails.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-22 07:33:33 -07:00
Stefan Fuchs
cfd4c42829 Profile heatmap/heartrate: Only enable max one of these at same time
Only allow to enable maximum one of both items tissue heatmap or
heartrate in profile.
This is done by always switching off the other one at the moment you
turn on one of the two items (heatmap or heartrate).

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-19 15:44:02 -07:00
Stefan Fuchs
b38eb45b29 Profile heartrate: Nicer min/max values and tic distance
Correct a bug in finding the minimum heartrate.

Use the minimum and maximum heartrate value to set min/max and
tic distance for the heartrate axis in the profile.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-03-19 15:44:02 -07:00
Dirk Hohndel
ea7f49031d Fix non-interactive Qt installation for Android
We need to wait before clicking Next on the WelcomePage.
We really only want the Android armv7 packages.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19 15:22:46 -07:00
Berthold Stoeger
b8f45d0ec9 Update CHANGELOG.md
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19 13:15:00 -07:00
Berthold Stoeger
c896938f7a Dive pictures: If EXIF data couldn't be parsed, use creation date
This is a preparation for supporting videos. Some video formats may
not possess such meta data, or we may not yet be able to parse them.
In such a case, use the file creation date.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19 13:14:54 -07:00
Berthold Stoeger
d9b502f0c7 Dive pictures: Don't read whole file for parsing EXIF data
This is a preparation for video support. We don't want to read a whole
potentially multi-GB file into memory just to detect that it isn't a
JPEG. Especially since at the moment EXIF metadata are parsed twice,
once for GPS, once for timestamp.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19 13:14:36 -07:00
Dirk Hohndel
0c91a1b8d2 Android build: switch to Qt 5.10.1
That's what we now use for the official binaries as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19 12:08:06 -07:00
Dirk Hohndel
6c3cd24ef8 Android/iOS build: get libxml2 and libxslt from GitHub
The xmlsoft.org links sometimes time out. Sadly, GitHub API gives us an
oddly named top level directory in the tar file, so lets strip that and
replace it with the "usual" name.

Also, for the "raw" tar files from GitHub we need to run autoreconf
ourselves.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-03-19 12:03:22 -07:00
Joakim Bygdell
01e4ec47be QML UI: Fix checkbox color
The background color in our own checkbox should match the page background.
Also includes some whitespace cleanup.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-03-19 12:03:06 -07:00
Joakim Bygdell
ab99703b02 QML UI: drop focus when selecting a location
Make sure to drop focus both for typing and when selecting
an entry from the list.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-03-19 12:01:14 -07:00