Commit graph

550 commits

Author SHA1 Message Date
Martin Měřinský
a12588ad82 Move DC download icons used by mobile app to mobile-widgets/qml/icons/
Signed-off-by: Martin Měřinský <mermar@centrum.cz>
2018-08-07 09:49:20 -07:00
jan Iversen
8d66633fe7 core: make qPref::cloud_status the only version of the enum
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-07-10 10:30:50 -07:00
Dirk Hohndel
478b5de9e7 QML UI: fix layout of Download page
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-27 16:28:01 -07:00
Dirk Hohndel
f998b59900 QML UI: don't use anchors within Layouts
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-26 03:56:44 +08:00
jan Iversen
ff88e7ee99 mobile: remove MapWidget from mobile-resources.qrc
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-21 20:27:58 -07:00
Dirk Hohndel
7f7e7cf51d QML UI: ensure we track vendor/product for download
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-20 12:07:11 +09:00
Dirk Hohndel
1ccf21f08d QML UI: improve banner in global drawer
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-20 11:50:14 +09:00
Dirk Hohndel
e6835d76cc QML UIL: fix more problems with members moving from manager to prefs
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-20 09:34:27 +09:00
Murillo Bernardes
2466351a5f mobile: use full icon path.
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-18 06:54:40 +09:00
jan Iversen
cc77046db5 mobile: move call to savePreferences back to manager.
calls to savePreferences was moved to prefs. in
b8eb348f54, but the corresponding
C++ code was not merged.

Revert call to savePreferences to manager.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-18 06:52:59 +09:00
jan Iversen
a24f0d3107 mobile: revert e993d4f005
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-18 06:37:01 +09:00
Dirk Hohndel
ca84d96a50 QML UI: show the cloud credentials in the global drawer banner
This is an additional side-benefit of rolling our own banner.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-18 06:32:23 +09:00
Dirk Hohndel
c8ef3d7924 QML UI: build our own icon and header for global drawer
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-18 06:32:23 +09:00
Dirk Hohndel
238d47710e Whitespace cleanup
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-06-18 06:32:23 +09:00
jan Iversen
74ee577357 mobile: add Dark_gps.svg
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-17 19:42:16 +09:00
Murillo Bernardes
fed2a283b2 mobile: fix reference to credentialStatus property
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-16 04:01:49 -07:00
Dirk Hohndel
16d7620e21 QML UI: fix variable reference
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-16 11:19:49 +09:00
jan Iversen
b8eb348f54 mobile: move settings from qmlmanager to qmlprefs
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-15 14:12:14 -07:00
jan Iversen
d0e9f62624 mobile: add qmlprefs class
add class to cmake and pro
register class

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-15 14:12:14 -07:00
jan Iversen
13b9c7a822 Mobile: correct wrong C++ ref in qml
change data() to manager.
correct comboDevice -> comboConnection

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-11 09:43:32 -07:00
jan Iversen
807571a588 core: update deviceData default from qml
remove setting default in qml to C++

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 21:19:46 +02:00
jan Iversen
f7e8f21245 mobile: remove context icons
Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 20:54:10 +02:00
jan Iversen
eaaf0fc431 mobile: remove png/svg icons not used
Delete icons that are taken from kirigami

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 19:48:36 +02:00
jan Iversen
e993d4f005 mobile: do not call plotDive during startup
Check in profile if visible before calling plotDive

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:16:53 +02:00
jan Iversen
0acda9a509 mobile: white space clean in DiveDetailsView.qml
Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-09 17:16:53 +02:00
jan Iversen
64c0881e9f mobile: decoupled ssrf.qrc and mobile.qrc
remove /subsurface.qrc from .pro
copy missing mapwidget icon references to mobile-resources.pro

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08 17:04:43 +02:00
jan Iversen
f7fde20a2c mobile: main.qml, change load of dive.jpg
change load of dive.jpg to reflect new location.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08 17:04:43 +02:00
jan Iversen
cee754f200 mobile: mobile unreferenced ic icons
Remove 24px icons not referenced.
update README.license

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08 17:04:43 +02:00
jan Iversen
92b505be72 mobile: remove unneeded alias from mobile-resources
remove alias where alias == file
rename *24px* icons and remove alias

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08 17:04:43 +02:00
jan Iversen
1c9bd08d55 mobile: clean qml dir (move dive.jpg to icons)
Cleanup qml dir by moving dive.jpg to the icon dir

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08 17:04:43 +02:00
jan Iversen
552f625e52 mobile: sort mobile-resources.qrc
Sort to make it easier to read.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-08 17:04:43 +02:00
jan Iversen
487a4b2c32 mobile: correct comboProduct if model changes
update  onModelChanged in comboProduct to read the
current index

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-07 18:43:56 +02:00
jan Iversen
03f30f6281 mobile: delay combobox selection for download.
Set index of comboboxes in Download screen when the page
becomes visible instead of when it is created.

The pages is created before QBluetoothDeviceDiscoveryAgent on iOS and desktop,
therefore combobox indexes cannot be set during page creation.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-06-04 10:27:13 -07:00
Murillo Bernardes
424efb7720 mobile: make list action buttons appear again
Dive list: on holding an item, the delete button
was not showing the icon.

Show GPS fixes: when swiping an item icons were
not being shown.

Partial for bug #1267

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-27 16:58:17 -07:00
jan Iversen
f265504dab mobile: Adjust About.qml to fit small screens.
Adjust size of image and text to ensure that
the clipboard buttom is (nearly) always visible

The buttom is not directly visible in landscape
mode on a small device.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-27 08:07:52 -07:00
jan Iversen
4a872f74a4 iOS: updated text in About to reflect logs not log
Both subsurface.log and libdivecomputer.log are on the clipboard.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21 07:57:14 -07:00
jan Iversen
571965ec6d mobile: removed setting for libdivecomputer.log
Users need a simple way to report download problems. Asking them
to go into settings, activate logging, and repeat the download
is too much.

libdivecomputer.log will always be generated, but overwritten, with every
download, so the latest log is ready.

The download is very slow due to BT, so there are no impact of having the log
active, neither in terms of size (a concern on small mobiles) or write time.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-21 07:57:14 -07:00
jan Iversen
4c8ed5a5ae QML UI: allow changing the connection ID
When downloading with bluetooth, changing connection did not work.
The new selection was not passed to the download thread.

Fixes #1274

Signed-off-by: Jan Iversen <jani@apache.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-05-20 11:35:28 -07:00
jan Iversen
a181020b19 mobile: add "Copy log to clipboard" button
on iOS it is practically impossible to copy the App log
to e.g. a mail! in iOS 11 the log file is stored within
the subsurface container and you first need to copy (actually
using the clipboard) out from there to the "normal" document
shared space, before it can be used.

At least iOS users (and I believe Android users) are not really
used to work with files, so the process is not easy to document
in an understandable way.

The alternative is to provide a button, which simply puts the
log on the general clipboard, allowing it to be pasted in a
multitud of applications.

Signed-off-by: Jan Iversen <jani@apache.org>
2018-05-18 12:43:15 -07:00
Murillo Bernardes
6b4e830670 mobile: fix next icon prefix
Icons used directly by Kirigami use /org/kde/kirigami
as prefix. Ex: previous and next icons on header.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-13 13:18:01 -07:00
Murillo Bernardes
944de155d7 iOS: fix "previous" button icon
Icons used directly by Kirigami use /org/kde/kirigami
as prefix. Ex: previous button on the GlobalDrawer.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-13 13:18:01 -07:00
Murillo Bernardes
f4a9571da5 mobile: show selected dive on details view
Call positionViewAtIndex in order to make the selected dive
visible.

Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2018-05-09 06:32:20 +02:00
Dirk Hohndel
d2d46d848a QML UI: fix incorrect icon references
Not sure why this has worked in the past - it was simply wrong.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16 18:57:08 -07:00
Dirk Hohndel
bb03bd862b QML UI: ensure delegate height is not a fraction
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16 14:11:31 -07:00
Dirk Hohndel
c1bcba46f0 QML UI: dive list performance: enable caching
We had turned this off since it caused rendering issues, but that
appears to be fixed now - and it should help to get us smoother
rendering of the dive list.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16 14:11:22 -07:00
Dirk Hohndel
95c9a505c6 QML UI: dive list performance: no background rectangle
This is one of the suggested performance enhancement to reduce redundant
painting.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16 14:10:04 -07:00
Dirk Hohndel
2529529ff9 QML UI: make the code easier to read
And maybe this will make it faster as well? Depends on how the binding
is implemented, I guess.
But at least it's less confusing to read now.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16 09:40:14 -07:00
Dirk Hohndel
f8742a48b2 QML UI: show offline notice when going offline
The logic was backwards and showed the notice when the user switched to
auto sync mode.

Fixes #1204

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16 08:12:56 -07:00
Dirk Hohndel
6b9a1f3850 QML UI: change auto cloud sync menu texts
This way the menu items describe what happens when you tap on that menu
item.  That seems more consistent and intuitive.

See #1204

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-16 08:08:24 -07:00
Dirk Hohndel
e10b252153 QML UI: suppress warnings when showing GPS fixes
Kirigami gets unhappy if a SwipeListItem isn't named listItem.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-04-15 18:27:02 -07:00