Commit graph

15478 commits

Author SHA1 Message Date
jan Iversen
8d857a650d core: qPrefDisplay correct font setting.
SettingsObjectWrapper contained some delicate font handling mixing font and
font_size, breaking that into 2 parts broke font handling on some platforms

Copy font + font_size handling 1-1 from SettingsObjectWrapper

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-15 14:35:31 +02:00
Dirk Hohndel
55336bd7ad Merge branch 'metadata' of https://github.com/bstoeger/subsurface 2018-07-14 08:20:47 -07:00
Dirk Hohndel
dc22747cb0 Merge branch 'qPrefAnimations' of https://github.com/janiversen/subsurface
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-14 08:16:14 -07:00
Dirk Hohndel
e834874a7a Merge branch 'qPrefDisplay' of https://github.com/janiversen/subsurface 2018-07-14 08:14:31 -07:00
Dirk Hohndel
cf329ca131 Merge branch 'qml_test' of https://github.com/janiversen/subsurface
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-14 08:12:27 -07:00
Berthold Stoeger
cf73afb452 Update CHANGELOG.md
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-14 08:34:10 +02:00
Berthold Stoeger
772935b596 Metadata: Parse ASFs (=WMVs)
The simplest video-formats to parse so far.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-14 08:32:30 +02:00
Berthold Stoeger
4de0b7dd3d Metadata: Parse AVIs
Whereas extraction of the dive-duration is trivial, AVIs don't seem
to have a standardized way of saving the creation time. This commit
implements support for two versions randomly found on the internet.
Additional version will follow if need arises. AVI seems not to be
a particular popular format for either vacation or professional
videographers.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-14 08:32:30 +02:00
Berthold Stoeger
02ad18d4d8 Metadata: extract duration fom QuickTime/MP4-style containers
We want the duration of videos for two reasons:
 - To display the duration of the video in the profile plot.
 - To be able to determine which dive a video is closer to if the
   start is not during a dive.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-07-14 08:32:30 +02:00
Berthold Stoeger
52cc51f906 Update CHANGELOG.md
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-13 17:07:52 -07:00
Berthold Stoeger
9efb56e2d4 Dive pictures: don't update all images on drag&drop to profile
Gracefully handle drag & drop to the profile, which changes the
offset of the pictures. To do this, keep the pictures in the
DivePictureModel and the ProfileWidget2 sorted by offset and
re-arrange if needed to keep the list sorted. This needs some
code reshuffling.

Introduce a helper-function that moves ranges in arrays.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-13 17:07:42 -07:00
Berthold Stoeger
0aaa1bf386 Dive pictures: update thumbnail positions on deletion
If pictures were deleted, the remaining thumbails where staying at
their positions. Only when switching between dives, the new positions
were recalculated. Do the recalculation immediately. More precisely:
the x-coordinate, which is determined by the timestamp, stays identical.
Only the y-coordinate is recalculated such that overlapping of thumbnails
is avoided.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-13 17:07:22 -07:00
Dirk Hohndel
b2422f8856 Prepare README and ReleaseNotes for 4.8.1
And clear out CHANGELOG.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-13 15:28:06 -07:00
Dirk Hohndel
396f85d0f4 Update to latest libdc
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-13 15:28:06 -07:00
Dirk Hohndel
10053c41fb Latest translations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-13 15:22:36 -07:00
Stefan Fuchs
63e63ee07d Disable the WindowContextHelpButtonHint for Qt >=5.10
Disables the WindowContextHelpButtonHint by default on Qt::Sheet and
Qt::Dialog widgets. This hides the ? button on Windows, which only
makes sense if you use QWhatsThis functionality.
This value has been added in Qt 5.10.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-07-13 14:46:10 -07:00
Dirk Hohndel
ff1490184b Update CHANGELOG.md
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-13 11:30:31 -07:00
Stefan Fuchs
7b6f67881c Update CHANGELOG.md
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-07-13 11:26:28 -07:00
Stefan Fuchs
c6db1b12f8 Fix dive mode drop-down in planner for re-planned dive
Also populate the DiveTypeSelectionModel with values for re-planned dive.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-07-13 11:26:28 -07:00
Stefan Fuchs
daab13eba9 Code cleanup in diveplanner.cpp
Move a variable declaration and added some initialization.
Added missing spaces.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-07-13 11:26:28 -07:00
Stefan Fuchs
24c915e97c In planner notes don't show dive mode for first data point
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-07-13 11:26:28 -07:00
Stefan Fuchs
9883b9f10e Add three missing translations for divemode_text_ui in plannernotes.c
Added three missing translations which were forgotten here:
fcf6b819d9

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2018-07-13 11:26:28 -07:00
Linus Torvalds
b34a4063be Make sure our libdivecomputer custom IO interfaces have sleep functions
When I switched over from our own custom IO implementation to the new
upstream custom IO model in libdivecomputer, I completely missed the
fact that the libdivecomputer custom IO model also does a custom _sleep_
function.

I'm not entirely sure what the point was, and it broke things even in
libdivecopmputer itself when some of the new sleep functions were
broken.

Anyway, we didn't export any sleep functions at all for the bluetooth,
BLE and FTDI cases, the the libdivecomputer code didn't fall back to any
sane default sleep implementation either, so the end result was no
sleeping at all.

Which didn't matter for most divecomputers.

But it seems like at least some OSTC dive computers did care, at least
in certain situations, and both Miika and Anton had trouble downloading
with their OSTC Sport dive computers.  Using the serial line protocol
and the legacy /dev/rfcomm model worked fine, because then it used the
sleeping functions in the POSIX serial code inside libdivecomputer.

This just adds trivial sleeping functions for the affected download
protocols.  Maybe I should have just made libdivecomputer have a sane
default instead, but this wasn't hard either (the hard part was trying
to figure out why the downloads worked for some people and not for
others).

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2018-07-13 11:25:38 -07:00
Anton Lundin
4c2e1529c0 Fix configure bluetooth ostc's
When we introduced the whole check for supported transports code, no one
noticed that it broke configuring all ostc's over bluetooth.

The configure code just used a placeholder model of OSTC 3 to get the
right backend code. With the new supported transports model it errored
out if you where trying to connect to a bluetooth enabled device, just
because the original OSTC 3's wasn't bluetooth enabled.

This switches the placeholder model over to a OSTC Plus which is both
bluetooth, serial and ble capable, so the code works again.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
2018-07-13 09:44:33 -07:00
Dirk Hohndel
c25f03d440 Derek: enable label and milestone management
Allow Derek to modify labels and milestones and add a few more of our
contributors to the list of people allowed to give Derek commands.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-07-13 09:34:03 -07:00
Salvador Cuñat
3c1b6d9ec1 [user-manual] Update SmartTrak import information
The information on how to build smtk2ssrf was pretty outdated.
Update this information and point to subsurface downloads repo for
windows installer and linux appimage.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2018-07-13 16:18:31 +03:00
Lubomir I. Ivanov
f1ed8748b1 map-widget: fix chronology of QML class registration
The QML types needs to be registered before the MainWindow
instance is created on the desktop version, otherwise
the MapWidget instance will be created and it will fail
with a missing QML namespace.

In subsurface-helper.cpp, move register_qml_types() from run_ui()
to init_ui(), as later in init_ui(), MainWindow is instantiated
for the first time in the desktop version.

Ref #1500

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2018-07-13 15:18:21 +03:00
jan Iversen
f63217495d tests: add qPrefAnimations qml testcases
add test of qml C++ interface

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 22:36:04 +02:00
jan Iversen
33949735f2 tests: add qPrefAnimations testcases
add test cases to secure struct preferences and qPrefAnimations work together

remove animation tests from testpreferences

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 22:35:36 +02:00
jan Iversen
d4e76dac9e core: remove Animations from SettingsObjectWrapper and activate qPrefAnimations
remove Animations from SettingsObjectWrapper and reference qPrefAnimations
update files using SettingsObjectWrapper/Animations to user qPrefAnimations

this activated qPrefAnimations

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 22:34:35 +02:00
jan Iversen
3a314c3dec core: copy Animations from SettingsObjectWrapper to qPref as its own class
Update set/get functions to follow common name scheme:
- get function have same name as in struct preferences
- set function have set_<name in struct preferences>
- signal function have <name in struct preferences>_changed

one class one .h/.cpp is the C++ idiom. Having load/sync of each
variable in 1 functions (in contrast to the distributed way SettingsObjectWrapper
handles it) secures the same storage name is used. Having the set/get/load/sync
functions grouped together makes it easier to get an overview.

REMARK: this commit only defines the class, it is not active in production
Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:07:49 +02:00
jan Iversen
859b2dcfa4 core: qPrefDisplay update CHANGELOG.md
added note about "show developer" menu being stored on disk

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:07:49 +02:00
jan Iversen
6c1aa701d6 tests: make qprefdisplay test file
Remove display tests from testpreferences and make a new file

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:07:49 +02:00
jan Iversen
aa0a918082 core: qPrefDisplay update CHANGELOG.md
added note about "show developer" menu being stored on disk

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:01:31 +02:00
jan Iversen
b41fa07efa tests: add qPrefDisplay qml testcases
add test of qml C++ interface

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:01:31 +02:00
jan Iversen
1ef3f61cc9 tests: add qPrefDisplay testcases
remove test macro, split in functions and add test cases

the existing test macro does not work because
sync() does not save these variables to disk (set* does)

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 19:01:21 +02:00
jan Iversen
8f7f1cacd6 tests: make qprefdisplay test file
Remove display tests from testpreferences and make a new file

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:44:31 +02:00
jan Iversen
928fc1ee79 core: move load of display variables to qPrefDisplay from SettingsObjectWrapper
ensure SettingsObjectWrapper load() loads all display variables.

Copy font setting code from SettingsObjectWrapper to qPrefDisplay

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:44:31 +02:00
jan Iversen
9732194bf8 core: sync display variables from struct preferences when ssrf terminates
Add qPrefDisplay sync to sync in SettingsObjectWrapper.

If a program part change display variables in struct preferences, they would
not be saved on disk.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:44:31 +02:00
jan Iversen
da61c1714f core: activate qPrefDisplay in SettingsObjectWrapper
add the prepared class qPrefDisplay to SettingsObjectWrapper and thereby making it active.

As a consequence of the uniform naming standard desktop-widgets/preferences_defaults.cpp and
tests/testpreferences.cpp have been updated.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:44:31 +02:00
jan Iversen
d7fed0bcb7 tests: update testqml to use shared register_qml_types()
add subsurface-helper.cpp to TestQML target
remove local qmlRegisterType() and add register_qml_types() instead

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:34:54 +02:00
jan Iversen
f354592050 ssrf: prepare subsurface_helper.cpp to be used by testqml
add test for SUBSURFACE_TEST_DATA to exclude functions not used when testing

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 18:34:49 +02:00
jan Iversen
35eecaa82a tests: add .gitignore to ignore qmlc files
With Qt 5.11 the qml compiler is included and qmlc files created in the same
directory as the qml file (at least for the qml test harness).

ignore *.qmlc

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 17:12:56 +02:00
jan Iversen
b05e4c7b5f tests: make qml test harness
build a qml test runner that includes ssrf interface

The qml test runner allows having qml test files.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 17:12:56 +02:00
jan Iversen
55f0b3b1f8 ssrf: add QuickTest to test libraries.
QuickTest enables QML TestCase which are used for qml testing

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 17:12:56 +02:00
jan Iversen
fe38a768f2 ssrf: move functions from mobile-helper to mobile-main
Move few mobile only functions from mobile-helper to mobile-main

remove subsurface-mobile-helper

file structure is now subsurface-*-main.cpp + subsurface-helper.cpp

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
jan Iversen
2c402b0fcf ssrf: combine subsurface-*-helper into subsurface-helper
combine shared functions like init_ui and run_ui in one file

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
jan Iversen
ab05fe3cf8 desktop-widget: move qmlRegister from mapwidget to shared helper
Remove qmlRegister in desktop-widgets/mapwidget in order to have a shared
registration in subsurface-helper.cpp

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
jan Iversen
8cc0b6dbc1 ssrf: add shared helper file
add subsurface-helper.cpp to share functions between mobile and desktop

move mobile qml registrations to a shared function (avoiding differences in registrations)

Target is to replace current subsurface-desktop-main + subsurface-desktop-helper and
subsurface-mobile-main + subsurface-mobile-helper with
subsurface-*-main + subsurface-helper

Signed-off-by: Jan Iversen <jani@apache.org>
2018-07-12 08:08:00 -07:00
Jocke
a56a7c51f6 Add comment to get-dep-lib.sh
Add a comment so we remember to change the version number in versions.sh also.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-07-12 07:58:08 -07:00