Commit graph

365 commits

Author SHA1 Message Date
Joakim Bygdell
98268a0c7e QML UI: add icons to the GPS menu
As per title.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-23 03:20:58 +09:00
Joakim Bygdell
5739294c07 QML UI: add icons to the dive management sub-menu
The title says it all.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-23 03:20:58 +09:00
Joakim Bygdell
72c5125b2e Add more icons
New icons for the dive management  sub-menu
ttps://material.io/icons/
The icons are under Apache License Version 2.0

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-23 03:20:58 +09:00
Joakim Bygdell
8419a19810 QML UI: add icons to global drawer
Add an icon to each item in the global drawer

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-23 03:20:58 +09:00
Joakim Bygdell
71b6b8e043 Add material icons
Add a couple of icons from the material repository.
https://material.io/icons/
The icons are under Apache License Version 2.0

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-23 03:20:58 +09:00
Joakim Bygdell
a66d876ed0 QML UI: add checkbox to show/hide developer menu
Add a checkbox to the preferences page to facilitate selective visibility of the developer menu. With the coresponding function in qmlmanager.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-23 03:20:58 +09:00
Joakim Bygdell
0eef27376a QML UI: reorder the items of the global drawer
Change the order of the items in the global drawer and change the name of some of them.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-23 03:20:58 +09:00
Jan Mulder
6f8e50f860 QML UI: fix some obvious UI errors
Fixes: #490 items 1) and 2).

1) Reference to isBluetooth.leftPadding is removed as the isBooltooth
checkbox is gone.

2) Do not set background color of downloaded dives. The checkbox is used
to denote "selected or not".

In addition, incorrect references to subsurfaceTheme.PrimaryColor (which
does not exist) are replaced by the correct subsurfaceTheme.primaryColor.

Finally, an obvious copy/paste error width: childrenRect.height. that
is supposed to be width: childrenRect.width.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-19 21:52:22 +09:00
Jan Mulder
619fbaf1e2 QML UI: Allow cancel of ongoing download
This commit adds the capability to cancel a running download from DC.
The actual cancel is fully handled in the underlying libdivecomputer
code. As the user may be interested in the dives downloaded up to
the moment of cancel, do not just close the download screen (as
it was before this commit). Now, the <quit> button changes to
<cancel> when the download is started, and pressing cancel, only
cancels the download and does not close the download screen, but
presents the so far downloaded data. When no download is running,
the <quit> button just quits the screen as before.

Fixes: #485

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-19 21:49:37 +09:00
Joakim Bygdell
c1e0324d95 QML UI: set the color of the action side-buttons
This sets the color of the action side-buttons to the same color as the overlay drawer.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-18 00:49:31 -07:00
Dirk Hohndel
bb3387f234 QML UI: Download from DC: remove Bluetooth checkbox
The connection already clearly defines whether this is Bluetooth or not.
No reason for the separate checkbox.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-18 00:49:31 -07:00
Dirk Hohndel
0104d7444e QML UI: Download from DC: smaller font for connection
Also style all three drop downs the same (otherwise the left edge of the
text doesn't align).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-18 00:49:31 -07:00
Dirk Hohndel
025efc12d4 QML UI: remove the Paired Bluetooth Devices virtual vendor
We now actually handle connections in a sane manner and don't need
that workaround anymore.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-18 00:49:31 -07:00
Dirk Hohndel
c7e284369a Merge branch 'MobileUI' of git://github.com/jbygdell/subsurface 2017-07-17 07:39:48 -07:00
Dirk Hohndel
695be281c0 QML UI: automatically set the Bluetooth checkbox
I wonder if we even need this anymore at all as the connection
clearly determines whether this is a BT download or not.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-17 07:36:44 -07:00
Dirk Hohndel
ec1b22b487 QML UI: only change connection when finding a match
If we can't find a match, just leave it unchanged. This way, if we
mis-recognize a device, the user can correct the product (or even
vendor) without losing the correct connection.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-17 07:35:22 -07:00
Dirk Hohndel
40223c8a5f QML UI: show the connection choices in Download UI
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-16 21:53:44 -07:00
Joakim Bygdell
a4e3a4cb25 QML UI: style the GPS fixes page
Add styling to the GPS fixes page.
The background color of the swipe list objects is wrong and also the icon overlay. This is a Kirigami issue.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-15 18:21:03 +02:00
Joakim Bygdell
03a52b37bc QML UI: add material theme controls
In order for the theme styilng to work we need the materials definitions.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-15 18:11:34 +02:00
Joakim Bygdell
4a1b675b86 Fix typo
Simple typo.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-15 16:36:37 +02:00
Joakim Bygdell
c0a9426ad3 QML UI: add Kirkigami theme variables
The built in theme in Kirigami has special variables for sertain objects, this sets the correct color for each object to match our themes.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-15 16:35:40 +02:00
Joakim Bygdell
745e29958a QML UI: define the material accent colors for each theme
THe editable textboxes rely on the material theme to set the correct colors. This sets the appropriate colors for each theme.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-15 16:33:52 +02:00
Joakim Bygdell
1f20350849 QML UI: style the overlay drawer
This adds separate colors for the overlay drawer background for light and dark themes.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-15 16:31:55 +02:00
Joakim Bygdell
0c31167e72 QML UI: style the GPS services checkbox
This adds style to the GPS services checkbox so that it matches the theme.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-15 16:28:58 +02:00
Joakim Bygdell
b889bf117d QML UI: style the DC download dialog
This sets the checkboxes in the dive computer download dialog to match the rest of the theme.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-15 16:27:34 +02:00
Joakim Bygdell
60b64ceca4 QML UI: Hide map it text if no coordinates exists
This hides the text for the map it button if ther are no coordinates for a dive. Needed as for the dark theme the map it text was still visible.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-14 16:28:50 +02:00
Joakim Bygdell
2ecd7e58d4 QML UI: Change the pink color
This changes the pink primary color to match the tone of the blue primary color.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-14 15:44:45 +02:00
Joakim Bygdell
9f3a565601 QML UI: Add right handle icon
This adds the right handle icon that is needed for the swipe list items not to report an error when activated.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-14 15:41:04 +02:00
Joakim Bygdell
2f0873a7c1 QML UI: Don't use black for dark theme
This sets the background color to the recommended hue for dark themes.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-14 15:37:59 +02:00
Dirk Hohndel
b7b2e813ad QML UI: only offer BT checkbox if BT is available
Right now we need to restart Subsurface-mobile in order to detect
Bluetooth devices - so simply turning on BT after Subsurface-mobile was
started is not sufficient.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-12 04:16:39 -07:00
Dirk Hohndel
d233725519 Whitespace change
No code change at all.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 21:11:37 -07:00
Dirk Hohndel
3a7ecc1a7f QML UI: make Preferences page scrollable
This commit only has the actual changes, the next commit will clean up
the white space in order to make it more obvious what was done.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 21:11:37 -07:00
Dirk Hohndel
6422932c61 QML UI: correctly wrap devinfo message
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 21:11:37 -07:00
Dirk Hohndel
dbb5826f2a QML UI: add preference for libdivecomputer log
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 18:08:36 -07:00
Dirk Hohndel
ff659396c3 QML UI: fix typo in color values
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 18:06:12 -07:00
Dirk Hohndel
9111ce01e7 QML UI: show progress messages on the download page
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 16:07:48 -07:00
Dirk Hohndel
8e0895e429 QML UI: Download from DC: disable misleading UI elements
These buttons only work when we successfully downloaded a dive. Also, don't
show a list of dives when there are no dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09 16:07:03 -07:00
Joakim Bygdell
22a0ebe45d QML UI: Style the gps checkbox
Style the gps checkbos on the dive edit page so it follows
theme coloring.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
4698b86b13 QML UI: Style the radio buttons
This styles the radio  buttons in the preferences pane
so they follows the theme colors.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
4c4b72853c QML UI: Style the BT download checkbox
Style the checkbox to the themes primary color

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
aa5060669c QML UI: Style Dive Details View
Change the accent colors in the dive details view
to match the theme colors.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
b9a05e501b QML UI: Style DC download buttons
Style the button in the DC download dialog so they follow
the theme colors.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Joakim Bygdell
12ac75c7dd QML UI: Proper button color
Make the "map it" button follow the theme color.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09 03:06:04 +09:00
Dirk Hohndel
b1f4a2975f QML UI: better icon for download from dive computer
Thanks to Davide for paying for professional icon design.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-08 10:29:10 -07:00
Dirk Hohndel
ce21c2a696 QML UI: drop AppLog title and add margin instead
The title was hidden under the title bar, anyway.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-06 09:34:37 -07:00
Dirk Hohndel
282698e5d2 QML UI: disable reachability mode
Latest Kirigami master allows us to turn off reachability mode. In
general this had been rather confusing to our users and it seems to
somewhat conflict with the pull down to refresh of the dive list.

Latest Kirigami also changes the behavior of refresh slightly, you now
need to pull "down" for at least 500ms before it triggers. So, with this
change and the latest Kirigami, hopefully the user experience for
refresh is good enough that we can consider keeping it enabled and use
it as an equivalent to manual sync (even in offline mode).

See #454
See #456

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-29 15:10:42 -07:00
Jan Mulder
d6446569af QML UI: only drag a pull down sync, and not flick it
Fast flicking to the top of the divelist triggers almost certainly a
pull down sync, as the default boundBehavior is DragAndOvershootBounds.
Despite being the default QML action, this leads to unwanted pull
down syncs (even in offline mode).

Setting the boundBehavior to DragOverBounds solves this issue. Now,
the user has to explicitly drag the top down to force a pull down
sync, and a accidental fast flick is stopped at the upper bound.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-06-29 23:21:55 +09:00
Dirk Hohndel
b459ccbff7 QML UI: DiveList: make download from DC main action
Now that we support this for many dive computers, that seem reasonable.
I'm not happy with the icon, but couldn't figure out a better one in the
breeze icon set.

See #426

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-27 22:18:26 -07:00
Dirk Hohndel
77f545b38e QML UI: Download from DC: move accept button to the right
So it doesn't conflict with the hamburger menu button / opening the
global drawer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-25 16:12:45 -07:00
Dirk Hohndel
4963b27f52 QML UI: Download from DC: avoid assignments of undefined values
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-25 16:12:07 -07:00
Dirk Hohndel
fc2ca3a804 QML UI: DC Download progress indicator
For now just do an indeterminate busy indicator - we can get more fancy
and use the libdivecomputer progress event, later.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-25 15:52:07 -07:00
Jan Mulder
03badea06f QML UI: make toast message translatable
Restyle construction of toast message and enable translation for it.
Further, removed newline characters as they break the lines at
non-logical positions.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-06-25 13:56:04 +09:00
Dirk Hohndel
d93280f1dc QML UI: DiveList: add date box to trip header
This way you can tell when a trip happened.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-24 13:13:04 -07:00
Dirk Hohndel
49a368539a QML UI: set opacity of 1 for dive list
Hopefully with this we get exactly the right colors.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-24 11:19:56 -07:00
Dirk Hohndel
e3cd6719c1 QML UI: Davide's colors for the blue theme
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-24 11:18:18 -07:00
Dirk Hohndel
94bc756391 QML UI: Theme colors: fix bad typo
Here I confused myself with "dark" theme and the "darkerPrimary"
colorls...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 21:36:59 -07:00
Dirk Hohndel
206df227f8 QML UI: remember the theme
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 19:49:57 -07:00
Dirk Hohndel
26b206af1f QML UI: show a small color palette preview
When picking which color theme to use, show the user how things will look.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 19:49:57 -07:00
Dirk Hohndel
8ba581a088 QML UI: use textColor instead of diveListTextColor
This color is used for more than just the dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 19:49:57 -07:00
Dirk Hohndel
694e833f90 QML UI: move theme setting into preferences
And reorganize settings and preferences a bit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 18:48:41 -07:00
Dirk Hohndel
dac9ce578b QML UI: clean up the setting of theme colors
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>
2017-06-23 18:48:41 -07:00
Dirk Hohndel
3f055ac9cb QML UI: set color of the action button
This requires Kirigami master past 2.2.0 (which explains commit 001ff1b9
"QML UI: switch to Kirigami master").

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-23 08:44:55 -07:00
Dirk Hohndel
57e365222b QML UI: color the status bar on Android
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>
2017-06-23 08:42:45 -07:00
Dirk Hohndel
b1f7e3eae2 QML UI: add missing go-up icon
Now the 'Reachability' feature should be more obvious.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-22 09:05:43 -07:00
Dirk Hohndel
ea218b9d24 QML UI: DiveList: allow trip header to wrap
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-22 04:19:23 -07:00
Rick Walsh
d9cb65cbed QML UI: turn off spinner if pull-down-to-refresh fails
Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-22 04:19:23 -07:00
Dirk Hohndel
28490d5dd0 QML UI: DiveDetails: add more space at bottom
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>
2017-06-21 18:33:27 -07:00
Dirk Hohndel
a7fca80a3e QML UI: don't access dive without modelData
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>
2017-06-21 17:20:07 -07:00
Dirk Hohndel
7b7294d127 QML UI: DiveList: implement pull down to refresh
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 17:20:07 -07:00
Dirk Hohndel
e0f46b033d QML UI: attempt to add dark theme
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>
2017-06-21 17:20:07 -07:00
Dirk Hohndel
8f2fc84ae7 QML UI: simple attempt to allow color scheme switching
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>
2017-06-21 14:01:30 -07:00
Dirk Hohndel
71d9aafcd6 QML UI: Linus requested Hot Pink as color scheme
He started the project, he gets to have his color preference.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 13:34:15 -07:00
Dirk Hohndel
4651454557 QML UI: don't reduce opacity for background of selected dive
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>
2017-06-21 11:53:19 -07:00
Dirk Hohndel
02d8c98c93 QML UI: DiveList: always show current trip at the top
This is especially nice for very long dive trips.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 11:48:29 -07:00
Dirk Hohndel
9ddd26ff37 QML UI: redo all the colors
Naming them the same way Davide named them in his emails and assigning the
color values he proposed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 11:05:36 -07:00
Dirk Hohndel
16f16f6818 QML UI: DiveList: fix position of delete button
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 11:01:37 -07:00
Dirk Hohndel
c775fcebec QML UI: DiveList: turn the color blob into a thin line
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 09:55:03 -07:00
Dirk Hohndel
fc4153f8ac QML UI: make title bar taller again on Android
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 09:29:24 -07:00
Dirk Hohndel
d7be3b21d6 QML UI: DiveList distinguish trip and selected dive
Making the selected dive's background less opaque prevents confusion.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21 09:28:40 -07:00
Dirk Hohndel
1d32ebd657 QML UI: use Android palette colors
These were picked from
https://material.io/guidelines/style/color.html#color-color-system

One could argue that we should use different colors for iOS.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 22:51:25 -07:00
Dirk Hohndel
d1ed9c310f QML UI: remove files we no longer use
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 22:49:41 -07:00
Dirk Hohndel
fd5cd5ebf0 QML UI: DiveList: playing with different colors
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>
2017-06-20 16:21:47 -07:00
Dirk Hohndel
7a6f87405a QML UI: disable the MouseArea
Visible doesn't even make sense...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 13:28:46 -07:00
Dirk Hohndel
20dae442ad QML UI: DiveDetailsView add button for map
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>
2017-06-20 13:28:46 -07:00
Dirk Hohndel
7ccda01e7e QML UI: DiveDetailsView: make key dive info consistent with dive list
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>
2017-06-20 13:06:29 -07:00
Dirk Hohndel
cbcb43247e QML UI: DiveDetailsView: make the lower section less busy
This removes fairly redundant text (yes, we know those are the Dive Details) and
makes the label for the Notes consistent with all the other labels.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 11:59:51 -07:00
Dirk Hohndel
4f34513277 QML UI: DiveDetailsView: move profile into bottom layout
Then we can remove the main layout and create a similar look as we now have
in the dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 11:57:14 -07:00
Dirk Hohndel
d941384fb6 QML UI: DiveDetailsView: don't underline location
Davide points out that this is not a commonly understood way in an app
to indicate that a text is also a link. So let's just remove that (but
tapping on the location will still work to get you to the map if there
is GPS information available).

See #431

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 11:07:09 -07:00
Dirk Hohndel
4a2e21cf7b QML UI: log the font in use
This shows that we are, indeed, using Roboto on Android. Which means I
can close the first of Davide's design issues:

Fixes #427

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 11:00:01 -07:00
Dirk Hohndel
157e14e11d QML UI: DiveList: some fine tuning of sizes and spacing
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 10:05:45 -07:00
Dirk Hohndel
712d1e97f3 QML UI: DiveList: remove space below trip heading
That made sense before we had the shaded background, now it just looks terrible.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 09:25:07 -07:00
Dirk Hohndel
edd0d2f2bb QML UI: DiveList: don't show empty trip heading for dives without trip
We need to hide the left bar and background rectangle as well.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 09:14:05 -07:00
Dirk Hohndel
a93e3b26d6 QML UI: DiveList: show left bar on dives that are part of a trip
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 09:13:12 -07:00
Dirk Hohndel
a6a9eaa998 QML UI: DiveList: add blue bar on the left to trip heading
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 08:29:06 -07:00
Dirk Hohndel
684354ab6e QML UI: re-indent DiveList code
No actual changes besides whitespace.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 07:49:11 -07:00
Dirk Hohndel
e49301ea21 QML UI: DiveList: add background color to trip heading
In order to make it easier to see the changes, the code hasn't been re-indented.
This will be in the next commit.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 07:49:11 -07:00
Dirk Hohndel
3d8f61fe6c QML UI: turn DiveList heading into label
This way it will render in the same font as the location of a dive.
This will look like crap until the next commit adds a rectangle with
color around it, but this way it's much easier to see the individual
changes.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-20 07:45:16 -07:00
Dirk Hohndel
3d707dca9a QML UI: make the dive list heading slightly smaller
Again, the goal is to make this list look better and be more space
efficient.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-18 18:05:18 -07:00
Dirk Hohndel
d74ef97228 QML UI: less whitespace around dive list entries
This way we get to show a few more dives per screen.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-18 17:38:03 -07:00
Dirk Hohndel
47a01b1dcd QML UI: improve the dive list layout
Based on Davide's ideas, but with a few tweaks:
I really like the dive number on the far right; that gives a clean
consistent look. I tried it with date on the left and depth/duration in
the middle and liked the result.

This doesn't change the font, just addresses the layout and bold heading
vs smaller sub-heading.

See #427

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-18 17:06:53 -07:00
Dirk Hohndel
b2b51c833a QML UI: redesign the user notification
The old system of cloud access updates with fake percentages just wasn't
helpful. Even worse, it hid a lot important information from the user.
This should be more useful (but it will require that we localize the
messages sent from the git progress notifications and make them more
'user ready').

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-17 23:22:37 -07:00
Dirk Hohndel
9db886b8c8 QML UI: explicitly reference parent id
Otherwise we get an odd 'TypeError: Cannot read property of null'
error message.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-17 22:56:08 -07:00
Dirk Hohndel
b45340389b QML UI: better App Log
This should actually scroll and be much simple.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-16 02:02:00 -07:00
Dirk Hohndel
77a3e6ac70 QML UI: clear the previous list when downloading
When you start a new session with Download from DC, clear out the table
from the last attempt before adding the page.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-16 01:22:44 -07:00
Dirk Hohndel
fb2638b3fb QML UI: small fix and whitespace cleanup
In the JS code we should use assignment with '='.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-13 00:54:21 -07:00
Jan Mulder
23df593817 Mobile: wrap up fixes for BT download on Android
Major functional change in this commit is the addition of found static BT devices
to the internal administration (on Android), in a way that is equivalent to
mobile-on-desktop. So, in both cases, the list of devices in the app are
as in the list of devices on the host OS (Linux or Android). To minimize code
duplication, the btDeviceDiscovered slot is split in two parts, the part to
act as slot for the Qt BT discovery agent (Linux, so mobile-on-desktop), and
the part only needed for Android.

Remaining to be fixed: the correct handling of the QML UI selection of
vendor/product. The first default dive computer is correctly detected,
all paired devices from the virtual vendow can be selected, but clicking
through vendors results in non logical selections. It is obvious why
this is, but a fix is not straigforward at this point.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12 11:05:08 -07:00
Jan Mulder
5142d7409f Mobile: add BT name to vendor/product capability
This adds a central function to convert a BT name to a vendor/product pair
known to Subsurface. This allows interfacing from a paired BT dive
computer, without actively selecting its type, but by selecting it
from the list of paired BT devices. So, after this, downloading from
multiple (paired) DCs is also possible.

And not the niced piece of code ...

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12 10:59:05 -07:00
Jan Mulder
790c0dcfc8 QML UI: add internal admin for virtual vendor
Added a list of paired BT devices for the "Paired BT Devices" vendor. The
devices under this vendor represent all BT devces that can be found
from the local BT interface. Some special processing is required, as
the BT provided data is (obviously) missing the specific data needed
to open a BT device using libdc code. This processing is not in
this commit, but will follow. This commit is preparation for that.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12 09:55:27 -07:00
Jan Mulder
f6e94e691f QML UI: call correct function for BT address
After the recent refactoring of QMLManager to btdiscovery, the
manager.getBtAddress() got superseeded by
downloadThread.data().getDetectedDeviceAddress(). Corrected this
here.

Futher some debug output is modified, so that it report the proper
function names.

This corrects the download from an automatically detected OSTC 3.
Manul selection of the same device from the fake vendor "Paired
BT Devices" does not work, however. Still work to be done in
that area.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12 09:49:11 -07:00
Dirk Hohndel
b14a522f4f QML UI: move BT handling into core code
This shouldn't be part of the UI (qmlmanager), but part of our
overall handling of dive computers and BT devices.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-11 13:55:41 -07:00
Tomaz Canabrava
0ea6f13891 Add a messageHandler to take care of qDebug & friends on QML
all qDebug / qCDebug and friends now will be properly
logged into developer -> log, on QML.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-11 13:55:41 -07:00
Dirk Hohndel
8faf33eac6 QML UI: correctly set up the divecomputer for download
If we find a paired BT divecomputer, this will populate vendor and product
correctly for that device.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-11 13:55:41 -07:00
Tomaz Canabrava
03e771066b QML UI: show selection box on the Download from DC list
QML and C++ model don't interact too much, a new Rule
should be created and used on the QML

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-04 07:11:01 -07:00
Dirk Hohndel
782caf5fa6 QML UI: use the BT address of the first dive computer found
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31 10:14:24 -07:00
Dirk Hohndel
c8c56b3737 QML UI: populate dive computer vendor and product
If we detected a BT dive computer, we can already set up the vendor and
product for it (as well as the new BT checkbox).

Oddly, in my tests this doesn't set up the product correctly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29 15:11:11 -07:00
Tomaz Canabrava
b9ac6334c7 QML UI: remove unused layout
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29 12:01:15 -07:00
Tomaz Canabrava
52e07a6306 QML UI: select / unselect dive by clicking on it
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29 12:01:02 -07:00
Tomaz Canabrava
1de1a85e32 QML UI: add DownloadDiveDelegate
A delegate to display the dives in a better way,
based on the code from DiveList.qml

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29 12:00:51 -07:00
Tomaz Canabrava
81277c259b QML UI: remove unused item on the interface
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29 12:00:35 -07:00
Dirk Hohndel
3f0d21046e QML UI: add downloaded dives to dive list
This already takes into account which of those dives were selected.
Right now all we have is select all or none - this needs actual support
in the UI, but once that's there, it will just work (famous last words).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28 11:54:33 -07:00
Dirk Hohndel
057f46f854 QML UI: stub out saving downloaded dives
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28 03:22:46 -07:00
Dirk Hohndel
4ad02634e9 QML UI: add some DC Download info to AppLog
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28 02:50:55 -07:00
Dirk Hohndel
a492b8bbd0 QML UI: fix typo in component id
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28 02:23:03 -07:00
Dirk Hohndel
e255a698cb QML UI: remove code that's commented out
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28 02:21:05 -07:00
Dirk Hohndel
9d1ebffe1f QML UI: use QtQuick.Controls 2.0 everywhere
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27 14:36:32 -07:00
Tomaz Canabrava
38e24512b7 QML UI: add the Downloaded Dive Model
Still to do:
 - select the dives to save
 - record the downloaded dives

but download is already working. :)

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27 11:07:20 -07:00
Tomaz Canabrava
7858376727 QML UI: add the DownloadThread
For this I had to also make the DCDeviceData accessible,
and for that it needed to be a pointer.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27 11:07:20 -07:00
Tomaz Canabrava
0e4c996f51 QML UI: Fill the product list
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27 11:07:19 -07:00
Tomaz Canabrava
f78fdf3d0f QML UI: show the VendorList on the Download from DC
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27 11:07:19 -07:00
Tomaz Canabrava
9951592216 QML UI: fix the layout for the Download from DC
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27 11:07:19 -07:00
Tomaz Canabrava
8056e16589 QML UI: initial code for Download from Dive Computer
Add a new action on the drawer to display the
Download from Dive Computer options. Nothing works yet.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27 11:07:01 -07:00
Dirk Hohndel
8525805f04 Add SPDX header to mobile widgets and QML files
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29 13:32:55 -07:00
Dirk Hohndel
74a5511b39 QML UI: fix broken delete from dive details page
Trying to close the non-existing context drawer caused the function
to abort (and consequently not to delete the dive).

Fixes #309

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-15 13:50:18 -07:00
Dirk Hohndel
cc6c41c846 QML UI: fix GPS list rendering
There was an extra BasicListItem inside the SwipeListItem.
This commit just removes 5 lines, the rest is indentation change.

Fixes #312

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-15 13:33:48 -07:00
Dirk Hohndel
052be692bb QML UI: reset completion fields when adding dive
Otherwise the last value in those fields might still be shown.

Also, set up the cylinder completion.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14 17:33:11 -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
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
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
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
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
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
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