Commit graph

884 commits

Author SHA1 Message Date
jan Iversen
f17aeb92e3 mobile-widget/qml: add missing colors to blue theme
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-18 12:44:05 -08:00
jan Iversen
5c2e08199f mobile-widgets/qml: secure block of used colors is correct
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-18 12:44:05 -08:00
jan Iversen
bcfe505f09 mobile-widgets/qml: remove M126 warnings in main.qml
changed != --> !==
and == --> ===
to make QML happy.

Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18 12:44:05 -08:00
jan Iversen
2d12d251b7 mobile-widgets/qml: columnWidth undefined
Remove reference to columnWidth, because it is
not defined in main.qml (subsurfaceTheme).

Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-18 12:44:05 -08:00
jan Iversen
b25e791d13 mobile-widgets/qml: main reference qPrefGeneral.default_cylinder wrongly
change qPrefGeneral.default_cylinder -> qPrefEquipment.default_cylinder

Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-17 08:51:04 -08:00
jan Iversen
59d72474d6 mobile-widgets/qml: change PrefGeneral -> PrefEquipment
default_cylinder was moved from PrefGeneral to PrefEquipment,
but Settings was not updated

update Settings.

Signed-off-by: jan Iversen <jan@casacondor.com>
2020-01-17 08:51:04 -08:00
jan Iversen
c77bad6c3e mobile-widgets/qml: secure text on ascent/descend get updated
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-04 10:56:55 -08:00
jan Iversen
d000cb2b0d mobile-widgetes/qml: standardize QML/C++ interface
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-04 10:56:55 -08:00
jan Iversen
342a8db93a mobile-widgets/qml: switch between m/min and ft/min
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-04 10:44:02 -08:00
jan Iversen
6d6a4278c4 mobile-widgets/qml: reintroduce showPin
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>
2020-01-02 06:36:18 +09:00
jan Iversen
d7f87ee93c mobile-widgets/qml: add spinbox values to planner setup
(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-31 07:44:51 +09:00
jan Iversen
d83c74606d mobile-widgets/qml: add checkbox values
(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-31 07:44:51 +09:00
jan Iversen
360add37a8 mobile-widgets: remove qmlprefs.*
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-29 12:20:19 -08:00
jan Iversen
e268af0d9f mobile-widgets: use oldStatus in qmlmanager
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-29 12:20:19 -08:00
jan Iversen
b92c2d280c mobile-widgets/qml: remove prefs.showPin
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-29 12:20:19 -08:00
jan Iversen
783332561a mobile-widgets: credentialStatus() -> cloud_verification_status()
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-29 12:20:19 -08:00
jan Iversen
e80c27a2bd mobile-widgets/qml: correct missing parm in saveCredentials() call
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-28 08:36:55 -08:00
jan Iversen
07ad455ea2 mobile-widgets/qml: prefs.credentialStatus -> PrefCloudStorage
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-28 08:36:55 -08:00
jan Iversen
7e0e489d45 mobile-widgets/qml: "Add dive manually" is always allowed
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-28 08:36:20 -08:00
jan Iversen
a73ce80eee mobile-widgets/qml: don't offer manual sync to cloud in no-cloud mode
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-28 08:35:45 -08:00
jan Iversen
bdbaf72d27 mobile-widgets/qml: remove use of prefs. in DiveList.qml
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-28 08:34:56 -08:00
jan Iversen
096f9773f0 mobile-widgets: make saveCredentials() an atom
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-28 08:34:56 -08:00
jan Iversen
de4e1c1efa mobile-widgets/qml: don't call cancelCredentialsPinSetup()
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-28 08:34:56 -08:00
jan Iversen
dc018cd77d mobile-widgets/qml: remove cancelCredentialsPinSetup() from Settings
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-28 08:34:56 -08:00
jan Iversen
baec098eb3 mobile-widgets/qml: correct reference to credentialStatus
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-28 08:34:56 -08:00
jan Iversen
944455a821 mobile-widgets/qml: remove property credentialStatus
Property is unused, remove it.

Signed-off-by: Jan Iversen <jan@casacondor.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-28 08:34:56 -08:00
Dirk Hohndel
a2246753d8 mobile UI: add menu item for cloud password reset
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29 01:16:23 +09:00
Dirk Hohndel
ab93e0f55c mobile UI: restructure help/support menu
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-29 01:16:23 +09:00
Dirk Hohndel
69f06f7043 mobile: small whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29 01:16:23 +09:00
Dirk Hohndel
56d959f733 mobile UI: add support and account icons
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-29 01:16:23 +09:00
Dirk Hohndel
5c0b864a55 mobile UI: add back button to planner menu
Otherwise you are stuck in there.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-29 01:16:23 +09:00
Dirk Hohndel
602f49e012 mobile UI: remove confusing gDrawer id
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-29 01:16:23 +09:00
jan Iversen
25d2f9b84d mobile-widgets/qml: add "forgot password" button
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-29 01:05:44 +09:00
jan Iversen
2d353a756b mobile-widgets/qml: correct first view of divelist
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-28 02:21:20 +09:00
jan Iversen
af1ca2af81 mobile-widget/qml: avoid binding loop in GlobalDrawer
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-28 02:21:20 +09:00
jan Iversen
52b8a1304f mobile-widgets: remove envelope of saveCredentials
Remove QML saveCredentials since it only calls manager.saveCredentials

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26 10:24:55 -08:00
jan Iversen
e9d519444d mobile-widgets/qml: correct Pin page
Did not switch to divelog page.

call verifyCredentials() not saveCredentials when checking pin

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26 10:24:55 -08:00
jan Iversen
c4952b0dcb mobile-widgets: correct switch to no-cloud mode.
saveCredentials() missed parameters

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26 10:24:55 -08:00
jan Iversen
b58d403906 mobile-widgets/qml: diveplannersetup graphical layout
Add graphical layout to setup page

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26 10:21:30 -08:00
jan Iversen
0974c7524f mobile-widgets/qml: add diveplanner pages to globalDrawer
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>
2019-12-26 10:21:16 -08:00
jan Iversen
fac8d5b125 mobile-widgets/qml: add diveplanner pages
Diveplanner consist of 3 pages:
- Edit, creation of the plan
- View, view the plan
- Manager, list/delete/select stored diveplans

With the current navigation system (pageStack)
View needs to be split in multiple pages.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-26 10:21:11 -08:00
jan Iversen
800973a920 mobile-widgets/qml: add TemplateComboBox
standard font-size as well as color are set
in the template (but can be overwritten in
the object)

Using TemplateComboBox allows central change of how
labels are presented in the UI.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26 10:18:11 -08:00
jan Iversen
f44fa1aa27 mobile-widgets/qml: add TemplateCheckBox
standard font-size as well as color are set
in the template (but can be overwritten in
the object)

Using TemplateCheckBox allows central change of how
labels are presented in the UI.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26 10:18:10 -08:00
jan Iversen
43b813d58e mobile-widgets/qml: add TemplateRadioButton
standard font-size as well as color are set
in the template (but can be overwritten in
the object)

Using TemplateRadioButton allows central change of how
labels are presented in the UI.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26 10:18:10 -08:00
jan Iversen
6c8dae5a04 mobile-widgets/qml: add TemplateSpinBox
standard font-size are set in the template (but can
be overwritten in the object)

Using TemplateSpinBox allows central change of how
spinBoxes are presented in the UI.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26 10:18:09 -08:00
jan Iversen
99cce7e807 mobile-widgets/qml: add TemplateLabel
standard font-size as well as color are set
in the template (but can be overwritten in
the object)

Using TemplateLabel allows central change of how
labels are presented in the UI.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26 10:18:09 -08:00
jan Iversen
8468d28a41 mobile-widgets/qml: add TemplateSection
TempleSection is a clickable rectangle that contains
information.

It is used to
- group information
- hide/unhide details

And are an important building block in decluttering small
screen, while showing all information on bigger screens

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-26 10:18:08 -08:00
jan Iversen
9c74ac23a5 mobile-widgets/qml: remove console messages
Remove console.log messagees used to test the
split of startpage/divelist.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-27 01:29:30 +09:00
Dirk Hohndel
3dbdd2ee5e mobile UI/login: fix PIN entry page
In commit a4d299e01e ("mobile-widgets/qml: use showPin/oldStatus consistently")
one instance of rootItem.showPin wasn't replaced with prefs.showPin and as a
result we had a very strange password entry line in the middle of the PIN entry
screen.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24 15:53:15 -08:00
jan Iversen
611c4bb088 mobile UI/login: move startpage to main
StartPage does not belong in divelist.

Remove startPage from diveList and anchor in main.

Make needed functional changes.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24 15:53:15 -08:00
jan Iversen
11810d5d06 mobile UI/login: remove startpage dependency in divelist
DiveList should not depend on StartPage, so remove references to
startPage.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24 15:53:14 -08:00
jan Iversen
b83dcc4b25 mobile UI/login: make divelist a proper object in main
Instanciate DiveList like all the other pages.

Move DiveList properties set in main to DiveList.qml

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24 15:53:14 -08:00
jan Iversen
4687de8c82 mobile UI/login: clean startPage/setupActions from Divelist
setupActions() in StartPage contained a mixture of StartPage
actions and DiveList actions.

Split setupActions to be pure.

However currently StartPage is embedded inside DiveList so the
action onVisibleChanged must be simulated.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24 15:53:13 -08:00
jan Iversen
d1bee58dad mobile UI/login: move onCompleted actions to main
manager.finishSetup() have nothing to do with startpage/divelist,
but belong in main (seeing main as responsible for setup and window layout).

Move onCompleted functionality to main.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24 15:53:11 -08:00
jan Iversen
5af7727ad0 mobile UI/login: replace use of cloudPassword
Replace prefs.cloudPassword with PrefCloudStorage.cloud_storage_password in QML

Replace QMLPrefs.....cloudPassword with PrefCloudStorage::cloud_storage_password in C++

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24 10:24:15 -08:00
jan Iversen
ac28896a5d mobile UI/login: replace use of cloudUserName
Replace prefs.cloudUserName with PrefCloudStorage.cloud_storage_email in QML

Replace QMLPrefs.....cloudUserName with PrefCloudStorage::cloud_storage_email in C++

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24 10:22:39 -08:00
jan Iversen
4b713ece96 mobile UI/login: do not revert to old credentials.
If the user asked to change credentials it is equivalent to a signout,
so no need to store old credentials. This simplification allows removal
of the temporary credentials in qmlPrefs.

this commits secures the user is locked in the login page, until one
of 3 things happen:

- enter verified credentials (divelist is loaded from cloud)
- select no-cloud mode (divelist is loaded from local)
- enter new credentials, PIN page shows, enter PIN or
  cancel (back to enter credentials).

This is consistent even if the program is restarted.

Old version had a non consistent way:
A user enters new credentials,
  sees the PIN screen,
  but does not receive the email immediately,
  so works with other applications (causing the mobile app to close)

Having received the email with the PiN,
  the user starts mobile again,
  BUT does not see the PIN screen, instead the old credentials are used.

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-12-24 10:17:45 -08:00
jan Iversen
9117aa2a52 mobile-widgets: make saveCredentials() an atom
Call saveCredentials with username/password to avoid first
setting the two and then calling.

Change saveCredentials() to use newUser, newPassword.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-25 03:15:52 +09:00
jan Iversen
e92dbe7974 mobile-widgets/qml: clean whitespace in main.qml
Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-25 03:15:52 +09:00
jan Iversen
a4d299e01e mobile-widgets/qml: use showPin/oldStatus consistently
Remove aliases for showPin/oldStatus and reference prefs.showPin/oldStatus directly.

showPin/oldStatus are "temporary" variables, that are not saved in settings,
so they easily be replaced

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24 08:25:51 +09:00
jan Iversen
ab28008679 new mobile login: remove non existing function from CloudCredentials
the function manager.accessingCloud is not defined in QMLManager.h

Remove manager.accessingCloud.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24 08:25:51 +09:00
jan Iversen
1468af3519 new mobile login: remove saveCredentials() from StartPage.qml
The local qml function saveCredentials() in StartPage are not used.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24 08:25:51 +09:00
jan Iversen
5f5d4ffbc9 mobile-widgets/qml: disable global drawer in startpage
Do not show global drawer when user is doing login.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24 08:25:51 +09:00
jan Iversen
9d74b4dc82 mobile-widgets/qml: remove use of eval()
eval() cannot be used in combination with the Qt5 qml compiler,

replace eval() with switch statements.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24 03:52:40 +09:00
jan Iversen
161bedf58d mobile-widget: use qPref variable
change prefs.cloudUserName to PrefCloudStage.cloud_storage_email.

This is slightly more effective (direct instead of indirect), and
reduces the use of prefs.

This is part of limiting the use of prefs. (which is a precessor to
qPref) to the login process, and ultimately remove it.

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:26:29 +09:00
jan Iversen
1dd7d9df3a mobile-widget: correct set of default_cylinder
set_default_cylinder is accepted, because it is defined in Qt Meta system,
however the call is never carried out, because the Q_INVOKE macro is missing

Change PrefGeneral.set_default_cylinder(...) which is a function call
to PrefGeneral.default_cylinder = ... which is a builtin assignment

Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-18 13:26:29 +09:00
jan Iversen
080ddc0df2 mobile/qml: Integrate/activate diveshare in Export
Integrate diveshare in Export
Activate diveshare radio button

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12 21:35:55 -05:00
jan Iversen
dd183eaabf mobile/qml: Clear status field in Export
When opening the saveAsDialog a second time, it contains
the last status from first time.

Clear statusText before calling saveAsDialog

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12 10:10:01 -05:00
jan Iversen
786b0db724 mobile/qml: make close dialog in Connect work
When using Connect, the context is switched, so close()
might or might not work.

Change unqualified close() to qualified uploadDialog.close()

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12 10:10:01 -05:00
jan Iversen
adedfe5965 mobile/qml: remove empty line
Remove empty line that does not make sense.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12 10:10:01 -05:00
jan Iversen
a2717c558a mobile/qml: close upload dialog if success
Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
1d74eb509f mobile/qml: handle upload signals
Add uploadFinish and uploadProgress to Export page

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
5cba410aa6 mobile/qml: close export page after upload
pop from pagestack.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
422bb0da57 mobile/qml: add pref suppport for userid in Export
Handle reading/writing of userid/password settings in the
saveAsDialog and set field to visible when needed.

Activate divelogsde radio button

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
5aba24248f mobile/qml: correct typo in Export.qml
Correct default value for export type.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
190b024bec mobile-widgets/qml: add divelogsde stylesheet to resources
Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11 12:36:43 -05:00
jan Iversen
936362c102 mobile/qml: activate dive_site export in UI
Dive_site export is now implemented in Exportfuncs, so
allow users to select it.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-05 10:11:42 -08:00
jan Iversen
599984d44a mobile-widgets/qml: close Export page after export (or cancel)
Remove page from pageStack, which removes the page from user view.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-05 09:57:06 -08:00
jan Iversen
92b56d0583 mobile-widgets/qml: block profile export (temporary)
The current png generation is intertangled with the desktop
UI, and a shared Webservice needs to be developed.

Block Radiobutton

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
jan Iversen
d2b633b2a8 mobile-widgets/qml: block DiveLogs.de and DiveShare export (temporary)
The current Webservice implementation is intertangled with the desktop
UI, and a shared Webservice needs to be developed.

Block Radiobutton

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
jan Iversen
c6348e96de mobile-widgets/qml: block dive sites export (temporary)
DiveFilter have 2 implementation on or desktop and one for mobile,
the common export function uses DiveFilter (desktop version).

Block Radiobutton

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
jan Iversen
117aa13dbe mobile-widgets/qml: add upload dialog to export page
divelogs.de and diveShare are web uploads, which need a special
custom dialog.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
jan Iversen
093813698c mobile-widgets/qml: add filedialog to export page
All exports are to file except 2 which are upload to web.

Integrate standard qml filedialog for all exports (minus 2).

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
jan Iversen
5307cbc1c7 mobile-widgets/qml: integrate export page in main.qml
Add export function to GlobalDrawer, allowing the user to
export the divelog.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
jan Iversen
578abeda80 mobile-widgets/qml: add export page
Prepare page for exporting the diveLog (feature currently
only in the desktop version).

Add Radiobuttons to select type of export
also add "anonymize button"
and a "explain" text field

Subsurface-mobile does not allow selection of dives, therefore
export will always be all dives

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
jan Iversen
86aa96936a mobile-widgets/qml: add export stylesheets as resource
Add export stylesheets to mobile-resources.qrc to ensure
they get installed.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03 21:30:39 -08:00
jan Iversen
7eda75d7ab mobile-widgets/qml: add qmldir to include map-widget
qml demands all qml files to be in 1 directory, but allows
a "qmldir" file to reference qml files in other directories.

Add qmldir to reference map-widget.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-26 09:44:13 -08:00
Dirk Hohndel
1b058d58f7 Mobile: make it clear that 'all BT devices' setting is temporary
Making this persistant creates a very unpleasant user experience.
And if a dive computer needs this setting, we really want people
to report this to us so we can fix it.

Fixes: #2358

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-22 16:53:29 -08:00
jan Iversen
bd7357238f mobile-widget/qml: correct syntax error introduced in e63257f0e
default parameter values is not supported as this syntax was introduced
in ECMA-262 6th edition while QML only implements the fifth edition
(as of Qt 5.11).

remove default parameter and check for undefined instead.

Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-11 20:44:35 +01:00
Dirk Hohndel
4f0d437f1e Mobile: add ability to directly open support email
This is even easier and more obvious than copying the logs on the About page
and then manually creating an email and pasting those logs.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-10 21:59:32 +01:00
Dirk Hohndel
15674f1a71 Mobile: modify filter so that all models get notified
When we change the filter string, we need to make sure that the collapsed model is
also aware of the change.

Similarly, instead of just calling resetFilter and directly changing the core
data structures, we need to set the filter to the empty string which ensures
that all three models get notified and the view updates correctly.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
20fda8afc3 Mobile: reconnect the correct model after changing filter
This caused a blank, unusable dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
ae27dd77a7 Mobile: consistently refer to the dive list model
The number of different ways we tried to refer to the model made my head spin.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
9e09a7d920 Mobile: ensure there's some space between date and depth/duration
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
8b0f4e65d3 Mobile: use the CollapsedDiveListSortModel for dive list
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
b01e9fb0a8 Mobile: derive the index from the dive id
The previous code assumes that both the vertical dive list and the list of dive
details which allows the horizontal swiping from dive to dive are based on the
same model.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
9d9047d040 Mobile: give visual indication that we are saving dives
Allow showing that the app is busy and showing why at the same time.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
e63257f0e9 Mobile: allow message argument to showBusy function
When called without arguments, no message is shown.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
505ff4032a Mobile: add UI feature tests to Developer menu
Running Subsurface-mobile on iOS, the notification texts are sometimes very
hard to read, and in some situations the busy indicator isn't showing up at
all.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08 20:50:05 +01:00
Dirk Hohndel
f1e7adfedc Mobile: don't dereference the dive list model when it's disconnected
This avoids a bunch of annoying warnings.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-03 04:02:00 -08:00