Let's have names for the colors in each theme and assign those
named values to the theme colors when switching themes. This
way other pages can access the colors that are not in the current
theme (for example for a theme switcher).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This code is based on code from Marco Martin from the Kirigami Android
sample app. In order to simplify the QML code the QMLManager function is
there for all OSs, but it's a no-op on anything but Android.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Instead of being "custom serial", it's a IO model that allows serial or
packet modes, independently of each other (ie you can have a bluetooth
device that does serial over BT rfcomm and packet-based communication
over BLE GATT with the same serial operations that describe both cases).
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This way in the en_US locale we no longer get shown the odd "dive(s)"
and instead get correct singular and plural forms.
Most of the patch is just a reindentation as it removes the if clause
that used to do the special case of NOT loading a translation for the
en_US case.
Right now we start with a trivial en_US translation file. My guess is
that this will be overwritten once we do the next round of "new strings,
new translations".
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Currently, only a small number of dive computers can be downloaded from
the mobile app. Only present the supported ones to the user. So, currently
restricted to classic BT. Not sure about FTDI support at this point.
Version 2 of the same commit after review from Dirk. Fundamentally,
support is as follows: Android: BT, BLE, and FTDI. iOS: BLE only. For
all other OSses, this commit has no changes. As the BLE backend is
not yet ready, no support on iOS yet.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
I don't quite understand why this isn't correctly substituted to lrand48()
by the header file, but patching it in the source is easy enough.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Way back in time this code was copied from downloadfromdcthread, so
de-duplicate and call that code instead.
Signed-off-by: Anton Lundin <glance@acc.umu.se>
6963b52d introduced a cmake option, COMMANDLINE to enable building a
pure command line version of smtk2ssrf importer, but then the
#define COMMANDLINE=1 forces building CLI mode.
This patch allows building GUI or CLI versions depending on selection of
the COMMANDLINE option.
Signed-off-by: Salvador Cuñat <salvador.cunat@gmail.com>
This way the user can scroll up the page to see all of the notes without
having them covered by the action button.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Occasionally I see errors in the log where we would access modelData.dive
with modelData = null. This patch addresses a couple of the spaces where
this happens, but also simplifies the code by using the existing alias.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This isn't great, yet, but a first step to show that this is possible
(and in doing so I found quite a few spots where the colors weren't
correctly propagating, yet).
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
By making the assignments to the Kirigami Theme colors Qt bindings
things get correctly updated when switching.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Now that we have distinct colors for trip header and selected dive, this
is actually counter productive.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Make the accent color much lighter, don't have a solid bar on the left
for dives that are part of a trip.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Implementing another suggestion from Davide. A button to get the map
(as well as just tapping on the location name).
Fixes#431
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Remove the grid layout and replace it with code that is derived from the delegate
that we use in the dive list. In order to look proportional I ended up using a
larger font for the location and therefore decided to allow that text to wrap
instead of forcing single line.
This implements a good chunk of another one of Davide's great
suggestions.
See #431
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>