summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
2019-12-24build-system: move exportfuncs to backend-sharedGravatar jan Iversen
WARNING: multi directory commit, needed to secure it builds. move the core/exportfuncs.* to backend-shared. update backend-shared/CMakeLists.txt to generate backend-shared lib update CMakeLists.txt to include backend-shared lib in link process. update ios project to reflect new directory Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24mobile-widgets/qml: use showPin/oldStatus consistentlyGravatar jan Iversen
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-24new mobile login: remove non existing function from CloudCredentialsGravatar jan Iversen
the function manager.accessingCloud is not defined in QMLManager.h Remove manager.accessingCloud. Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24new mobile login: remove saveCredentials() from StartPage.qmlGravatar jan Iversen
The local qml function saveCredentials() in StartPage are not used. Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24mobile-widgets/qml: disable global drawer in startpageGravatar jan Iversen
Do not show global drawer when user is doing login. Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24mobile-widgets: limit use of QSettings in qmlmanagerGravatar jan Iversen
Replace QSettings for userName/Password/credentials with proper qPrefCloudStorage calls Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-24build-system: Add CMakeLists.txt to mobile-widgetsGravatar jan Iversen
In order to make the central CMakeLists cleaner and more consistent add a CMakeLists.txt to mobile-widgets, like in other root directories. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-24mobile-widgets/qml: remove use of eval()Gravatar jan Iversen
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-18mobile-widget: use qPref variableGravatar jan Iversen
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-18mobile-widget: correct set of default_cylinderGravatar jan Iversen
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-13core: remove LOG_STP from mobileGravatar jan Iversen
LOG_STP is on longer providing the data needed, since a lot of the startup is indirectly in QML, furthermore using the xcode project and running profiler gives much more detailed information Signed-off-by: Jan Iversen <jani@apache.org>
2019-12-12mobile/qml: Integrate/activate diveshare in ExportGravatar jan Iversen
Integrate diveshare in Export Activate diveshare radio button Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12mobile-widgets: activate uploadDiveShare in qmlmanagerGravatar jan Iversen
Remove "TO BE IMPLEMENTED" and add call doUpload Connect signal to signal in QMLManager to avoid registring the upload class. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-12mobile/qml: Clear status field in ExportGravatar jan Iversen
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-12mobile/qml: make close dialog in Connect workGravatar jan Iversen
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-12mobile/qml: remove empty lineGravatar jan Iversen
Remove empty line that does not make sense. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile/qml: close upload dialog if successGravatar jan Iversen
Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile/qml: handle upload signalsGravatar jan Iversen
Add uploadFinish and uploadProgress to Export page Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile-widgets: make upload signals available to QMLGravatar jan Iversen
Connect signal to signal in QMLManager to avoid registring the upload class. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile/qml: close export page after uploadGravatar jan Iversen
pop from pagestack. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile/qml: add pref suppport for userid in ExportGravatar jan Iversen
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-11mobile-widgets: activate uploadDiveLogsDE in qmlmanagerGravatar jan Iversen
Remove "TO BE IMPLEMENTED" and add call doUpload Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile/qml: correct typo in Export.qmlGravatar jan Iversen
Correct default value for export type. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-11mobile-widgets/qml: add divelogsde stylesheet to resourcesGravatar jan Iversen
Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-05mobile/qml: activate dive_site export in UIGravatar jan Iversen
Dive_site export is now implemented in Exportfuncs, so allow users to select it. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-05mobile-widgets/qml: close Export page after export (or cancel)Gravatar jan Iversen
Remove page from pageStack, which removes the page from user view. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-04Selection: move selection functions from divelist.c to selection.cGravatar Berthold Stoeger
Since we now have a selection.c translation unit, put the selection- related functions there. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-12-03mobile-widgets/qml: block profile export (temporary)Gravatar jan Iversen
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-03mobile-widgets/qml: block DiveLogs.de and DiveShare export (temporary)Gravatar jan Iversen
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-03mobile-widgets/qml: block dive sites export (temporary)Gravatar jan Iversen
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-03mobile-widgets/qml: add upload dialog to export pageGravatar jan Iversen
divelogs.de and diveShare are web uploads, which need a special custom dialog. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03mobile-widgets/qml: add filedialog to export pageGravatar jan Iversen
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-03mobile-widgets/qml: integrate export page in main.qmlGravatar jan Iversen
Add export function to GlobalDrawer, allowing the user to export the divelog. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03mobile-widgets/qml: add export pageGravatar jan Iversen
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-03mobile-widgets/qml: add export stylesheets as resourceGravatar jan Iversen
Add export stylesheets to mobile-resources.qrc to ensure they get installed. Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-12-03mobile-widgets: add export functionality to qmlmanagerGravatar jan Iversen
Add enum with different export types (used to signal which type of export QML desires). Add QML export functions (one for file and one for upload to web) Signed-off-by: Jan Iversen <jan@casacondor.com>
2019-11-26mobile-widgets/qml: add qmldir to include map-widgetGravatar jan Iversen
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-22Mobile: make it clear that 'all BT devices' setting is temporaryGravatar Dirk Hohndel
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-11mobile-widget/qml: correct syntax error introduced in e63257f0eGravatar jan Iversen
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-10Mobile: add ability to directly open support emailGravatar Dirk Hohndel
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-09Cylinders: access cylinders with get_cylinder()Gravatar Berthold Stoeger
Instead of accessing the cylinder table directly, use the get_cylinder() function. This gives less unwieldy expressions. But more importantly, the function does bound checking. This is crucial for now as the code hasn't be properly audited since the change to arbitrarily sized cylinder tables. Accesses of invalid cylinder indexes may lead to silent data-corruption that is sometimes not even noticed by valgrind. Returning NULL instead of an invalid pointer will make debugging much easier. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-09Core: remove MAX_CYLINDERS restrictionGravatar Berthold Stoeger
Instead of using fixed size arrays, use a new cylinder_table structure. The code copies the weightsystem code, but is significantly more complex because cylinders are such an integral part of the core. Two functions to access the cylinders were added: get_cylinder() and get_or_create_cylinder() The former does a simple array access and supposes that the cylinder exists. The latter is used by the parser(s) and if a cylinder with the given id does not exist, cylinders up to that id are generated. One point will make C programmers cringe: the cylinder structure is passed by value. This is due to the way the table-macros work. A refactoring of the table macros is planned. It has to be noted that the size of a cylinder_t is 64 bytes, i.e. 8 long words on a 64-bit architecture, so passing on the stack is probably not even significantly slower than passing as reference. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2019-11-08Mobile: modify filter so that all models get notifiedGravatar Dirk Hohndel
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-08Mobile: reconnect the correct model after changing filterGravatar Dirk Hohndel
This caused a blank, unusable dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08Mobile: consistently refer to the dive list modelGravatar Dirk Hohndel
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-08Mobile: ensure there's some space between date and depth/durationGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08Mobile: use the CollapsedDiveListSortModel for dive listGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08Mobile: setup CollapsedDiveListSortModelGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2019-11-08Mobile: derive the index from the dive idGravatar Dirk Hohndel
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-08Mobile: give visual indication that we are saving divesGravatar Dirk Hohndel
Allow showing that the app is busy and showing why at the same time. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>