summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/main.qml
AgeCommit message (Collapse)Author
2020-04-04mobile/startup: show notification directly in the UI windowGravatar Dirk Hohndel
Until the app is initialized, we have problems getting the 'floating' passive notifications to show up and be useful. Instead update the user by filling a text block on the otherwise empty initial page of the app. Delay the switch to the dive list until the app is initialized and then use the passive notifications again. While we are initializing also show a busy spinner so the user doesn't think the app is hung. As a side effect of this change, the dive list isn't shown until our models are initialized. And strangely this causes every single possible delegate to be instantiated. We can prevent that by not setting the dive list model until after we are done setting up the model. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-31mobile: improve Android back key behaviorGravatar Dirk Hohndel
There are two places where we try to prevemt unintended app exits. Once, in the onBackRequested signal handler on the dive list. This was missing special handling for the situation where one of the drawers was open. The second place is the onClosing signal handler in main.qml. Naively I thought that this was enough to catch all cases where we were about to exit the app, but apparently an explicit manager.quit() is a bit too forceful and doesn't get to that signal handler. With this commit we check for open drawers in both places. Belts and suspenders, I guess. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-30mobile UI: don't exit when using back button to close drawersGravatar Dirk Hohndel
An Android user might reasonably assume that they can use the back button to close the global or context drawers. So act accordingly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-26mobile/page-selection: consistently use showPage to select a pageGravatar Dirk Hohndel
We still used pageStack.push() all over the place. Also, in showPage, disable the map hack if the user actively picks a different page. This should fix an issue where the user picked the map and then tried to add a dive to the dive list - and instead of the dive edit was shown the map again. Reported-by: Hartley Horwitz <hhrwtz@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-23mobile: show the new v3 user manualGravatar Dirk Hohndel
I would love to figure out a way how to bundle the user manual and load it from the device file system, but in the meantime this should continue to work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-21mobile/DCdownload: try harder to get the right elements selectedGravatar Dirk Hohndel
The number of possible sequences of events when the user is connecting a USB device is rather surprising. These changes try to ensure that in every case we get USB connection information we do in fact show the correct (or best guess) connection. See #2686 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-16mobile/download: only use device guess if no USB device plugged inGravatar Dirk Hohndel
If we explicitly open the download page after the use plugged in a USB device, don't try to use guesses from the BT/BLE pairings to populate the device/connection dropdowns. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-12mobile UI: stop trying to play with opacityGravatar Dirk Hohndel
Since we are switching between pages, the whole opacity mechanics make no sense. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-12mobile UI: remove duplicate StartPageGravatar Dirk Hohndel
This was a merge error in the dive list rewrite and brought in a code block that had moved, which caused issues with correctly switching to the dive list. Calling setupActions() moves to the diveListView (where it really belongs). Instead of messing with the visibility of components of the same page, we now simply switch out the shown page. Fixes #2667 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile UI: add divelist context drawer action to edit trip detailsGravatar Dirk Hohndel
For now this only shows the trip details. They can be edited on the page, but there is no way to save those edits, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile UI: fix autoclose of context drawerGravatar Dirk Hohndel
The default policy closes the context drawer if there is a button release outside the context drawer area. That messes with the intended UI. For us a much more useful behavior is to have the next click outside of the drawer close the drawer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-10mobile/divelist: add context drawerGravatar Dirk Hohndel
This is just pulling in the object so it can later be used on other pages. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09mobile/divelist: rewrite the QML dive listGravatar Dirk Hohndel
This isn't perfect yet, but it looks fairly reasonable. This commit was mainly written by Dirk, but includes a few fixes from Berthold which where squashed into this commit as they really should have been part of the initial version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-03-09mobile UI: ensure download page is shown if started by plug-in eventGravatar Dirk Hohndel
The order of execution of the various routines is a bit counter intuitive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09mobile UI: move code to open download page on device plug-inGravatar Dirk Hohndel
This makes the code easier to reuse and uses the helper we just added. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-09mobile UI: add consistent way to show a pageGravatar Dirk Hohndel
And have the existing shortcut functions use that helper. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-03-01filter: don't search in background on mobileGravatar Berthold Stoeger
I experienced weird crashes that seemed timing-related when using the filter. Therefore, remove the multi-threading thing. So far no more crashes, but keep a close eye on that. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2020-02-18mobile/developer: add menu entry to temporarily enable verbose modeGravatar Dirk Hohndel
One could argue that this should be a preference. I like the fact that it isn't persistent, though. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-13mobile UI: restructure menuGravatar Dirk Hohndel
This changes the 'GPS' entry to be called 'Location', moves the 'Map' entry below that, and reuses the map icon for both the map inside this submenu and for the main menu item. It moves the 'About' entry under 'Help' and both 'Export' and 'Dive summary' under 'Dive management'. This way we have only five (or with 'Developer' enabled, six) entries in the main menu making it much more appropriate for really tiny screens. Additionally, the entrieis moved into sub-menus are ones that are not all that commonly used. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-08mobile UI: correctly determine the number of columns when screen size changesGravatar Dirk Hohndel
This also deals with a bug we had before where we didn't re-start the calculation for the various sizes from the assumption of 'at least 21 grid units'. Now you can rotate the device and the right thing will happen. Small warning - this checks the orientation of the screen, which is exactly what you want it to do on your device. When running mobile on desktop this may not be what you expect. Even if the window has a portrait aspect ratio, your screen is likely still landscape... so testing this feature in mobile on desktop mode is a bit harder... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06random white space fixGravatar Dirk Hohndel
QtCreator fixes that for me after every edit, I'm getting tired of manually removing those hunks. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile UI: redo the screen size magicGravatar Dirk Hohndel
This still is way to fragile. Ordering of object completion doesn't appear consistent. Hopefully bringing the properties all into one (now reasonably named) object will help. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-06mobile: comment out planner referencesGravatar Dirk Hohndel
I don't expect this to be complieted. I'll keep it in the tree for the moment, but expect to remove all of the related code eventually. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-02-03mobile-widgets: switch to new subsurfaceThemeGravatar jan Iversen
Remove subsurfaceTheme from main.qml Replace ThemeNew -> subsurfaceTheme change registration ThemeNew -> subsurfaceTheme Signed-off-by: jan Iversen <jan@casacondor.com>
2020-02-03mobile-widgets/qml: secure subsurfaceTheme.initial*Gravatar jan Iversen
move initialWidth/initialHeight out of subsurfaceTheme to placeHolder, this secures no change in behaviour. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-30mobile-widgets/qml: move fontMetrics to ThemeTestGravatar jan Iversen
fontMetrics is no longer used in production code, but still in the theme test page. Isolate fontMetrics in ThemeTest page. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30mobile-widgets: move font property to themeInterfaceGravatar jan Iversen
Move setting of font properties used throughout to themeInterface. Add new settings "currentScale". The properties are kept in main (subsurfaceTheme) in order not to do a big search/replace. Update settings to use currectScale and signal changes in themeinterface. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-30mobile-widgets: move basePointSize to themeinterfaceGravatar jan Iversen
Check defaultfont and calculate basepointsize in themeinterface instead of in QML. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-28mobile-widgets/qml: add icon to dive summary entryGravatar jan Iversen
Add sigma icon to menu entry "dive summary". Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-27mobile-widgets/qml: integrate DiveSummary in menu.Gravatar jan Iversen
Add DiveSummary to globalDrawer Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-26mobile-widgets/qml: integrate ThemeNew in qmlGravatar jan Iversen
Update Settings to use ThemeNew (for theme change) Reduce subsurfaceTheme in main Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-18mobile-widgets/qml: use strongly typed CloudStatusGravatar jan Iversen
Replace CloudStatus.<value> with backend.<value> as part of making enum sharing between C/C++ and QML more robust. Replace PrefCloudStorage.verification_status with backend.verification_status to use the strongly typed function. Signed-off-by: jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-18mobile-widget/qml: add missing colors to dark themeGravatar jan Iversen
add missing colors so that dark theme contains the same colors as "colors in use". Update the darkTheme() to correctly copy colors from pink theme Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18mobile-widget/qml: add missing colors to pink themeGravatar jan Iversen
add missing colors so that pink theme contains the same colors as "colors in use". Update the pinkTheme() to correctly copy colors from pink theme Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18mobile-widget/qml: add missing colors to blue themeGravatar jan Iversen
add missing colors so that blue theme contains the same colors as "colors in use". Update the blueTheme() to correctly copy colors from blue theme Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18mobile-widgets/qml: secure block of used colors is correctGravatar jan Iversen
move contrastAccentColor, lightDrawerColor to block of used colors in order to avoid confusion. move darkDrawerColor to dark theme. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18mobile-widgets/qml: remove M126 warnings in main.qmlGravatar jan Iversen
changed != --> !== and == --> === to make QML happy. Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-17mobile-widgets/qml: main reference qPrefGeneral.default_cylinder wronglyGravatar jan Iversen
change qPrefGeneral.default_cylinder -> qPrefEquipment.default_cylinder Signed-off-by: jan Iversen <jan@casacondor.com>
2019-12-29mobile-widgets: remove qmlprefs.*Gravatar jan Iversen
class is not longer used, remove it. (also from qml) Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: prefs.credentialStatus -> PrefCloudStorageGravatar jan Iversen
Remove use of prefs. (apart from instanciating the object) in main.qml Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: "Add dive manually" is always allowedGravatar jan Iversen
Since the divelist is only visible if online/offline (CS_VERIFIED/CS_NOCLOUD), there is no need to check that to enable "Add dive manually". Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: don't offer manual sync to cloud in no-cloud modeGravatar jan Iversen
Manual sync was enabled both for CS_VERIFIED (online) and CS_NOCLOUD (offline) and then in the trigger CS_NOCLOUD lead to a login screen, potentially confusing the user. Only enable manual sync with verified cloud credentials. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile UI: add menu item for cloud password resetGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile UI: restructure help/support menuGravatar Dirk Hohndel
Instead of having two entries on the main menu, move them into a sub menu. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile: small whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile UI: add back button to planner menuGravatar Dirk Hohndel
Otherwise you are stuck in there. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile UI: remove confusing gDrawer idGravatar Dirk Hohndel
The global drawer already has a name that can be referenced. This was adding confusion as now both names were used in the menu structure. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: correct first view of divelistGravatar jan Iversen
pageStack.initPage cannot be used as a function and causes an error Replace with showDiveList() Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-28mobile-widget/qml: avoid binding loop in GlobalDrawerGravatar jan Iversen
rightPadding seems defined in Kirigami and the default value causes a binding loop. set rightPadding directly. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26mobile-widgets/qml: add diveplanner pages to globalDrawerGravatar jan Iversen
Add "Dive planner" menu entry in GlobalDrawer/Developer with 4 subitems one for each diveplanner pages. Developer is chosen in order to allow interested access to pages, without raising expectations for the normal user. That allow a step-by-step implementation Signed-off-by: Jan Iversen <jan@casacondor.com>