Commit graph

84 commits

Author SHA1 Message Date
Rick Walsh
7e4ba965d1 DiveDetailsEdit: make sure model data exists
This gets rid of TypeError messages, but does not appear to affect behaviour
qrc:///qml/DiveDetailsEdit.qml:254: TypeError: Cannot read property 'dive' of null
qrc:///qml/DiveDetailsEdit.qml:228: TypeError: Cannot read property 'dive' of null
qrc:///qml/DiveDetailsEdit.qml:216: TypeError: Cannot read property 'dive' of null
qrc:///qml/DiveDetailsEdit.qml:204: TypeError: Cannot read property 'dive' of null

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
2017-08-07 00:51:51 -07:00
Joakim Bygdell
a9348607e7 QML UI: add more width to dive edit page
Mobile devices hare rather limited when it comes to screen size,
there is no point in reducing the availabel space more than neccecary.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-08-02 18:49:47 -07:00
Joakim Bygdell
bc7d11860f QML UI: make sure textfields loose focus
For some reason the textfields on dive edit page did not loose focus when editing ended by press on the return key.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-08-02 18:49:47 -07:00
Joakim Bygdell
97f1dc0b01 QML UI: autocomplete objects should lose focus on selection
When the user makes a selection using the autocomplete function while editing a dive the keyboard should close and the selection list should disappear.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-08-02 18:49:47 -07:00
Joakim Bygdell
9e9e06aed6 QML UI: decrease fontsize on dive edit
Decrease the fontsize of the static text on the dive edits page.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-08-02 18:49:47 -07:00
Joakim Bygdell
6a47af2d16 QML UI: enable modification of ratings
This enables editing of visibility and ratings for a dive.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-08-02 18:49:47 -07:00
Joakim Bygdell
9d7eb33a33 QML UI: display rating and visibility stars
Display rating and visibility stars on the dive details page. See #495

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-08-02 18:49:47 -07:00
Joakim Bygdell
ae33422ede QML UI: replace all checkboxes with our own
As per title, helps simplify theme modifications.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-26 01:39:26 +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
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
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
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
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
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
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
Martin Měřinský
869a7fcfcc dive master > divemaster 2017-03-04 12:08:17 -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
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
14b4c94ded Revert "QML UI: build against latest Kirigami"
This reverts commit a842e44b68.
2017-01-21 14:42:10 -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
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
Joakim Bygdell
a6c8d0028e Make autocomplete work on add dive
This sets the list models for autocompleting suit, buddy and
divemaster.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21 07:01:53 -07:00
Joakim Bygdell
6be5aba799 QML UI: hide handles for comboboxes
Hide the handles for the comboboxes, making the text input fields
look like the normal text fields.
This is left as a separate patch as there currently seems to be issues with autocomplete
on Android.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-16 11:06:24 -07:00
Joakim Bygdell
0e4e8edf78 QML UI: add comboboxes to DiveDetailsEdit
This adds autocompleting text input fields for suit, buddy and
divemaster.

[Dirk Hohndel: some whitespace cleanup]

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-16 11:05:20 -07:00
Robert C. Helling
502be2a0f1 Mark strings in qml files for translation
I did this semi-automatically: I used the script from
the previous patch and then did some manual corrections.

This marks only title: and text: tags, there might be others

Signed-off-by: Robert C. Helling <helling@atdotde.de>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03 12:59:16 -07:00
Dirk Hohndel
628f83d5cf QML UI: only show GPS service / use current location if GPS accessible
If there is no GPS source or if permission to use it was denied, don't
offer to run the GPS service or to detect the current location when
adding or editing dives.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-17 22:59:19 -07:00
Dirk Hohndel
c111c4bb02 QML UI: add elements to allow editing the GPS coordinates
This isn't hooked up, yet, but provides the UI

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-15 13:22:16 -07:00
Dirk Hohndel
829369c18a QML UI: make readonly fields more obvious in dive edit
Remove the border and make them look more like labels. This adds a
StyledTextField for that purpose. And while we are at it, we can make that
StyledTextField a little prettier.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-08 11:14:10 -07:00
Dirk Hohndel
df2e7c052b QML UI: make gas mix validator case insensitive
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-07 22:57:02 -07:00
Dirk Hohndel
0e49d6965c QML UI: fix page width calculation for dive details
Fixes #1049

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-07 11:22:44 -07:00
Dirk Hohndel
7be962bfc2 Move subsurface-core to core and qt-mobile to mobile-widgets
Having subsurface-core as a directory name really messes with
autocomplete and is obviously redundant. Simmilarly, qt-mobile caused an
autocomplete conflict and also was inconsistent with the desktop-widget
name for the directory containing the "other" UI.

And while cleaning up the resulting change in the path name for include
files, I decided to clean up those even more to make them consistent
overall.

This could have been handled in more commits, but since this requires a
make clean before the build, it seemed more sensible to do it all in one.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-04-04 22:33:58 -07:00
Renamed from qt-mobile/qml/DiveDetailsEdit.qml (Browse further)