Commit graph

9539 commits

Author SHA1 Message Date
Dirk Hohndel
6a70793ba8 Location service: report number of recorded GPS fixes
This is mostly for debugging, to make sure that the recording of GPS fixes
works as expected.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-13 09:17:13 -08:00
Dirk Hohndel
4b39971978 Location service: apply the saved GPS fixes to dive list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12 20:23:00 -08:00
Dirk Hohndel
5873a08197 Location service: add member to apply the gps locations to dives
This is a direct conversion of the existing code in subsurfacewebservices
to the different data structures in use here. I did not try to abstract
this out to have both share a common helper because I assume that the
Subsurface web service will pretty quickly become obsolete (together with
the companion app).

Right now this is not hooked up anywhere.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12 14:57:27 -08:00
Dirk Hohndel
a8b0e9aa19 Location service: move GPS data to separate QSettings instance
This way we don't clutter the main settings and we don't have to deal with
making sure we are reading and writing from/to the right group.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12 13:04:23 -08:00
Wendie Fisher
1b0938034e Next batch of language updates for the user manual
Signed-off-by: Wendie Fisher <wendie@divedad.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12 11:08:44 -08:00
Salvador Cuñat
19fffba327 SmartTrak import - Add example divelog file
This is the example divelog shipped with Subgear products (OEMs for
Scubapro/Uwatec), just changed the name to be meaningful for the reader
of the dives directory.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12 07:39:21 -08:00
Salvador Cuñat
427c696c70 SmartTrak import - Add build capability to cmake
This enables posibility of building standalone import tool via cmake.
Adds an option SMARTRAK_IMPORT (defaults to OFF) which, if turned ON,
will require glib-2.0 and libmdb libraries to be installed, and, calling
will produce an executable with the highly original name of smtk2ssrf.

I have no capability to cross-compile to windows, so I haven't even
tried to put this in Win, less say in Mac. I expect linux users which
may be actual users of SmartTrak, to test this before trying to build on
windows, although the target public will probably be the windows users (or
at least, ex windows user).

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12 07:39:18 -08:00
Salvador Cuñat
ddc7784514 SmartTrak import - CLI parser and GUI files
The tool can be called from CLI with or without arguments, if called with a
single argument (this is, no destination file specified) an usage message will
be displayed on the terminal; if called with arguments, these should be the .slg
file(s) to be imported and a single .xml file to store the resulting Subsurface
formatted data; if called without arguments a GUI will display to select the
file(s) to import and to store.
WARNING, if destination file exists, its previous content will be erased.

The GUI is pretty simple and don't think any more is needed but, as this is my
first QT thing, I expect those with much better knowledge of QT/C++ will
improve it as needed.

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12 07:39:14 -08:00
Salvador Cuñat
dc4d8f26ec SmartTrak import - Support for .slg files import
SmartTrak is a Windows based propietary dive log software by Uwatec, which has
been the reference software for every Scubapro/Uwatec IRda based devices,
ranging from Smart to Galileo. It has just been recently that began to be
substituted by newer softwares like LogTrak and JTrak (these only supports
Galileo or newer devices and don't import SmartTrak's .slg files).i

SmartTrak also supports importing dives from older DataTrak software (oldest
Aladin series, serial based DCs) so most divers using Scubapro/Uwatec products
have probably their dives registered in this log, even those who have just moved
to newest Scubapro/Uwatec DCs.

SmartTrak is based in MS Access database with support for recreational and
technical dives up to 10 tanks, trimix (in later versions, prior versions had
support for just 3 tanks with Nitrox) and SCR/CCR.

In Linux, MsAccess databases are supported via libmdb which in turn depends on
libglib2, so this work has a hard dependency on these two libraries.
Libmdb sees very little (or null) development activity today so it can be
considered a mature library, which, in my opinion, makes it independent of
progresses of libglib2, this way, the tool should build on most Linux
distributions, even oldest ones (well, this will actually be false because of
the other dependencies of Subsurface).

Final note: It hasn't been until very recently that libdivecomputer has included
support for some of the data downloaded from Galileo devices, even today
understanding some of these data is WIP (e.g. alarms, are interpreted as
bookmarks at this moment, and there is a lot of noise coming from the
tanks/gases area in libdc)

Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-12 07:39:10 -08:00
Sebastian Kügler
973b68c304 Fix label overflow in divelist
- anchor the label to the left of the date field
- elide the text instead

This fixes the bug in the dive list where the dive's location overflowed
over the date, especially visible on phones in portrait mode.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 19:06:07 -08:00
Sebastian Kügler
3da912cda8 Cache diveprofile widget in the diveprofile QtQuick item
- paint() can become a hot path, especially when we think about
  repainting the item on size changes. In general, it's a really good
  idea to keep this function as fast as possible, as we want to be able to
  repaint the item when needed. Also, ProfileWidget is pretty heavy to
  set up, so rather spend a bit of memory there.

- Rename profile to m_profileWidget, it already was member var.

- Sizing ... I have to admit I don't understand the rendering of the
  ProfileWidget. I'd like it to do the following things:
	- render at native resolution, we don't want to resize it
	- react to item changes - we want to reset the size and
	  re-render the widget into the item in those cases
	- perhaps be able to use a couple more of the profilewidget's
	  features

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 19:06:00 -08:00
Sebastian Kügler
52b8cb5aa9 profilewidget2: Only add actions in desktop version
This fixes a bunch of warnings in the mobile version where these slots
are not defined (see the corresponding header's conditionals).

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 19:05:33 -08:00
Sebastian Kügler
6e43642610 Rework divedetails page
- Styled texts
- don't put all the properties of the text items in one long line, makes
  the code more readable and is in line with coding style used
  throughout.
- button and profile move into their own items, button moves to the
  right (it's more of a contextual item, so it's better placed top
  right, further more, a control is generally easier to reach on the
  right without covering information unnecessarily. Code-wise, it's also
  a more logical encapsulation.
- dpi-aware sizing of dive profile, use units.gridUnit instead of
  hard-coded pixels.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 19:05:27 -08:00
Sebastian Kügler
b50202bfc5 Use styled text items in divedetails
Using Label instead of text gives us consistent coloring and styling of
the text labels. Also remove the boldness to make it comply to the
design language used.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 19:05:20 -08:00
Sebastian Kügler
91b951c362 Simplify anchoring in divedetails
anchors.fill does essentially the same, as the item is positioned at 0,0
of the parent by default.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 19:05:10 -08:00
Sebastian Kügler
63cde0e120 dpi improvements for small text
- word-wrap and style the log message at the bottom, this should fix
  clipping of error messages down there
- introduce units.smallPointSize, which defines a small font size to use
  for toned-down display elements (e.g. the date in the dive list)
- No need to assign the default value to Text.text

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 19:04:26 -08:00
Sebastian Kügler
ac1607dce2 kill warning
This line seems to be a left-over from a refactoring. It doesn't do
anything, just produces a warning, so just remove it.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 19:04:13 -08:00
Dirk Hohndel
24ea1e9c67 Location service: only store gps fix after certain time or distance
This should be configurable in the preferences at some point.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 15:44:58 -08:00
Dirk Hohndel
62f7ec11d7 Location service: store locations in settings
This is rather simplistic and will clutter the settings. I'm not convinced
this is the BEST way to do this, but it's a rather straight forward way to
get persistant storage of the location fixes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 15:28:10 -08:00
Dirk Hohndel
cd7d6ae6e5 Location service: toggle the service from the main menu
That way we don't track the user's location until explicitly asked to do
so.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 15:28:10 -08:00
Dirk Hohndel
a29e74e2e9 Location service: move location provider into QML manager
Since we want to be able to toggle it from the QML UI that seems like a
better place for it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 12:38:23 -08:00
Dirk Hohndel
e7b2f04bec Location service: consistent way to output information
qDebug is nice when testing on the desktop, but it has to go to the
message area on an Android device to make things easy.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 12:38:11 -08:00
Dirk Hohndel
9195f247c4 Location service: move files around to fit new directory layout
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 12:37:57 -08:00
Dirk Hohndel
12a6a8f2b3 Location service: request position update
Mostly still just experimental code - now it tries to get an actual
position.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 12:37:40 -08:00
Dirk Hohndel
136b87e7c0 Location service: Add GPS location infrastructure for Subsurface-mobile
This doesn't do a thing - just adds the empty class and sets up the Cmake
file so it finds the required Qt components for Subsurface-mobile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-11 12:36:49 -08:00
Dirk Hohndel
111a153295 Preferences: correctly hook up the signals to enable/disable cloud storage
This way the menu state matches the actual verification state again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-10 13:45:13 -08:00
Miika Turkia
77d7e773b9 Enable BT compilation earlier
Commit ba55c60395 broke Bluetooth
support for me. This patch moves the setting of BT_SUPPORT earlier,
re-enabling BT download option on the download dialog.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-10 09:10:04 -08:00
Lubomir I. Ivanov
003ddc6b52 divetooltipitem.cpp: prettify the tooltip bounds and padding
When the tooltip is expanded, not enough padding is present right
from the text and bottom from it, making the tooltip border
appear very close to the text.

When the tooltip is collapsed (no time entries) it clips
the graph/pixmap which makes the graph bottom left corner appear
to be outside of the tooltip, mainly because of the white border
of the tooltip background and the background rounding.

To prevent these visual artifacts and to prettify the tooltip
this patch:
- makes the rounding 8 instead of 10 of the background rectangle
- doubles the padding left and right from the pixmap
(the above two pretty much move the pixmap bottom left corner
away from the rounded bottom left edge of the tooltip background)
- add more padding right and bottom from the text
- never reduce the height of the tooltip to be smaller than
the graph/pixmap height.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-10 09:08:57 -08:00
Lubomir I. Ivanov
f0bd39c551 modeldelegates: remove printing related delegates
Remove HTMLDelegate and ProfilePrintDelagate as
these are obosolete. The print related rendering
at the moment happens via QWebView.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-10 09:08:16 -08:00
Lubomir I. Ivanov
36314a86f8 qt-models: remove obsolete printer related classes
The profileprintmodel.cpp/.h and the
tableprintmode.cpp/.h pairs are obsolete.

The print layouting is now handled via the Grantlee library
and HTML.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-10 09:08:10 -08:00
Dirk Hohndel
b8c71ef6cd Remove empty implementations
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 18:00:56 -08:00
Dirk Hohndel
a48494d2fb Update various files to reflect the development towards 4.6
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 18:00:56 -08:00
Tomaz Canabrava
c71df5baa5 Don't rely on CMAKE_AUTOUIC
Some old CMakes that we use had problems with it, change to use
the qt5_wrap_ui macro that's bundled with Qt.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 18:00:56 -08:00
Tomaz Canabrava
e1d43ade27 Removed unused files
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 18:00:56 -08:00
Tomaz Canabrava
f5f2c37184 Remove the PluginSystem
But keep the Interface so it's still userfull to create a new
SocialNetwork  when needed, but it will be part of the code,
and not a plugin.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 18:00:56 -08:00
Tomaz Canabrava
66091ff853 Remove Facebook from Plugins
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 18:00:56 -08:00
Dirk Hohndel
7b1950ca03 Statistics tab: clear min/max duration with just one dive selected
Otherwise if the user selects more than one dive, then goes back to just a
single dive, the maximum and minimum duration of the previous selected
group of dives stays visible which is clearly incorrect.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 18:00:56 -08:00
Dirk Hohndel
e656c219a1 Uemis downloader: more debug output
Once again compile time enabled. I guess it would be nice to turn this
into a logfile (just like we have with the libdivecomputer backends).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 18:00:16 -08:00
Dirk Hohndel
fc1b8db17f Uemis downloader: recover if dive info is completely missing
I user had a Uemis that had a dive log entry for a certain internal id but
no dive info for it. This appeared to be one of those dreaded dives when
the Uemis decides to start a dive at the end of a flight and then stays in
dive mode until it runs out of battery.

Anyway, if we see a number above and a number below, just give up and move
on.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 17:58:36 -08:00
Dirk Hohndel
779a70629b Uemis downloader: deal with a whole block of deleted dives
If every dive in a download block from the Uemis was deleted we kept
downloading that same block of dives. With this we remember how far we got
even if the dives ended up being deleted.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 17:57:02 -08:00
Robert C. Helling
2075038de1 Store Thumbnails with image hashes
This drastically improves the time it takes to select a dive
with several pictures at the expense of longer startup and
bigger hash files.

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-09 10:18:10 -08:00
Tomaz Canabrava
e0f43d8a84 Link the facebook plugin against the subsurface_interface
This should prevent a compile issue on mac, worked without it on linux.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 16:33:37 -08:00
Tomaz Canabrava
4ddf4f6d83 Removed C++11 from the code.
Make Dirk ungrumpy

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 16:33:34 -08:00
Dirk Hohndel
761c3e4718 Revert "Mac: don't use C++11 on older clang versions"
This reverts commit acb74f25f7.

Better not enable it anywhere
2015-11-08 16:33:19 -08:00
Dirk Hohndel
871f585f42 Make building plugins optional
This currently fails at least on my old Mac that I use to create binaries
that work on 10.7 and newer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 16:31:38 -08:00
Tomaz Canabrava
125217074e Remove lambdas: they don't work on OSX 10.7
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 15:58:44 -08:00
Dirk Hohndel
f66e3a4489 Update Mac bundle build & sign scripts
These are mostly a convenience for me, they'd obviously have to be updated for
someone else trying to use them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 15:34:15 -08:00
Dirk Hohndel
acb74f25f7 Mac: don't use C++11 on older clang versions
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 15:34:15 -08:00
Dirk Hohndel
25501ebae7 Uemis downloader: print some information on stderr in verbose mode
On the Mac the info on the download dialog isn't shown. So print it on
stderr as well when in verbose mode.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 14:56:28 -08:00
Dirk Hohndel
9724ffc7b2 Cmake: remove references to removed source file
Otherwise the build breaks if FBSUPPORT is defined.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-08 09:48:40 -08:00