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>
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>
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>
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>
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>
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>
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>
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>
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>
Instead of passing magic values around, calculate the columnWidth as part
of the SubsurfaceTheme object.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
- Replace the custom text items with the Components' label
- Remove now unneeded properties
The goal is to use less different font sizes, as to give the listview a
calmer and more uniform look.
Signed-off-by: Sebastian Kügler <sebas@kde.org>