Commit graph

316 commits

Author SHA1 Message Date
Dirk Hohndel
0f6b8a8f6f QML UI: DiveDetailsView - calculate better width and set everywhere
Even setting things up in the first row isn't enough. Every field in the
grid needs an explicit width. How dumb is that.

To make this more manageable calculate the correct widths at the beginning
and then just reference those properties.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08 13:25:29 -08:00
Dirk Hohndel
3e46361518 QML UI: DiveDetailsView - set fixed column widths
In order for wrapping to work, the Text and TextEdit elements need to have
a defined width. Normally the GridLayout is supposed to be able to figure
out optimal widths for the different colums if you tell it which ones
should stretch, but that has repeatedly caused infinite loops and crashes
in the layout engine.

For now, in order to get both wrapping (and therefore no clipping of the
content) and avoid crashes, we hard code the width of the four columns by
setting Layout.maxWidth for each element in the first row of the grid.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08 12:44:01 -08:00
Dirk Hohndel
c6a844fbad QML UI: DiveDetailsView - reorder the grid
Let's put the three likely rather narrow items above each other in the
right column and the others (especially the three that could run long:
suit, buddy, dive master) in the left one.

Also, make the individual entries more consistent in which attributes are
set in which order - easier to read.

Finally, make sure that all grid elements enable wrapping.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08 12:43:28 -08:00
Dirk Hohndel
d43a2c032b QML UI: correctly handle back key on edits
This requires mobile components that include commit 03c868fc57e5 from
earlier today. With this a single press on the back key cancels the edit
and a second press on the back key brings you up one level in the page
stack (usually back to the dive list).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08 08:41:42 -08:00
Miika Turkia
d97ae62c75 Move preferences under GPS menu
Since we currently only have preferences that affect the GPS
functionality, it might be more logical to have the preferences under
GPS menu.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08 08:00:27 -08:00
Henrik Brautaset Aronsen
8eb019456d Avoid QtCreator warning about ==
Warning M126: == and != may perform type coercion, use === or !== to avoid it

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07 13:57:02 -08:00
Henrik Brautaset Aronsen
47403588e5 Move endEditMode() to DiveDetails.qml
Having endEditMode() in main.qml seemed wrong somehow.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07 13:56:46 -08:00
Henrik Brautaset Aronsen
d976310094 Add top-right edit and back buttons for mobile
Adds a back button in edit mode, and an edit button for view mode.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07 13:56:07 -08:00
Dirk Hohndel
e174389618 QML UI: another attempt to fix the random crashes
I finally was able to reproduce the crashes with the infinite recursion when
computing a GridLayout.

This seems to be triggered by competing Layout.fillWidth settings that the
layout engine couldn't figure out how to accomodate.

I did three things to make this work better:

- explicitly grab the columnWidth for the width of the DiveDetailsView.
- split the GridLayout in two so the area above and below the profile are no
  longer forced to fit in the same column widths.
- remove most of the Layout.fillWidth settings and only leave a couple that
  seem sufficient to get reasonable on screen layout in my experiments.

Here's hoping that this one is finally resolved.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07 12:45:36 -08:00
Dirk Hohndel
d8d9301e8e QML UI: disable download from divecomputer button on start page
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07 10:09:06 -08:00
Dirk Hohndel
ad72d437a3 Revert "QML UI: end edit mode when leaving the edit page"
This reverts commit d2928a137c.

The presence of this Action causes crashes for one of the testers. Which
is utterly ridiculous.
2016-02-07 07:32:08 -08:00
Dirk Hohndel
d2928a137c QML UI: end edit mode when leaving the edit page
This should fix the problem when using the back key to exit the edit page.
Requires a patch to the mobile components that isn't upstream, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-06 12:08:16 -08:00
Dirk Hohndel
a4ec520601 QML UI: enable editing of weight
But only if there is only one weight system defined in the dive. Otherwise
display a read only text that explains that this cannot be edited.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-05 22:54:47 -08:00
Dirk Hohndel
7f70802b90 QML UI: explicitly hide the keyboard when exiting dive edit
If you save or cancel the dive edit, the keyboard should be closed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-05 10:49:43 -08:00
Dirk Hohndel
48695cda7c QML UI: disable download from divecomputer
This is not hooked up, yet, and would likely only confuse potential
testers.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-05 09:22:54 -08:00
Willem Ferguson
545b106d5c Mobile. Modify DownloadFromDiveComputer.qml
1) Create space for sillybutton at bottom of screen
        2) Reformat columns in tableview
        3) General cleanup and simplification of code.

Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-03 10:50:00 -08:00
Rick Walsh
fdd5ee507c QML UI: Another attempt to shift dive number to top row
Commit 1030cb265a 'QML UI DiveDetailsView: shift
dive number to right of top row' was reverted because it caused mysterious
crashes for some testers, inferred to be related to sizing items in a
gridLayout.

This patch brings the dive number back up to the right of the top row, so the
page width doesn't exceed the screen width. Using text wrapping should prevent
the date text and dive number items from increasing in width, and hopefully
avoids the mysterious crashes.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-01 17:52:20 -08:00
Dirk Hohndel
cba50ece33 Revert "QML UI DiveDetailsView: shift dive number to right of top row"
This reverts commit 1030cb265a.

Simply trying to find out if this is the cause for the odd crashes one
tester is seeing.
2016-01-31 11:27:13 -08:00
Dirk Hohndel
a1aa83fcfd Minor cleanups
Improve readability of the code.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29 10:17:22 -08:00
Dirk Hohndel
0eae59bcd2 QML UI: introduce "add" state and correctly clean up when canceled
Adding a dive is just like editing it, except that canceling the operation
has different consequences. Instead of trying to figure this out by some
inference on other state, let's just make it explicit and then clean up
after ourselves if the user canceled a manual dive add.

This also switches to use the properties that we defined in order for the
main menu to be able to setup these values. Makes the code easier to read
and is more consistent.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29 07:50:45 -08:00
Dirk Hohndel
957f03f2a4 QML UI: remove apparently obsolete code
I couldn't make sense of either the code nor the comment, so I tried what
broke when I removed it. Nothing that I could find. So maybe we don't need
this after all?

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29 07:40:12 -08:00
Dirk Hohndel
ba4bb56701 QML UI: better way to determine dive details edit width
Instead of passing magic values around, calculate the columnWidth as part
of the SubsurfaceTheme object.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28 22:49:46 -08:00
Dirk Hohndel
ff2f6d4082 QML UI: once again hide "--" as section header
The fix for correctly showing multiple trips with the same location text
inadvertantly broke the detection of empty location text.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28 21:58:27 -08:00
Dirk Hohndel
6dd3e4c30e QML UI: use the new helper to ensure the right dive is selected after edit
There are two cases where this is important
- when running Manually add dive which may add a dive in the middle of the
  dive list
- when editing the date and time of a dive which may move it around in the
  dive list

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28 18:33:22 -08:00
Dirk Hohndel
dbe9bad0aa QML UI: add the properties needed to be able to manually add dive
This way the trigger from the main drawer works again.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28 18:33:22 -08:00
Dirk Hohndel
034ffa229b QML UI: add field to edit the total weight
This isn't hooked up to anything, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28 18:33:22 -08:00
Dirk Hohndel
bac39b5482 Better id for yet another QML item
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28 18:33:22 -08:00
Dirk Hohndel
c52769a90f QML UI: use unique names for the different ListViews
Having both the dive list (the vertical list) and the sequence of dive
details (the horizontally swipe-able list) named the same caused me
endless confusion.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28 18:20:15 -08:00
Dirk Hohndel
8813f13bfd QML UI: end edit mode when switching to different page
Fixes #997

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27 19:05:13 -08:00
Joakim Bygdell
9342dedb26 Move helper function to DiveObjectsHelper
As per Tomaz recomendation the helper functions from 19588ce and e072596
are moved from qmlmanager to DiveObjectsHelper.

[Dirk Hohndel: merged with the latest code]

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27 11:18:44 -08:00
Dirk Hohndel
140624918c QML UI: revert dive detail view layout changes
Now the layout flows again and shouldn't cause clipping on the right
(unless the user has excessively long, unbreakable words it seems.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27 10:16:25 -08:00
Dirk Hohndel
35e60a7355 QML UI: don't combine multiple trips to the same location into one
The way sectioning of the dive list works is by watching for different strings
in the section.property. In order to be able to tell different trips apart we
combine the address of the dive trip variable with the location (which will
create a new section for a new trip, even if the location text is the same) and
then strip that information out before showing the trip header.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26 20:06:30 -08:00
Tomaz Canabrava
7a682770ef Round placement sizes of TopBar.qml
I was having really ugly fonts here and I actually blamed
QML for that (while I still think it is it's fault), but we
where using pixel fractions. So every time we may hit a pixel
fraction, round that.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26 09:51:50 -08:00
Joakim Bygdell
e0725966b1 QML UI: Add helper function to get weights
Helper function that retrieved the total weight for a dive to be displayed
on the DiveDetials page.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25 11:14:33 -08:00
Joakim Bygdell
19588ce139 QML UI: Add helper function to get cylinder info
Helper function that retrieves the cylinder description to be displayed in the
DiveDetails. Only the first cylinder for a dive is retrieved.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25 11:14:30 -08:00
Joakim Bygdell
1c3a1433e4 QML-UI: Rearrange the DiveDetails page
After adding "Cylinder" to the DiveDetails page the objects had to be rearranged
in order to better utilise the space.
To get a cleaner look on smaller screens the left side is left aligned and the
right side is right aligend.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25 11:14:28 -08:00
Willem Ferguson
37d841966f MOBILE: update downloadFromDiveComputer table
Patch #2 that formats the table to be used for downloaded dives.

Signed-off-by: Willem Ferguson <willem@localhost.localdomain>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25 07:10:37 -08:00
Willem Ferguson
9bc7ef7567 Layout proposal for download from dove computer screen
This is a proposal for the layout of this page and which may be
useful during further development of the download code.

Signed-off-by: Willem Ferguson <willem@localhost.localdomain>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25 07:10:08 -08:00
Henrik Brautaset Aronsen
bf2db7f673 Move dive list menu entry to top
I guess the Dive list item will be accessed more often
than the preferences item, so put it to to.  Also remove
the "back to" prefix.

Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25 07:08:55 -08:00
Jan Mulder
3a33deeace QML-UI: Do not show strange double dashes for trips in Divelist
This is a multi-part message in MIME format.
After fixing the regression (commit 9e9d220c98) strange double dashes
appeared in the Divelist headers for trips. Just suppress it.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-24 21:32:17 -08:00
Miika Turkia
be303c0b5b Return to divelist even from "further away"
If one browses the application more than one step (e.g. details, gps fix
list and preferences), we need to pop the stack a bit more to get back
to the dive list. This will clear the whole stackView as I saw no harm
in discarding the history when one jumps back to the dive list.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-24 21:28:58 -08:00
Miika Turkia
9eea5a4294 Show map from the list of GPS fixes
Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-24 21:27:24 -08:00
Dirk Hohndel
6a4fbecea5 QML UI: remove no longer needed debug output
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-22 10:19:46 -08:00
Jan Mulder
040ef3a8f2 QML-UI. Improved button style
Pressing of buttons were difficult to see mainly due to small buttons
and small color distance between pressed and un-pressed state. This fix
enlarges the buttons a little, and choses a different color for
the pressed state.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-22 06:47:06 -08:00
Jan Mulder
996367ac97 QML-UI. Add Back to Divelist menu item
As asked for on the mailinglisrt, a menu item is added to return
to the Divelist the easy way. In addition to the standard Android
back button.

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-22 06:44:07 -08:00
Dirk Hohndel
260cd14a2b QML UI: maximize horizontal size of notes when editing
This seems a bit brute force but I couldn't get the width to propagate
correctly any other way.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-21 13:09:10 -08:00
Dirk Hohndel
9e9d220c98 QML UI: show dive trip again
This once again displays trips in the dive list and makes the visual a bit more
spaceous.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-21 12:42:16 -08:00
Dirk Hohndel
eef5bf75c3 QML UI: fix map display regression
In commit 6540e95425 ("dive details navigation") the change to access the gps
variable was only partially implemented.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-21 12:23:07 -08:00
Dirk Hohndel
f84e823879 QML UI: switch edit back to not being a drawer
With this edit seems to work again. The edit page can be scrolled around on
smaller screens to allow editing every part of it and to allow the user to
press the "save" button.

This is mainly intended to make sure testing can continue - it's unclear if
this will be the final design.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20 14:07:06 -08:00
Dirk Hohndel
3116bc06fb QML UI: show date and time for dive
We keep losing the time when people move code around. date really is just the
date and doesn't include the time component.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20 14:06:05 -08:00
Rick Walsh
85c57c005f QML preferences: use Layout.preferredHeight within GridLayout
It's not recommended to set the height explicitly of an item in a layout. Use
Layout.preferredHeight instead

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20 07:54:24 -08:00
Rick Walsh
471270437b QML UI: make all buttons more attractive
Commit f3f7930 introduced a more attractive button style to the start page.
This patch turns it into its own type so it can easily be used everywhere.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20 07:53:49 -08:00
Dirk Hohndel
f3f79309d3 QML UI: make the buttons on the start page more attractive
Those plain rectangular buttons were just too ugly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-19 22:32:37 -08:00
Rick Walsh
15a014105b QML UI: Don't explicitly set width of GridLayout items
It is not recommended to set the width explicitly of items in a layout. This
caused some issues in DiveDetailsView, which were fixed by commit 1030cb2.
See http://doc.qt.io/qt-5/qml-qtquick-layouts-layout.html#details

Set 'Layout.preferredWidth' instead of 'width' for GpsList and Preferences

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-19 13:06:31 -08:00
Dirk Hohndel
88101e4dd3 QML UI: don't shorten the buttons
I want a prettier visual for those, anyway, but artificially making them
shorter than that text they display seems silly - and causes the text to be
trunkated for no good reason on some devices.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-19 12:53:32 -08:00
Dirk Hohndel
04e994b575 Subsurface-mobile on Android: change the splash screen methodology
This is based on post by Ben Laud
https://medium.com/@benlaud/complete-guide-to-make-a-splash-screen-for-your-qml-android-application-567ca3bc70af

It creates a theme that uses a splash drawable that Android will show
immediately when the application is launched. And then starts the QML
application with visibility set to false adn only makes it visible (and replace
the splash screen) once initialization is finished.

We still get a little flicker with the switch from splash to start page to dive
list, but over all the experience is hugely improved. And the bug that the
splash screen stays around when starting Subsurface-mobile in landscape also
appears to be fixed.

Fixes #994

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-19 12:42:58 -08:00
Sebastian Kügler
e9e843dc3c Close edit drawer when current dive changes
This prevents having the edit drawer opened at a different than the
current dive.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-19 18:41:51 +01:00
Rick Walsh
1030cb265a QML UI DiveDetailsView: shift dive number to right of top row
In dive details view, shifting the dive number to the right of the top row
means it won't be cut short if the dive duration is 1 hr or longer

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-19 07:16:49 -08:00
Sebastian Kügler
53024ca76d try to fix profile scaling
Different approach here:

- profile gets a bit higher, this was requested on the mailinglist, and
  seems to behave much better with the painted profile, we'd otherwise
  get it magically clipped on the right hand side.
- Make the scaling dpi aware, this fixes scaling for me on the Nexus7, I
  haven't been able to test it properly on other devices, so this needs
  some more testing. The result is visually quite close to what we can
  do, although I'm still getting a somewhat larger margin on the right.
  To get at the devicePixelRatio without too much custom code, I've
  added a property to the QMLProfile to retrieve it from the theme engine.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-13 16:27:41 -08:00
Sebastian Kügler
8199c13f42 fix misrendered profiles when fast-flicking
- Apparently, QMLProfile doesn't like being painted without being
  visible, when flicking quickly through the dives I would get empty
  rendered profiles. Setting the cachebuffer to zero fixes it, and saves
  some memory.
  It still has some unfortunate timing, the profile gets rendered
  mid-flick, which leads to a delay in the flicking motion, quite
  annoying. We will have to somehow make sure that new profiles are
  rendered after flicking, not during
- Smallish cleanups

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-13 03:08:34 +01:00
Sebastian Kügler
9fc19039df Better behavior for dive details flicking
- stop at bounds, this is in line with other flickables. I really
  don't like Flickables floppy default behavior to allow dragging and
  scrolling over the bounds.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-12 07:10:52 -08:00
Sebastian Kügler
142c8b218b Fix bugs in edit drawer
- As the list may get reset on save, the dive_id effectively changes
  since currentItem isn't updated. So after editing, we end up with a
  different currentItem than visible. This is very unintuitive, but
  has to do with the model resetting. It would result in the edit view not
  showing the current dive when opened the second time. Let's make sure
  that out currentItem is always the visible one before we're filling
  the data into the edit page.
- Close the drawer when we're navigating away from the dive item, for
  example when hitting the back button.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-12 03:06:09 +01:00
Sebastian Kügler
ae0f680c6e Kill warning
Apparently parent.height is negative sometimes.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-12 03:06:09 +01:00
Sebastian Kügler
6540e95425 dive details navigation
This patch reworks the navigation of the dive details.

- The detailsview is now a list view with page-sized delegates. This
  allows horizontal swiping to the next and previous dive.
- The central button now allows to open the edit mode for the dive.

Original patch was done by Marco Martin, but needed to be reapplied by
hand.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-12 03:06:09 +01:00
Dirk Hohndel
56b3ecb3f6 QML UI: show dive time again
In commit 25aa80846b ("Move Dive class from qthelper.h/cpp to it's own file")
the meaning of getting the "date" of a dive was changed to just be the date and
not the date and time. That's not what the QML code expected.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10 22:07:31 -08:00
Jan Mulder
aa6aa416bf show dive.number instead of double location
Small error was introduced in commit 25aa80846b. The dive.location was
shown in the DiveList instead of the intended dive.number

Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-10 14:09:31 -08:00
Dirk Hohndel
b1f90b6aa0 QML UI: partial, slow and incomplete implementation of delete GPS fix
This only deletes the fix on the mobile device, not on the server.
And it is really really slow. Re-reading the data from the settings just isn't
a smart way to do this.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08 23:18:41 -08:00
Dirk Hohndel
038cfcba91 QML UI: add second action to GPS list entries
This one will allow people to see the location on a map. Also not implemented,
yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08 23:17:48 -08:00
Dirk Hohndel
f61b83301a QML UI: better icon for delete
The cancel picture was odd - the trash can is much more typical.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08 23:16:19 -08:00
Dirk Hohndel
249a2c2c09 Gps list: include the time_t timestamp in the model
Just having the string means we lost the unique value that we can use as key to
indentify a specific GPS fix.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08 23:13:30 -08:00
Dirk Hohndel
b34a507d51 QML UI: support sliding action to allow the user to delete GPS fixes
This is just the UI, the actual deletion is not yet implemented.

I really like this interaction with the list items. Slide them to the left and
you see icons for actions. Right now we have just one and that may seem like
overkill (hey, we could just have the delete icon instead of the application
menu icon, right?) but once we allow the ability to show the GPS location on a
map we'll have two operations and this will make more sense.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08 21:48:53 -08:00
Tomaz Canabrava
25aa80846b Move Dive class from qthelper.h/cpp to it's own file
and rename it to DiveObjectHelper, since it should be an QObject
based class to make it easier on the QML, grantlee and widgets
side to display the dive's internal data.

each Q_PROPERTY defined in the DiveObjectHelper.h file
can be acessed directly via it's name.

So, if you are on a model that  returns a dive, acess it's name
by dive.name

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-08 08:04:44 -08:00
Dirk Hohndel
624e44e73d QML UI: clean up notes field after edit
We don't want any of the rich text markup to sneak into our fields.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07 22:30:58 -08:00
Dirk Hohndel
a0d3480bbe QML UI: fix manual add dive
This had been broken by mistake in commit e5f95daee8 ("QML UI: reimplement
context menu for dive details").

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07 22:29:50 -08:00
Dirk Hohndel
b6ae6979e5 QML UI: show the available GPS fixes
So far the user can't interact with these. We should implement an ability to
visualize the GPS fix and to delete it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07 21:41:52 -08:00
Dirk Hohndel
2b1ffb3cc4 QML UI: trigger download of GPS fixes
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07 21:41:52 -08:00
Dirk Hohndel
bb687f7f8b Remove plasma mobile components, pull from upstream at build time
This prevents us from constantly having to worry about keeping them in sync.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-07 10:22:20 -08:00
Dirk Hohndel
9c0cb6cfef QML UI: edit notes in rich text mode
This way we don't show <br> for line breaks.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-06 23:03:07 -08:00
Dirk Hohndel
e5f95daee8 QML UI: reimplement context menu for dive details
With the mobile components fixed we can now simply switch between different
menu content - no need to play games and redefine the actions on the fly. This
also adds a cancel button for editing and cleans up when the user hits cancel.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-06 18:21:09 -08:00
Sebastian Kügler
cff0a703e8 sync with mobilecomponents 462b2b4
- Fixes blank pages when keyboard shows up, the margin computation was
  wrong, and apparently we get bogus info about the keyboard geometry.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-07 01:36:15 +01:00
Sebastian Kügler
95bca4b50c sync with mobilecomponents 9d179eb74a227
- Workaround for black squares is merged upstream
- brings back the FAB button, additional
- swipe interaction improvements in the same

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-07 00:39:33 +01:00
Dirk Hohndel
e20005ed36 QML UI: when manually adding a dive clear out all the fields
Otherwise the data from the last dive dispayed (or added) will be shown.

Fixes #983

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-05 23:06:46 -08:00
Dirk Hohndel
e774c8077b QML UI: allow edit of dive date and time
This is a bit more complicated because we are asking the user to edit the text
field instead of giving them a date and time picker. This is not a great
choice, but let's run with it for now.

One downside is that the user is likely going to edit the date "Oct 29" -> "Oct
25" without adjusting the day of the week. And if we then try to parse that Qt
correctly complains about an invalid date. So we hack around this by removing
the day of the week from both the format and the date entered (which of course
now will break things if the user did, in fact, adjust the day of the week). As
I said, not a great solution.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-05 22:53:32 -08:00
Dirk Hohndel
415536aba9 QML UI: in dive details edit, put date on its own line
This way we can support a simple way for the user to edit the date.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-05 22:50:31 -08:00
Dirk Hohndel
e401e725cc Add BasicListItem.qml from plasma-mobile
Sebastian forgot to add this file - so I grabbed the latest version from
today, hoping this is the right one.

This is from a85365111 which is the sha he referenced in his patch.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-05 21:26:20 -08:00
Sebastian Kügler
5d9881b8e1 adjustments needed for latest mobilecomponents
- flickable is gone, Page now just takes the children items, meaning we
  can remove this assignment
- BasicListItem is factored out, and we now need it in our qrc

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-06 04:44:26 +01:00
Sebastian Kügler
548d6fc956 sync with mobilecomponents a85365111 + patches
This is the latest state of the upstream art from Plasma, plus our
patches to disable the gamma effect on the icon, and the drawer removed.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-06 04:41:41 +01:00
Sebastian Kügler
8664925e20 Allow faster scrolling in the dive list
This increases the rather conservative value for the maximum velocity of
the divelist to scroll at max 5 screens per second, meaning it's about 4
times faster. I've picked this value after a bit of testing, it can
surely be tweaked, but feels nicer already.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2016-01-06 03:50:10 +01:00
Dirk Hohndel
a015e5f4cb QML UI: make top bar elements bigger for easier use
Otherwise hitting those menu buttons is HARD.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-04 21:38:44 -08:00
Dirk Hohndel
72ce77a5ee QML UI: hide action button
So far this just comments out the code that enables the action button. Let's
see feedback from the testers.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-04 13:15:33 -08:00
Dirk Hohndel
c53aa7dbfb QML UI: add context menu button
Right now this is an alternative to the magic action button - but the goal is
to replace it completely.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-04 13:02:46 -08:00
Dirk Hohndel
7cc851ebad QML UI: add main menu button
Right now this is an alternative to the magic action button - but the goal is
to replace it completely.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-04 13:02:46 -08:00
Dirk Hohndel
fa338a26b8 QML UI: add feature to add current position when editing dive
This isn't quite perfect yet. If it takes too long to get the GPS fix (i.e., if
you save it before you get the fix), this will simply fail and not store a
position. But in normal conditions (you check the box, you edit the data, you
save), especially when outside on a dive boat, this should work fine.

For the other cases we need to implement some kind of callback to still collect
the data.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01 17:26:26 -08:00
Dirk Hohndel
87fc84a5ee QML UI: allow the user to close the Log
Same context menu idea. The reason for adding this is that the context menu
always acts on the last page in the stack (so I guess the "right-most-one"). So
if you edit a dive and then open the log, you can't save the dive until the
dive edit is the last page which means you have to close the log, first. Not
ideal, but better than nothing and it works well enough. I still think we might
want to go back to a traditional "Save" button...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01 16:34:12 -08:00
Dirk Hohndel
fd23a4891c QML UI: consistency in naming
Let's try to call it Subsurface-mobile everywhere.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01 09:34:32 -08:00
Dirk Hohndel
37c74b5c2f QML UI: update context menu text
The automagic update gets disabled once we overwrite the text with "Save" at
some point, so instead we appear to have to do this manually.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01 09:31:51 -08:00
Dirk Hohndel
a0aa27e864 QML UI: handle editing of depth
Getting closer to being able to really edit / add dives in the mobile UI.
This works for manually added dives - needs a bit more thought for dives
downloaded from dive computers as we don't necessarily want to change the
maxdepth in conflict with the samples.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01 00:55:34 -08:00
Dirk Hohndel
2c28b16b26 QML UI: handle editing of duration
I don't think these regular expressions are sufficiently exhaustive - but this
is forward progress.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-01 00:55:25 -08:00
Dirk Hohndel
7f628404e6 QML UI: refresh UI after editing / adding a dive
This way the properties of the shown list element are updated based on what was
edited. This feels weird and backwards - but it appears to be the way to do
this - you literally update the elemnts in this specific instance of that QML
page.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-31 18:16:47 -08:00
Dirk Hohndel
b84308bcfb QML UI: we don't need those semicolons
The code is rather inconsistent when it comes to the use of semicolons in the
JS code. Let's try to not have them...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-31 18:16:47 -08:00
Rick Walsh
2cce4ec3a4 Mobile CloudCredentials: hide password on entry
Don't use EmailCharactersOnly input method hint for the password. This fixes
the problem of password being displayed on entry, at least on my device.

Signed-off-by: Rick Walsh <rickmwalsh@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-30 07:25:31 -08:00
Dirk Hohndel
ef653b41f5 QML UI: obtain a reasonable margin from QML
This will be used later in the positioning of the profile.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-29 09:50:47 -08:00
Dirk Hohndel
fcc615a497 QML UI: try to remove two binding loops
Let's face it. I have no idea what I'm doing here.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 12:28:08 -08:00
Dirk Hohndel
81999e4667 QML UI: add debug output for echoMode
For some users by default the password characters aren't hidden. Maybe the
debugging output will help us understand what's going on.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 12:20:36 -08:00
Dirk Hohndel
97c23d6ee5 QML UI: cloud credential input: use text input hints
We shouldn't auto-capitalize and the text should only be email address
characters.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27 12:19:51 -08:00
Dirk Hohndel
99a5a743c4 QML UI: change the way we extract input data from dive edit
Instead of doing the silly "onEditingFinished" we get the strings from the QML
components at the time we commit the change. Much more logical, much more
straight forward, no issues with the TextArea not having an onEditingFinished
signal.

This still has a few open todos: the temperatures aren't parsed, the edit
screen is missing depth and duration, we can't edit the dive time (and it isn't
passed in on the commit). But it's progress.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 22:57:47 -08:00
Dirk Hohndel
9be42fff81 QML UI: correct text for context drawer when adding dive
This needs to say "Save" to indicate that you are saving the data that was
entered.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 21:56:45 -08:00
Dirk Hohndel
0962b504ce QML UI: get add dive closer to being useful
Now we at least start out with the corret date, time and number. This still
isn't functional as a lot of the data aren't used and the way you save the data
is completely silly, but it's another step in the right direction.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 21:37:18 -08:00
Dirk Hohndel
763986b683 QML UI: when adding a dive, start in edit mode
Obviously we don't want to "view" a new dive, we want to "edit" it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 17:06:52 -08:00
Dirk Hohndel
9db615a004 QML UI: show app name in the top bar as Subsurface mobile
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:47:23 -08:00
Dirk Hohndel
6b10c45b2f QML UI: mark locations with GPS data
In the dive detail view, if a location has an associated GPS location, show the
name of the location underlined so the user knows that tapping on it will open
a browser window with a map picture.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:33:11 -08:00
Dirk Hohndel
bf239e7c42 QML-UI: add hacky, useless way to show the GPS location of a dive
This is of course stupid and NOT what we want to do, but one could argue it's
better than nothing (well, not sure, whatever). If we have a GPS location
associated with a dive and you tap on the location name when showing the dive
details, it opens a static image of a satellite map with a marker for the dive
site.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26 13:33:11 -08:00
Dirk Hohndel
8e299727df QML-UI: fix black squares on some Android devices
It appears that one some Android devices there is an interaction between
Qt and the GL implementation that results in black squares instead of
icons being shown on the screen.

Disabling the GammaAdjust avoids running the shader and fixes this
problem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-24 17:57:40 -08:00
Dirk Hohndel
c3ebeadb34 QML-UI: allow toggling verbose mode from the UI
Hidden in the Developer menu.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-19 18:41:50 -08:00
Dirk Hohndel
a26eda9700 QML UI: show better message about dive list at start
Now the message should make more sense. First it tells you that it's looking
for dives. Then you get some progress during the git download, and error
messages if things failed.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-15 13:33:53 -08:00
Dirk Hohndel
8baae6a3b6 QML-UI: make dive edit almost sort of work
So this has a lot of caveats:
- right now it only works for buddy, divemaster and suit
- you have to actually exit the field with your cursor or the change
  doesn't take - that's ridiculous, there must be a far more clever way to
  do this
- because I use the onEditingFinished handler I can't do this for the
  Notes (so here's another reason why I KNOW that this is the wrong way to
  do this)
But it shows in principle how this could be done and once someone who
actually knows what they are doing gets their hands on the code I'm
optimistic that this can be morphed into something much more useful.

It does tie together the changes made in the previous commits so that both
clicking around on the dive list gives the expected results and synching
the data back to the cloud actually works.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07 22:24:56 -08:00
Sebastian Kügler
3987eb57fb Page margins for app log
Adds consistent page margins also to Log page.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:56:45 +01:00
Sebastian Kügler
44fd9bff67 sync with mobilecomponents f4d5d19fc
- Kills a warning in ContextDrawer.
- Improves sizing of menu icons.
- Fixes icon rendering in menues.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
946cc5fec2 fix vertical alignment in divelist
left and right of the items and the headings are now synced and
consistent with other pages.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
6b3df6597b delete CloudStorage.qml
File is unused, apparently a left-over from a rename. It's not included
in the qrc and referenced nowhere, so it's safe to delete.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
339ff4f259 Fix page margins in preferences and cloudcredentials
- page margins are gridUnit / 2, consistent with other pages
- Simplify layout: we don't need to nest that much here, saves two
  objects and simplifies code a bit

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
531eace0c3 divelist polish
- fix page margins (gridUnit / 2)
- trip heading marker now stretches over the full length

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
36e3c5485e implement new menu structure
This patch creates the following menu structure in the application menu
as discussed on irc:

Cloud credentials
Preferences
Manage dives
	Download from computer
	Add dive manually
	Refresh dives
	Upload to cloud
GPS
	Add GPS tags to dives
	Upload GPS data
	Clear GPS cache
Advanced (hidden by default)
	App log
	Theme Information

"Save" moves out of the context menu, since it's a global thing (syncs
to server).

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 04:55:56 +01:00
Sebastian Kügler
bfcc4aaf05 Fix page margins of start page
Consistent with other pages: half a gridUnit around the content.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 02:08:37 +01:00
Sebastian Kügler
8bd59ebf4b theme test improvements
- fix page magins
- add headings
- add screen dimensions in gridUnits

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 02:07:31 +01:00
Sebastian Kügler
fdd15d5d7a increase horizontal spacing at the edges
Spacing around pages is half a grid unit, as consistent with (some of
the) other pages. For the dive list, it's slightly more complicated:

We want the list items to reach the edges on both side as to increase
the interactive area. We have to apply the spacing left and right inside
the listitems. This patch does that.

Another consistency fix with other pages is that we're now adding a
header at the top of the dive list, which scrolles with the list view.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 01:10:56 +01:00
Dirk Hohndel
1f41d933c0 Merge branch 'divedetailssplit' of github.com:sebasje/subsurface 2015-12-07 15:14:48 -08:00
Sebastian Kügler
5efb145cb6 Fix text wrapping in log viewer
Apparently, the width setting got lost in the previous change. This sets
the width of the log text explicitely to the grandparent's width. It
fixes text clipping in the log window.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-08 00:11:32 +01:00
Dirk Hohndel
3d7475b964 QML-UI: add dive date to the detail view
That one really bugged me...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-07 14:59:52 -08:00
Sebastian Kügler
0a22b340e9 simplify and style log page
- less instantiated objects inside each other
- add page heading
- allow wrapping of text

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 23:28:57 +01:00
Sebastian Kügler
96470d7dbf Fix styling in Preferences page
- styled labels from MobileComponents
- secondary header becomes smaller

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
25e83a11e7 Fix text clipping 2015-12-07 18:46:57 +01:00
Sebastian Kügler
04b6446e72 redesign dive details view
This change cleans up the layout optimized for viewing dive details. The
top part contains brief and essential dive info (location, depth,
duration, dive no.), then the profile, then a table with more details,
and finally the notes.

The goal here is to present the dive's data more efficiently and
attractively now that the edit part is factored out.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
936c9cee1f Add more icons
Icons for document-edit, document-save and view-readermode are added
from the light breeze variant. They're usd in the dive's contextual
actions.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
de5bb98dba dive edit gets contextual actions
Option to switch between view and edit and to save the changes are now
in the context drawer. Let's see how this works out.

If it turns out to be badly discoverable (which is what I'm worried
about), this needs to be fixed at component level.
2015-12-07 18:46:57 +01:00
Sebastian Kügler
610ce4325f noise--
Kill print in DiveList's startpage.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
cb77548f9b add context drawer component to the qrc file
It's now needed in main.qml.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
49eb7d841d add a contextdrawer
This item can be dragged in from the right hand side and provides
contextual actions for a page. It will be used in the dive details edit.
If there are actions, the floating button on the bottom shows an arrow
indicating that one can drag it in from the right hand side to the left.

Also clean up a bit of a noisy print that's not needed anymore.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:57 +01:00
Sebastian Kügler
8cf4725742 split divedetails into view and edit parts
This splits the dive detail page into two modes: view and edit

- The edit part loses the profile (it's not editable anyway)

- The view part gets a new layout, friendlier for viewing

- Properties for diveNumber, duration, depth and weight are added

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:32 +01:00
Sebastian Kügler
bd7af5a511 state machine controls edit/view dive details
This is the first part of splitting the dive details into edit/view
modes.

- introduce a state machine to switch between view and edit mode

- factor out the editor into its own component

Both components are almost the same, but we can change them individually
now.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:32 +01:00
Sebastian Kügler
54da517e9d Styled heading in startpage
We have a specific component for headings now, use it for consistency's
sake.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:32 +01:00
Sebastian Kügler
b6f5f235f0 sync with mobilecomponents 9d8bf6d77d
- Fixes interactivity in context drawer.

- These are mostly cleanups that have been done pre-merge of these
components. This now is the state of master in plasma-mobile.

- makes navigation a bit more intuitive

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:32 +01:00
Sebastian Kügler
72411eee63 Fix indentation
It's a bit all over the place. This makes it consistent and aligned.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:46:32 +01:00
Sebastian Kügler
d9cfdc3b69 Better theme information page
Bit nicer layout so my eyes don't insta-bleed when checking this page.
Also add information about the size of the rootItem, that's really
useful to know what kind of constraints we're dealing with.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-12-07 18:43:25 +01:00
Dirk Hohndel
b5fcfc8867 QML-UI: a small bit of reindentation
For consistency. Still not sure what the best scheme is. QtCreator wants to be
pretty aggressive with how far things are indented. Not sure I'm in love with
that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-05 06:42:10 -08:00
Dirk Hohndel
5588268cb2 QML-UI: remove duplicate "Run location service" menu entry
We only need this once and having it at the bottom of the menu with the
indicator whether it's on or not is much nicer.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-05 06:36:16 -08:00
Dirk Hohndel
703c3de880 QML-UI: mark email entry field as such
I hoped that this would show the "email keyboard" on Android that includes the
'@' sign without having to switch layers but that didn't seem to work. I'll
leave this here, anyway, as it seems like the right thing to do since this
input field is indeed for an email address.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-05 06:27:06 -08:00
Dirk Hohndel
fd78f8dc1a QML-UI: re-architect the way we access network resources
We really need to verify that the credentials are valid before trying to access
our backend resources. Trying to do so in a clean manner caused quite a bit of
changes to how we retrieve the webservice userid and how we load the dive list
from cloud storage.

So instead of accessing the network resources directly, this adds a handler
function that first checks the validity of the credentials (by using the
rederict handler on the cloud server), and only calls the function that does
the actual work (looks up the web service userid, loads the dives) if that
succeeds.

Right now there is no good user feedback mechanism - this just gets logged on
the log page. But this is a massive improvement if there are issues with
network connectivity or if the user mistyped their credentials.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-04 19:51:35 -08:00
Dirk Hohndel
4266600254 QML-UI: use consistent capitalization
Throughout Subsurface we try to only capitalize the first word of every menu or
window text (unless there are other reasons to capitalize the word, of course).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-04 19:51:20 -08:00
Dirk Hohndel
a600253e62 QML UI: log the text shown on the log page
Sadly this doesn't work, even though it appears to be the thing to do based on
the documentation.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-04 19:50:54 -08:00