Commit graph

65 commits

Author SHA1 Message Date
Dirk Hohndel
a873711cec QML UI: make sure the drawer is closed after going back to dive list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03 15:12:09 -08:00
Marco Martin
d24e5b455f use the global showPassiveNotification function
don't create a local PassiveNotification copy,
use the global show/hidePassiveNotification from
ApplicationWindow, now that it works

Signed-off-by: Marco Martin <notmart@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03 10:44:41 -08:00
Dirk Hohndel
93f9bcd041 QML UI: remove incorrect statement
Not sure what this was even supposed to do...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03 06:35:25 -08:00
Dirk Hohndel
6ac4fe7b18 QML UI: show notification for saving dives to cloud as well
Fixes #1014

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-03 06:33:00 -08:00
Dirk Hohndel
7133216653 QML UI: show notification when cloud is accessed
And hide the notification either after 5 seconds or once we are done.

This requires an extension to the Kirigami components that isn't upstream,
yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-03-02 17:14:47 -08:00
Dirk Hohndel
55eb4160da Fix incorrect reference to endEditMode()
Not sure how that slipped through the cracks.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13 21:53:01 -08:00
Joakim Bygdell
ae116c5bc8 QML UI: enable edit of gasmix
First cylinder only, show warning if there are more than one cylinder defined.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-13 10:04:05 -08:00
Dirk Hohndel
36b089dc8c QML UI: close all other pages when switching cloud credentials
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10 21:47:09 -08:00
Dirk Hohndel
06628e03c5 QML UI: disable some menu entries without valid credentials
This requires a patch to the mobile components that isn't upstream, yet.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10 21:08:44 -08:00
Dirk Hohndel
38f7fd6fbe QML UI: allow changing credentials
With the integration of the credentials into the start page the logic for
this has changed.
Since the code for start page and dive list is actually on the same page,
using opacity to switch between the two sub pages (depending on whether we
have valid credentials and dives to show), the old way of changing
credentials no longer worked.
With theis patch the user once again can change their credentials (and
change their mind and go back to the dive list).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10 21:05:23 -08:00
Dirk Hohndel
82a982b903 QML UI: redo the start page
It now explains the relationship between Subsurface-mobile and the desktop
application and allows the user to enter the cloud credentials right
there.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10 20:57:11 -08:00
Miika Turkia
c41bdcfbe3 Adding about page to Subsurface-mobile
This isn't pretty, but having the version string available on a place
that people are likely to find does make sense when going public with
the Subsurface-mobile. Especially when we do a public release, I assume
the developer menu with App log might not be readily available for
people to identify their installed version.

Signed-off-by: Miika Turkia <miika.turkia@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10 15:16:12 -08:00
Joakim Bygdell
8c9883cfcf QML UI: enable edit of cylinder pressures
First cylinder only, show warning if there are more than one cylinder defined.

Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-09 12:11:09 -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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
7a94360a6d QML-UI: Split cloud credentials and other preferences
This makes the cloud credential entry page much simpler, separate page. It also
removes the two colums and uses the label of the check box instead of having a
separate label item.

The preferences page of course also gets simpler by doing this. Here I kept the
two columns, though.

Finally the code for the old context menu was removed - not sure why this was
still here.

Next I need to fix the savePreferences() call to do the right thing in each
case.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-03 14:11:30 -08:00
Dirk Hohndel
f6ae8bf3ea QML UI: don't load dives before the UI has been instantiated
This should deal with a big part of the delay when starting the app.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30 10:15:04 -08:00
Sebastian Kügler
5f40ac6da3 Style the checkbox
Using a normal checkbox, we get black text, not our styled Label. Since,
short of doing a style, this is the only way to get the label the right
color, and thus not screw up the visual appearance of the drawer, we
hand-roll it.

This is a bit clunky, but I prefer visual continuity here over code
complexity concerns.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30 02:43:40 +01:00
Sebastian Kügler
c5722773d2 Easy access to enable/disable location service
Add a checkbox in the global drawer which allows quick access enabling
and disabling the location service. This is something the user wants to
keep an eye on, quickly enable it before a trip, so it makes sense to
give it some prominence. It also helps reminding that the user switched
the device into battery-monster-mode.

Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-30 02:43:40 +01:00
Marco Martin
13f78743c6 Divelist has its own color
don't reassign DiveList color upon declaration
it's just redundant and error prone

Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-30 00:04:10 +01:00