summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
2020-01-04mobile-widgets/qml: secure text on ascent/descend get updatedGravatar jan Iversen
When changing METERS <-> FEET, the text change automatically between "m/min" and "ft/min". Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-04mobile-widgetes/qml: standardize QML/C++ interfaceGravatar jan Iversen
Do not use a.set_b(value); it works, but it introduces yet another way of using the QML/C++ interface, furthermore the function might not be called set_b in some future, which is the reason the function is define in Q_PROPERTY Use a.b = value, that respects Q_PROPERTY, and is slightly more performant, most importantly it's like all the other settings so noone starts wondering why this is special. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-04mobile-widgets/qml: switch between m/min and ft/minGravatar jan Iversen
Set the text of ascent/descent rates. This shows the correct speed units when the user switches between metric and imperial. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2020-01-02mobile-widgets/qml: reintroduce showPinGravatar jan Iversen
but the proper way, as a direct check on PrefCloudStorage. This secures PrefCloudStorage is only tested once and not n times. As a sideeffect it saves typing and control. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-31mobile-widgets/qml: add spinbox values to planner setupGravatar jan Iversen
(planning is excluded, due to not finished UI). Connect all spinboxes with plannerShared. This change allows live testing and compare with the desktop version. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-31mobile-widgets/qml: add checkbox valuesGravatar jan Iversen
(planning is excluded, due to not finished UI). Connect all checkboxes with plannerShared. This change allows live testing and compare with the desktop version. 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-29mobile-widgets: use oldStatus in qmlmanagerGravatar jan Iversen
Switch oldStatus from qmlprefs to qmlmanager This is the last use of QMLPrefs, which can later be safely removed. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: add oldStatus variable to qmlmanagerGravatar jan Iversen
oldStatus() is kept in qmlPrefs during the login process to allow for a couple of special cases: - if a user have added dives in NO_CLOUD mode and changes to use the cloud these dives are copied to the Cloud, instead of being lost. - if a user does a bailout from the login process (this should not happen anymore) the old status is restored. The pure solution would be to have oldStatus at the top level (e.g. a property in qml) and only change it when actually being in the login process, however due to way the qmlmanager is written it proved very difficult and not worth the effort. In order to be able to remove qmlPrefs, oldStatus are moved to qmlManager. This commit only contain the creation of the variable and the supporting code. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove showPin from qmlprefsGravatar jan Iversen
showPin is no longer used so remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove showPin from qmlmanagerGravatar jan Iversen
Setting showPin is no longer needed, so remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets/qml: remove prefs.showPinGravatar jan Iversen
prefs.showpin is the same as PrefCloudStorage.cloud_verification_status === CloudStatus.CS_NEED_TO_VERIFY but is actually implemented as a separate variable. Removing showPin in order to limit use of QMLPrefs, which is the overall goal. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove setCredentialStatus() from qmlprefsGravatar jan Iversen
Remove no longer used function setCredentialStatus() from qmlprefs. This is done to secure there are no missing setCredentialStatus calls in the code. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove second setCredentialStatus()Gravatar jan Iversen
call setOldStatus() and set_filename(). saveCredentials() will adjust email and password. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove first setCredentialStatus() in finishSetup()Gravatar jan Iversen
This setCredentialStatus() will never do anything, because qPrefCloudStorage is identical to prefs.cloud_verification_status, and can thus be safely removed. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove setCredentialStatus() from saveCloudCredentials()Gravatar jan Iversen
Revert to the divelist by setting oldStatus() directly to set_cloud_verification_status() This is done to further limit the use of setCredentialStatus() and prepare to remove qmlPrefs. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove setCredentialStatus from revertToNoCloudIfNeededGravatar jan Iversen
Update revertToNoCloudIfNeeded() to not use setCredentialStatus() by adding an extra call to setOldStatus() setOldStatus() is called in setCredentialStatus together with set_cloud_verification_status() therefore these 2 calls need to added when removing setCredentialStatus(). Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: replace simple setCredentialStatusGravatar jan Iversen
qmlprefs::setCredentialStatus() basically only does something when called with CS_NOCLOUD. A number of setCredentialStatus() calls happen where status cannot be CS_NOCLOUD, and therefore setCredentialStatus() can be safely replaced with set_cloud_verification_status() This limits the use of qmlprefs::setCredentialStatus(), but there are still a couple of more complicated calls. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: credentialStatus() -> cloud_verification_status()Gravatar jan Iversen
Replace all credentialStatus() with cloud_verification_status() Where both prefs.credentialStatus and PrefCloudStorage.cloud_verification_status are being set, remove prefs.credentialStatus. These replacements are valid since credentialStatus() is a simple envelope over cloud_verification_status(). Also remove qmlPrefs::credentialStatus() from qmlPrefs (mostly to ensure no replacements was forgotten). Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29mobile-widgets: remove m_cloudCredentialStatus in qmlprefGravatar jan Iversen
Remove m_credentialStatus in qmlpref, but let the setter/getter stay, using qPrefCloudStorage::cloud_verification_status() instead. This change ensures that qmlPrefs:credentialStatus() returns the same as qPrefCloudStorage::cloud_verification_status(), and the setter/getter of credentialStatus can later be removed safely. This is a "checkpoint" to ensure everything works without a temporary credentialStatus. No code part depend on the difference between qmlPrefs::credentialStatus() and qPrefCloudStorage::cloud_verification_status(), but the code reference both. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: correct missing parm in saveCredentials() callGravatar jan Iversen
Add missing empty pin ("") in saveCredentials() call. 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-28mobile-widgets/qml: remove use of prefs. in DiveList.qmlGravatar jan Iversen
prefs. is only important during the signin process, so use the standard PrefCloudStorage variable Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: remove cloudPin from qmlprefsGravatar jan Iversen
cloudPin is no longer used, remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: remove cloudPin() from qmlmanagerGravatar jan Iversen
cloudPin does only have the values "" and NULL, so replace cloudPin() with "" in csa->backend() call remove setting of cloudPin to "" Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widget: simplify saveCredentials() in qmlmanagerGravatar jan Iversen
cloudPin is only set to "" and NULL, therefore and "if" checking if cloudPin is not empty will never have affect. Remove else part. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: make verifyCredentials() an internal functionGravatar jan Iversen
Move verifyCredentials() from public slots to private, eliminating the need to MOC and making the C++/QML interface on function less complicated. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: make saveCredentials() an atomGravatar jan Iversen
Add pin parameter to saveCredentials() thereby having all info about credentials in one function call. Add "" as pin in saveCredentials() - main.qml, when verifying credentials. replace verifyCredentials() with saveCredentials() in the register button on the pin page. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: remove clearCredentials()Gravatar jan Iversen
clearCredentials() was only called from one place (in the same file), copy functionality and remove function. It was declared as a public slot, so this saves a little bit of overhead too. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets: remove cancelCredentialsPinSetup() from qmlprefsGravatar jan Iversen
cancelCredentialsPinSetup() is no longer used, so remove it. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: don't call cancelCredentialsPinSetup()Gravatar jan Iversen
Copy functionality from cancelCredentialsPinSetup() into Cancel in CloudCredentials.qml, this is part of the general qmlprefs cleanup. Remove rootItem.returnTopPage() since the user stays on this page (sees credentials again). Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: remove cancelCredentialsPinSetup() from SettingsGravatar jan Iversen
For now just copy the functionality into Settings.qml, this is part of the qmlprefs cleanup. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: correct reference to credentialStatusGravatar jan Iversen
PrefCloudStorage uses cloud_verification_status where qmlprefs uses credentialStatus Corrected reference. Signed-off-by: Jan Iversen <jan@casacondor.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28mobile-widgets/qml: remove property credentialStatusGravatar jan Iversen
Property is unused, remove it. 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 support and account iconsGravatar Dirk Hohndel
These were again copied from the material design icon set and will be used to differentiate the various help topics. 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-29mobile-widgets/qml: add "forgot password" buttonGravatar jan Iversen
The user is most likely to find out, that he does not remember the password, when asked for it. Add "forgot password" button in the signin dialog (both credentials and pin dialog). Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-28mobile-widgets: correct faulty connect.Gravatar jan Iversen
1) add comment line (signal to signal) 2) correct spelling error in comment 3) correct connect Signed-off-by: Jan Iversen <jan@casacondor.com>
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: remove envelope of saveCredentialsGravatar jan Iversen
Remove QML saveCredentials since it only calls manager.saveCredentials Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26mobile-widgets/qml: correct Pin pageGravatar jan Iversen
Did not switch to divelog page. call verifyCredentials() not saveCredentials when checking pin Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26mobile-widgets: correct switch to no-cloud mode.Gravatar jan Iversen
saveCredentials() missed parameters Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26mobile-widgets/qml: diveplannersetup graphical layoutGravatar jan Iversen
Add graphical layout to setup page Signed-off-by: Jan Iversen <jan@casacondor.com>