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>
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>
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>
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>
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>
- 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>
- 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>
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>
- 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>
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>
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>
- 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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
The log page have an extra top bar that is not needed.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Since pkg-config is installed in different places on linux and mac,
let's ask where it is.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Until we can get libftdi to build on mac we are better of just diabeling it.
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>