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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>