aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
AgeCommit message (Collapse)Author
2018-08-11Mobile: fix saving new diveGravatar Jocke
With the new setup we need to know which state we are coming from when we are saving cylinder related info. When we are adding a new dive we explicitly should save cylinder data to the first cylinder. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: fix adding new diveGravatar Jocke
All the changes to multi cylinder editing broke the option to add a new dive. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: save pressuresGravatar Jocke
Save start and end pressures for used cylinders. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: save gasmixesGravatar Jocke
Same as for cylinder info, we need to make sure that the gasmixes gets saved to the correct cylinder. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: display all used gases on the edit pageGravatar Jocke
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: save edited cylindersGravatar Jocke
Save the edited cylinder in the correct slot. Since the cylinder number and the used cylinder number need not be the same we first need to test if the cylinder are used. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: Display used cylinders on edit pageGravatar Jocke
This displays the used cylinders in a dive so that they can be edited. Currently limited to 5 as a POC. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11Mobile: display all used cylindersGravatar Jocke
Display all used cylinders as a comma separated list. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-08-11QML UI: don't overwrite good info with badGravatar Dirk Hohndel
If we don't know the vendor or product, let's not overwrite information that we may have remembered from the last time the user downloaded from this dive computer. Note that this doesn't try to associate a specific cable with the information used last time. We could be smarter here for people who have multiple dive computers, but for the most typical user with just one dive computer, this does seem like a good solution. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: add callback to run after app is fully initializedGravatar Dirk Hohndel
And then use that to check for pending Intents on Android. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: don't show bogus warning if page stack is resetGravatar Dirk Hohndel
As we clear all the pages from the stack, we can briefly have no valid currentItem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: don't mangle 'USB device' as device nameGravatar Dirk Hohndel
We do strip the user friendly name from BT addresses and this mistakenly mangled 'USB device' to 'device'. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: directly access currentTextGravatar Dirk Hohndel
No need to qualify our own object name. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: disable connection selection for Atomics AquaticsGravatar Dirk Hohndel
This is one of the dive computers that we simply connect to as USB device. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: when triggering download page, set up vendor/product/connectionGravatar Dirk Hohndel
This only works if the USB device contains enough information to do so. We need to collect more information to understand what information we get if those get plugged in. Maybe we'll get only the vendor and need to leave it to the user to set the product (which we can do by passing an index of -1 for product). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: set indices when showing Download pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: expose vendor/product/connection index as propertiesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: show download page when device was plugged inGravatar Dirk Hohndel
Unless, of course, the user was editing or adding a dive - that would be annoying to have interrupted (even though, of course, it's the user plugging in the device which would trigger this in the first place). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: create separate function to show download pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-11QML UI: add property to pass detected device name to UIGravatar Dirk Hohndel
If the user plugs in a device on Android we get a device string that should allow us to figure out which dive computer was plugged in. Make that string available to the QML UI. Right now all we do is log it. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-08-07Move DC download icons used by mobile app to mobile-widgets/qml/icons/Gravatar Martin Měřinský
Signed-off-by: Martin Měřinský <mermar@centrum.cz>
2018-07-10core: make qPref::cloud_status the only version of the enumGravatar jan Iversen
add enum to qPref and remove elsewhere update source core to reference qPref. the enum cannot be in pref.h because it is to be used in qml and Q_ENUM need the enum to be defined as part of the class Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-27QML UI: fix layout of Download pageGravatar Dirk Hohndel
The info text from the download process wasn't rendered correctly. maximumWidth ended being a recursive reference and as a result the text would render as very narrow and super-tall field. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-26QML UI: don't use anchors within LayoutsGravatar Dirk Hohndel
Qt 5.11 adds useful warnings when code attempts to use anchors within Layouts and even tells you how to fix things. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-21mobile: remove MapWidget from mobile-resources.qrcGravatar jan Iversen
remove MapWidget entries from mobile-resources.qrc, and reference map-widget.qrc in Subsurface-mobile.pro for iOS Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-20QML UI: ensure we track vendor/product for downloadGravatar Dirk Hohndel
This is based on something that Anton Ludin sent to the mailing list. Reading through the code it seemed that there were scenarios in which DC_vendor and DC_product were not updated correctly. That's one of the problems of the declarative approach in QML - it can be very hard to figure out which code is run when in certain situations. This may help address the issue with FTDI downloads no longer working on Android. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-20QML UI: improve banner in global drawerGravatar Dirk Hohndel
The asynchronous load seemed to be (at least one of) the culprit(s) of the banner occasionally not showing up. Making the font for the cloud ID smaller looks better (and works much better for long email addresses). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-20QML UIL: fix more problems with members moving from manager to prefsGravatar Dirk Hohndel
That change clearly would have benefited from better code review. This is a superset of a change proposed by Jan Iversen. Closes #1406 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-18mobile: use full icon path.Gravatar Murillo Bernardes
For some reason Kirigami.Icon mess up icon display when filename extension is omitted. Because of this a perfectly good, scalable svg show up as a low resolution scaled up icon. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-06-18mobile: move call to savePreferences back to manager.Gravatar jan Iversen
calls to savePreferences was moved to prefs. in b8eb348f546291c49e2d606649b3c85d23e43782, but the corresponding C++ code was not merged. Revert call to savePreferences to manager. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-18mobile: revert e993d4f005e62c12765e2e45342ecf840476e3bfGravatar jan Iversen
The commit secured that plotDive was not called before actually being used. However our (rather fragile) C++ qml interface did not work correctly (ony sometimes). Revert the previous commit. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-18QML UI: show the cloud credentials in the global drawer bannerGravatar Dirk Hohndel
This is an additional side-benefit of rolling our own banner. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-18QML UI: build our own icon and header for global drawerGravatar Dirk Hohndel
Kirigami appears to have a bug that makes it fail to show our icon. With this we can be much more flexible in what we show in the top area of the global drawer. Fixes #1331 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-18Whitespace cleanupGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-17mobile: add Dark_gps.svgGravatar jan Iversen
The blue gps was reused for the dark theme. Copy Blue_gps.svg and change color to dark. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-16mobile: fix reference to credentialStatus propertyGravatar Murillo Bernardes
Commit b8eb348f moved credentialStatus but missed one spot. When starting from a fresh install, clicking "No cloud mode” fails because of this. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-06-16QML UI: fix variable referenceGravatar Dirk Hohndel
Looks like commit 807571a588 ("core: update deviceData default from qml") never actually was tested with dive computer download. This looks rather like an automatic renaming gone wrong. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-15mobile: move settings from qmlmanager to qmlprefsGravatar jan Iversen
add settings variables/functions to qmlprefs remove settings variables/functions from qmlmanager change manager. to prefs. in qml files for setting variables/functions Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15mobile: add qmlprefs classGravatar jan Iversen
add class to cmake and pro register class Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-11Mobile: correct wrong C++ ref in qmlGravatar jan Iversen
change data() to manager. correct comboDevice -> comboConnection Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09core: update deviceData default from qmlGravatar jan Iversen
remove setting default in qml to C++ Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: remove context iconsGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: remove png/svg icons not usedGravatar jan Iversen
Delete icons that are taken from kirigami Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: do not call plotDive during startupGravatar jan Iversen
Check in profile if visible before calling plotDive Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09mobile: white space clean in DiveDetailsView.qmlGravatar jan Iversen
Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: decoupled ssrf.qrc and mobile.qrcGravatar jan Iversen
remove /subsurface.qrc from .pro copy missing mapwidget icon references to mobile-resources.pro Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: main.qml, change load of dive.jpgGravatar jan Iversen
change load of dive.jpg to reflect new location. Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: mobile unreferenced ic iconsGravatar jan Iversen
Remove 24px icons not referenced. update README.license Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: remove unneeded alias from mobile-resourcesGravatar jan Iversen
remove alias where alias == file rename *24px* icons and remove alias Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08mobile: clean qml dir (move dive.jpg to icons)Gravatar jan Iversen
Cleanup qml dir by moving dive.jpg to the icon dir Signed-off-by: Jan Iversen <jani@apache.org>