aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml/main.qml
AgeCommit message (Collapse)Author
2016-02-10QML UI: close all other pages when switching cloud credentialsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10QML UI: disable some menu entries without valid credentialsGravatar Dirk Hohndel
This requires a patch to the mobile components that isn't upstream, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-10QML UI: allow changing credentialsGravatar Dirk Hohndel
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-10QML UI: redo the start pageGravatar Dirk Hohndel
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-10Adding about page to Subsurface-mobileGravatar Miika Turkia
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-09QML UI: enable edit of cylinder pressuresGravatar Joakim Bygdell
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-08Move preferences under GPS menuGravatar Miika Turkia
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-07Move endEditMode() to DiveDetails.qmlGravatar Henrik Brautaset Aronsen
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-05QML UI: disable download from divecomputerGravatar Dirk Hohndel
This is not hooked up, yet, and would likely only confuse potential testers. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29QML UI: introduce "add" state and correctly clean up when canceledGravatar Dirk Hohndel
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-28QML UI: better way to determine dive details edit widthGravatar Dirk Hohndel
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-28Better id for yet another QML itemGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: end edit mode when switching to different pageGravatar Dirk Hohndel
Fixes #997 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25Move dive list menu entry to topGravatar Henrik Brautaset Aronsen
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-24Return to divelist even from "further away"Gravatar Miika Turkia
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-22QML-UI. Improved button styleGravatar Jan Mulder
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-22QML-UI. Add Back to Divelist menu itemGravatar Jan Mulder
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-20QML UI: make all buttons more attractiveGravatar Rick Walsh
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-19Subsurface-mobile on Android: change the splash screen methodologyGravatar Dirk Hohndel
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-12dive details navigationGravatar Sebastian Kügler
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-07QML UI: fix manual add diveGravatar Dirk Hohndel
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-07QML UI: show the available GPS fixesGravatar Dirk Hohndel
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-07QML UI: trigger download of GPS fixesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-05QML UI: when manually adding a dive clear out all the fieldsGravatar Dirk Hohndel
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-01QML UI: consistency in namingGravatar Dirk Hohndel
Let's try to call it Subsurface-mobile everywhere. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-27QML UI: try to remove two binding loopsGravatar Dirk Hohndel
Let's face it. I have no idea what I'm doing here. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-26QML UI: correct text for context drawer when adding diveGravatar Dirk Hohndel
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-26QML UI: get add dive closer to being usefulGravatar Dirk Hohndel
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-26QML UI: when adding a dive, start in edit modeGravatar Dirk Hohndel
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-19QML-UI: allow toggling verbose mode from the UIGravatar Dirk Hohndel
Hidden in the Developer menu. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-12-08implement new menu structureGravatar Sebastian Kügler
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-07add a contextdrawerGravatar Sebastian Kügler
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-07Fix indentationGravatar Sebastian Kügler
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-07Better theme information pageGravatar Sebastian Kügler
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-05QML-UI: a small bit of reindentationGravatar Dirk Hohndel
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-05QML-UI: remove duplicate "Run location service" menu entryGravatar Dirk Hohndel
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-04QML-UI: re-architect the way we access network resourcesGravatar Dirk Hohndel
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-04QML-UI: use consistent capitalizationGravatar Dirk Hohndel
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-03QML-UI: Split cloud credentials and other preferencesGravatar Dirk Hohndel
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-11-30QML UI: don't load dives before the UI has been instantiatedGravatar Dirk Hohndel
This should deal with a big part of the delay when starting the app. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2015-11-30Style the checkboxGravatar Sebastian Kügler
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-30Easy access to enable/disable location serviceGravatar Sebastian Kügler
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-30Divelist has its own colorGravatar Marco Martin
don't reassign DiveList color upon declaration it's just redundant and error prone Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-29Simplify dive list itemsGravatar Sebastian Kügler
- 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>
2015-11-29Simple DiveList as initial PageGravatar Marco Martin
Simplify the default page in main.qml: DiveList has everything needed, remove the outside layout and the message bar Signed-off-by: Marco Martin <notmart@gmail.com>
2015-11-29Port the page navigation to ApplicationWindow's oneGravatar Marco Martin
The ApplicationWindow component has an internal PageRow for the management of the application's pages, use that instead of an own StackView. Use shared components for common things in the app ListItem for the dive list Page for application pages, for correct background color and moving of the action button Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Fix reference errors caused by moving properties aroundGravatar Sebastian Kügler
This makes things like accent(Text)Color and our two custom point sizes for fonts resolve correctly again. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29new container for extended theme propertiesGravatar Sebastian Kügler
Move the properties we previously added to units and theme into their own container. This encapsulates these things that belong together and allows us to move it out later without many problems. Also, litter the global namespace a bit less. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-29Rework central navigationGravatar Sebastian Kügler
This patch is the part implementing the drawers and in-app page navigation. In more detail: - main.qml uses the mobilecomponents plugin and the APIs as already changed in the other components - The extended properties have moved into the root item (for now, they'll get properly encapsulated later) - A menu can be swiped in from the left - The application makes better use when used horizontally (if there's enough space, so depending on the display you can get divelist and -details next to each other, one phone/portrait formfactor, the layout stays in a single column. - The options for GPS have been grouped into a submenu This change follows the Plasma mobile human interface guidelines. These changes are actually relatively small considered what they're doing, most of the logic is encapsulated in mobilecomponents' PageRow and *Drawer classes. The previous navigation pattern is actually a subset of this one, so it still works. Signed-off-by: Sebastian Kügler <sebas@kde.org>
2015-11-19main.qml: fix crash on native Win32 desktopGravatar Lubomir I. Ivanov
Testing the mobile application on Win32 desktop results in a crash. Using ApplicationWindow for some reason makes the executable enter an inifinity loop on startup until it runs out of RAM. The output is: setGeometryDp: Unable to set geometry 160x1200+720+426 on ApplicationWindow_ QMLTYPE_12_QML_111/''. Resulting geometry: 160x885+720+426 (frame: 4, 23, 4, 4, custom margin: 0, 0, 0, 0, minimum size: 0x47, maximum size: 16777215x 16777215). To fix the crash use "Window" instead of "ApplicationWindow". Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com> ACKed-by: Sebastian Kügler <sebas@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>