Commit graph

132 commits

Author SHA1 Message Date
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
Marco Martin
4113bab17b QML UI: replace combobox with custom text field with hints
Signed-off-by: Marco Martin <notmart@gmail.com>
2017-04-01 09:36:47 +02:00
Marco Martin
751626eec5 QML UI: Fully port dive edit to Kirigami2
Completely adapt to the api changes of OverlaySheet in Kirigami2
in order to achieve the same look and behavior for the dive
edits that had with kirigami1

Port most components to QtQuickContrls2, except comboboxes
in the dive edit sheet that will need a new control type

Signed-off-by: Marco Martin <notmart@gmail.com>
2017-04-01 09:35:51 +02:00
Jan Mulder
d6003209d6 Subsurface-mobile: do send decimal GPS to Google
Sending nicely readable formatted coordinates to Google Maps does not
result in a correctly positioned map. Google likes unreadable
decimal format.

Little hacky solution. Added a gps_decimal attribute, populate that
with the standard function for format a coordinate to string, but
reset the preferences value temporarly so that it always converts it
to decimal style.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-24 09:35:00 -07:00
Jan Mulder
59417342c7 mobile: the infamous enumerate problem
This fix seems to fix the enumerate problem: the problem that on a
seemingly non-determinstic way, all the profiles get enumerated
and rendered, causing freeze of the app, or even crash due
to out of memory.

Only 3 lines of code change, but this fix did not come easy. The
enumerate problem seems some kind of race condition between QML,
Kiragami and most definitely, the Subsurface QML code itself.
The breakthrough in my debugging was the setting of
highlightRangeMode: ListView.StrictlyEnforceRange based on
the QML documentation on snapMode: enumeration.

This fix deserves proper testing in multiple environments. As
could be seen on the developpers mailing list, I was (easily)
able to reproduce the enumerate problem, but Rick was not. So
I definitely do not claim to understand why this fix solves
the issue for me.

And as a sidenote: fixes #263 for me as well.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-24 09:27:23 -07:00
Dirk Hohndel
220d25588f QML UI: enable caching of the details view
This way the dive on either side should be cached.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18 17:05:45 -07:00
Dirk Hohndel
783f9ee565 QML UI: don't explicitly position view
Instead have the view follow the currentItem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18 17:05:45 -07:00
Dirk Hohndel
10842b3eb3 QML UI: don't unset the currentIndex in the dive list
It's unclear why this code was added in the first place - removing it
makes the highlight of the selected dive in the dive list work.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18 17:05:45 -07:00
Dirk Hohndel
dd1d90b529 QML UI: don't clip
At least that's what the QML documentation recommends.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18 17:05:45 -07:00
Dirk Hohndel
a2bc3e02f8 QML UI: small cleanups
Remove unused signal handler.
Small whitespace cleanup.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18 17:05:45 -07:00
Dirk Hohndel
9389fd0049 QML UI: don't access members of undefined objects
If we don't have a currentItem, don't try to access its members.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18 17:05:45 -07:00
Dirk Hohndel
33df10cbaa QML UI: small clarification
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18 17:05:45 -07:00
Martin Měřinský
869a7fcfcc dive master > divemaster 2017-03-04 12:08:17 -08:00
Martin Měřinský
f007f0329b Remove space before colon. 2017-02-21 07:03:10 -08:00
jbygdell
0e57033042 QML UI: Parse multiple buddies when editing a dive
This allows the user to enter multiple buddies as a comma separated list,
the "Multiple Buddies" entry is still a special case as we can only populate
the combobox with a single name for each entry.

fixes #168

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-29 14:55:33 -08:00
Dirk Hohndel
b15b3c195c QML UI: allow magic phrase for multiple buddies to be localized
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22 18:20:03 -08:00
Dirk Hohndel
0196d9a220 QML UI: correctly test if there are multiple buddies
The JS string function search returns the position of the string you
search for and -1 if that string isn't found. Also, search allows
regular expression, indexOf does just a string match. So let's use
that as it is much faster.

See issue #168

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22 18:18:57 -08:00
Dirk Hohndel
bfaeb22cc5 QML UI: prevent modification of Multible Buddies text
"Multiple Buddies" is magic in that it means "do not change the buddies
set for this dive". Allowing the user to edit that magic phrase defeats
the purpose.

This deals with part of issue #168 - but of course that magic phrase
shouldn't be fixed as English text.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22 18:18:07 -08:00
Dirk Hohndel
fc60f210c4 QML UI: move 'No dives in dive list' down
Otherwise it overlaps with the page title.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21 17:06:07 -08:00
Dirk Hohndel
14b4c94ded Revert "QML UI: build against latest Kirigami"
This reverts commit a842e44b68.
2017-01-21 14:42:10 -08:00
Dirk Hohndel
6459e455bc Revert "QML UI: steps towards working with Kirigami 2"
This reverts commit 53ce3ce3e3.
2017-01-21 14:42:00 -08:00
Henrik Brautaset Aronsen
ba23989e6b Update from 2016 to 2017. Happy new year!
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-01 10:28:25 -08:00
Tomaz Canabrava
4db80aa1a4 Remove opacity calls
ApplicationWindow has no Opacity calls no more.

Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27 09:46:58 -08:00
Dirk Hohndel
53ce3ce3e3 QML UI: steps towards working with Kirigami 2
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27 09:22:05 -08:00
Dirk Hohndel
a842e44b68 QML UI: build against latest Kirigami
But of course this doesn't work, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27 01:47:01 -08:00
Dirk Hohndel
13dbbd3085 QML UI: smaller fonts on narrow screens
This may be excessive, but it fixes the issue with the German localization on
some narrow screens.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20 08:47:08 -07:00
Joakim Bygdell
1219dc6931 QML UI: deal with multiple buddies correctly
When editing adive in Subsurface-mobile we can only handle one buddy
due to the limitations of the combobox. To prevent loss of data when editing
a dive with more than one buddy we display "Multiple Buddies" in the buddy
field. This creates a special case where no changes are written to the buddy field
unless the user changes buddy for that dive.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 13:46:15 -07:00
Dirk Hohndel
b8253bb707 QML UI: two columns on 1024x768 iPads
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17 12:56:47 -07:00
Dirk Hohndel
4938a7a10f iOS: Don't show "No GPS source available"
We don't support GPS on iOS right now, the message is confusing.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 08:57:09 -07:00
Joakim Bygdell
4e0200863b Remove hacks regarding multiple gasmixes and cylinders
Enabling cylinder edit in Subsurface-mobile our previous hacks
regarding multiple cylinders and gasmixes must be removed.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 07:36:43 -07:00
Joakim Bygdell
674d8331f5 QML UI: Enable cylinder edit
This adds the option to select a cylinder when adding or editing a dive.
Due to limited screen size we restrict the editing to the first cylinder only.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04 07:36:13 -07:00
Dirk Hohndel
9a41d0d8bb QML UI: set a reasonable default column width
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-16 11:23:44 -07:00
Dirk Hohndel
cf4a4dd98b QML UI: format numbers for Theme info
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-15 20:48:23 -07:00
Marco Martin
24718adfc3 Use kirigami built in static mode
Now kirigami needs to be built with a C++ plugin.
In cases of mobile operating systems such as iOS (and in a lesser measuse,
Android) having a proper plugin loaded at runtime may be difficult, so
statically link it together with all of its qml files compiled as a
qresource inside the static library.

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-14 07:56:05 -07:00