Commit graph

11642 commits

Author SHA1 Message Date
Dirk Hohndel
e42bf2cfa5 QML UI: fix profile for device pixel ratio of 1.5
I think this is actually a typo - either way, seems to work correctly
now.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14 16:57:09 -07:00
Dirk Hohndel
c00b14af9a QML UI: better simulation of onPressed in TextField
Prior to Qt Quick Components 2.1 there was no onPressed signal for a
TextField; in order to be able to build against Qt 5.7 (which comes with
Qt Quick Components 2.0) we need to work around the lack of this signal.
This code seems to do a pretty good job at simulating it.

My attempt in commit 73c66e1d7d ("QML UI: make run with Qt 5.7 again")
didn't work so well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14 14:04:34 -07:00
Dirk Hohndel
ee4ae49d37 QML UI: don't populate hints texts when adding dive
If we don't have values for the HintsTextEdit fields, don't show any
values.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14 13:43:48 -07:00
Dirk Hohndel
525cd4c9e3 QML UI: correctly render dive list when showing delete button
This fixes the visual artifact that Willem reported.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14 13:13:06 -07:00
Dirk Hohndel
ee75812b5a QML UI: keep the fontMetric
We reference it elsewhere.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14 13:05:01 -07:00
Dirk Hohndel
1246324897 QML UI: don't shrink fonts on narrow displays
Now that wrapping should work correctly, this isn't necessary any more.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14 11:17:00 -07:00
Dirk Hohndel
2011f88bef Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14 09:51:25 -07:00
Dirk Hohndel
73c66e1d7d QML UI: make run with Qt 5.7 again
onPressed needs to be relative to Keys in Qt 5.7.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14 09:50:57 -07:00
Dirk Hohndel
c8bf412720 QML-UI: remove references to download from divecomputer
This needs to be reimplemented.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14 09:50:57 -07:00
Jan Mulder
b809019c7a Also translate tab headers
After the restyle of the maintab code, the translation of some tab titles went
missing. Corrected here.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-14 09:50:38 -07:00
Dirk Hohndel
540b3548b9 QML UI: add 2cm x 2cm square to theme test page
This should make it easier to spot displays that are completely out of
whack in their scaling.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-13 18:21:50 -07:00
Jef Driesen
f8203b8efe Cleanup some unnecessary include statements
Some of these header files are no longer necessary, and will be removed
from libdivecomputer in the near future.

Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-13 18:02:47 -07:00
Jef Driesen
241bd9aa15 Fix building against upstream libdivecomputer
The custom_serial.h header doesn't exist in upstream libdivecomputer.

Signed-off-by: Jef Driesen <jef@libdivecomputer.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-13 18:02:39 -07:00
Marco Martin
71191f1294 QML UI: only assign actions in a declarative way
Assigning actions in an imperative way on component complete,
seems to cause a crash on some devices, assign declaratively
the whole list instead, hiding the gps related actions on
iOS as they are not supported on that platform.

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-13 11:05:26 -07:00
Dirk Hohndel
a0c6cf5c89 Update translation source strings
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-13 11:04:06 -07:00
Dirk Hohndel
5641d6d490 QML UI: need major.minor versions, apparently
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-12 20:33:27 -07:00
Dirk Hohndel
5f9ca5f2ec Add Qt 5.7 and 5.8 for Darwin in build script
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-12 20:24:24 -07:00
Dirk Hohndel
86a98867f1 Fix build against older Qt versions
While the new syntax is nicer and faster, this isn't supported prior
to Qt 5.6 and we still support 5.5 on older OSs.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-12 20:24:24 -07:00
Dirk Hohndel
058179a305 Add Dutch user manual HTML file
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-12 18:08:06 -07:00
Jan Mulder
fd40a29ec8 Use libdc from github now
The build script was cloning the Sursurface branch of libdivecomputer from the "old"
location. Use the new github based location from now on.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-12 17:50:44 -07:00
Jan Mulder
441260b8bc user manual: five trivial typos
five trivial typos corrected

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-12 07:48:39 -07:00
Jan Mulder
fd11aa8248 user manual: some more graph -> profile renames
And found some more graph -> profile strings to be renamed.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-12 07:48:39 -07:00
Jan Mulder
4fae51817a user manual: sync command line options
Sync the command line opions with 4.6.3 (added win32log)

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-12 07:48:39 -07:00
Jan Mulder
69cf0cf2e8 user manual: print a dive plan
Removed 2nd occurrence of the fact that a dive can be printed in
the planner using the print button.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-12 07:48:39 -07:00
Jan Mulder
b0c69aa111 NL: incorporate user manual in build
Add the nwe NL user manual to the build process.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-12 07:46:46 -07:00
Jan Mulder
2d5519a35d NL: first edition of usermanual translated to Dutch
First edition of usermanual translated to Dutch.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-04-12 07:46:46 -07:00
Miika Turkia
f9988f0aea Fix DivingLog's O2 import
Make sure the Gas setup contains O2 value when trying to import that.
In latest log sample the Gas seems to contain the decompression
algorithm used. And as this value was grabbed after O2, we ended up with
empty O2.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-04-11 17:26:45 -07:00
Miika Turkia
360cd85445 Fix DivingLog import
DivingLog seems to report cylinder start and end pressures in metric
format, but sample readings are in imperial in case user has selected
this unit. So we must convert the sample pressures in this case.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-04-11 17:26:45 -07:00
Miika Turkia
e355037e20 Ignore empty cylinders on Cobalt import
It appears that Cobalt might include additional gas mixes, and only way
to determine what is used appears to be to ensure that start and end
pressures are greater than 0. One would assume there to be something
else available in the database, but I was not able to spot it.

Fixes #297

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
2017-04-11 17:26:31 -07:00
Dirk Hohndel
4ea4e8fa81 QML UI: re-layout the details view
This is a different take that seems to deal much better with different
width and font size combinations.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-11 17:24:44 -07:00
Dirk Hohndel
f99aedc626 QML UI: correctly set grid column widths
Spending more time reading the documentation, we need to set the
Layout.maximumWidth, not the width.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-10 10:22:02 -07:00
Dirk Hohndel
35e48a490b QML UI: fix iOS build script
Syntax for one of the libdivecomputer configure options was wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-07 17:07:55 -07:00
Dirk Hohndel
c443576181 QML UI: enable embed code for iOS
This should help us with better iOS apps as it allows Apple to run
llvm against our code to improve performance.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-07 17:07:21 -07:00
Dirk Hohndel
924370c0e4 QML UI: modify dummy.qml to bring the correct plugins
Our qmake based build for iOS still requires the dummy.qml to trigger
inclusion of the correct plugins in the iOS app.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-07 17:06:11 -07:00
Dirk Hohndel
8a53cf8e64 QML UI: update qmake file to include Controls.2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-06 21:29:09 -07:00
Dirk Hohndel
11f7e18139 QML UI: support extreme widescreen Android devices
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-06 21:22:56 -07:00
Robert C. Helling
6afcbeef4d Move version and date around notes to save space
This prints this information in the header near
"Subsurface" where I guess at least the version information
belongs. Plus it saves a line.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-04-06 18:29:11 -07:00
Stefan Fuchs
c9c9b1b399 Add creation date and Subsurface version to planner output
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-06 18:29:11 -07:00
Tomaz Canabrava
385816be2e Aparently, remove a QXB warning.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-06 18:25:53 -07:00
Tomaz Canabrava
2f86cbdc36 Clean up some widgets
Simplify logic of handling the Message that this
dive is being modified.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-06 18:25:15 -07:00
Tomaz Canabrava
1fc4fba69f Break down MainTab into smaller classes
Maintab is one of our most complex classes, and it's
something I'm not actually proud of. But it currently
works and the idea of splitting it was in my head for
quite a while.

This is the third or fourth tentative of splitting it,
and this time I let the most complex part of it untouched,
the Notes and Equipment tab are way too complex to untangle
right now on my limited time.

A new class 'TabBase' should be used for any new tab that
we may create, and added on the MainTab (see the new lines
on the MainTab constructor).

Also, Extra Info, Information, Photos and Statistics where
ported to this new way helping reduce the number of
lines and functions on the MainTab quite a bit.

Overall this is a step in the right direction for the future.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-06 18:23:25 -07:00
Marco Martin
8a71196e4e QML UI: fix saving fields using HintsTextEdit
The editText property is not there anymore, we need text

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-04 19:10:22 -07:00
Marco Martin
89d7dd4348 QML UI: dialog of HintsTextEdit on top
Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-04 19:10:22 -07:00
Dirk Hohndel
01d091fbd5 QML UI: better handling of device pixel ratio
In order to make sure we don't render the initial profiles with the
wrong scale on devices, we need to seed the device pixel ratio with the
device default and then update it once the window has been created.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-04 11:00:18 -07:00
Dirk Hohndel
e700ea9638 QML UI: more hacks for the magicShiftFactor hack
Since the device pixel ratio can be a fraction we should interpolate the
values. I still don't really understand why this is necessary, so this is
a hack on top of a hack - but for most values I tried this does seem to
give us a reasonably well placed (and well scaled) profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-04 11:00:18 -07:00
Salvador Cuñat
e4086dc746 smtk-import Avoid duplicities in bookmarks
SmartTrak's bookmarks work in the same fashion Subsurface's do. The user
may set a bookmark while underwater or set it just on the divelog
software.
At this time we are parsing those set in the DC twice, as we get one
from libdivecomputer and another from smarttrak's database.

This patch just checks if we have a bookmark event downloaded by
libdivecomputer which has the same time that the one parsed from the
.slg file. If so, merge the names taking the one from smarttrak.

Text from smarttrak is preferred because the user may have entered some
interesting note there and libdivecomputer's name is just "bookmark".

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-04-04 10:54:55 -07:00
Salvador Cuñat
4864ea56cb smtk-import Fix wreck data import
It was assumed that every data field in a wreck table was filled or
zeroed.  This assumption is actually false, so this patch adds testing
for the existence of strings before working with them.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
2017-04-04 10:54:55 -07:00
Dirk Hohndel
8c94fa2676 QML UI: ensure actions are set up for Credentials page
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-03 10:49:07 -07:00
Marco Martin
e4460be8a6 QML UI: use a scrollable page for StartPage
Fixes scrolling of the cloud credentials and simplifies code

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-03 07:22:56 -07:00
Stefan Fuchs
b5f203c888 mxe_build.sh - Rebuild everyth. when switching between debug and release
When switching between debug and release MXE build one needs to rebuild
everything.

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
2017-04-01 08:08:16 -07:00