aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml/DownloadFromDiveComputer.qml
AgeCommit message (Collapse)Author
2017-12-13mobile: reset download screen in a sane stateGravatar Jan Mulder
Set download srceen in a sane state after a previous download session using this screen. The erroneous behavior was very similar to the one fixed in commit 7fe9bbe295dcf92. For example, download some dives, quit the screen, go back, and the bottom buttons are still selectable. This commit resets some values when leaving the download screen (ie. not only swiping it away), so that it looks sane at a next visit. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-12-13mobile: reset Retry button to DownloadGravatar Jan Mulder
Reset the Retry button on exit of the Download from divecomputer page. So, it it not reset wehen swiping this page away, or cancelling a running download, but resetting it on accepting downloaded dives. As we do not have real error reporting (from download failures), this all is a little arbitrary. Another "fix" could be, not changing the button text at all. Further notice, this is not specific iOS, but also Android. Fixes: #895 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-12-07Show BT device names firstGravatar Robert C. Helling
Show them left of address (so they are in the user's view) rather than on the right. Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-05Add button to rescan BT devicesGravatar Robert C. Helling
Otherwise the divecomputer has to be in pairing mode at app start time. Unfortunately, this leaves less space for the progress message. My time/qml knowledge does not suffice to move that to the next line (when moving that out of the RowLayout it overlaps with the buttons). Signed-off-by: Robert C. Helling <helling@atdotde.de>
2017-12-02iOS: check for UUID instead of physical addressGravatar Murillo Bernardes
on iOS the address we display on Connection is an UUID, not a physical address. This change the pattern (on iOS) used to enable bluetooth_mode. Signed-off-by: Murillo Bernardes <mfbernardes@gmail.com>
2017-11-19QML UI: Kirigami to 2.2Gravatar Jan Mulder
When first tested this commit, especially the dive list was looking terrible. However, after including newer SHA's from libkirigami, and correcting lots of spacing/margin issue, a retest of this commit shows no strange artifact any more, and the amount of warnings in the log output is reduced significantly. So now, it appears save to upgrade. Notice that main.qml still uses Kirigami 2.0. and is not updated in this commit. With version 2.2, there is a new way of theming, that is not (yet) compatible with our current code. Blindly upgrading to 2.2 leads to a almost black dive list, wrong button colors, and runtime errors in the log, due to the fact the direct setting from QML Kirigami's Theme colors is not allowed any more. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-27QML UI: prevent full overflow of bottom buttonsGravatar Jan Mulder
A not perfect improvement, but way better IMHO. Prevent the list of downloaded dives to grow over the buttons at the bottom. Just a simple change by adding a bottomMargin to the list. Notice that there is still some overlap, but for now I consider this a trade-off between the scarce screen real-estate and the wish to present and much as possible dowloaded dives. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-19QML-UI: Download screen fixupGravatar Jan Mulder
Again, mostly related to label change. First, the top button was "glued" to the top of the screen, so added a little margin there. It appeared that all the other items on the screen (progressbar, 2 button rows, and the downloaded dive list) where not moving down due to the add of that little top margin. This was solved by anchor-ing the items together. Finally, the text of a downloaded dive was on the top of the delegate lines. Not sure where that came from, but easily solved by centering it explicitly. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-17mobile: silence deprecated messages in logging about Kirigami.LabelGravatar Jan Mulder
Commit 8f6827ab122 brought a new SHA for Kirigami, but that introduces a very noisy logging of "Kirigami.Label is deprecated. Use QtQuickControls2.Label instead". So, thats what done here. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-10-12mobile: enable switching BT on/off during session.Gravatar Jan Mulder
This commit implements possible switching BT on and off during a session, so not needing a restart of the app when the user forgot to switch it on when starting the app. For this, the following needed to be done: 1) create a handler that reacts on local BT device status changes. 2) repopulate the connection list in the download screen when a BT status change is detected. Notice the subtile change of the Q_INVOKABLE btEnabled() function to a Q_PROPERTY. This gives a nice dynamic behaviour when switching BT on/off with the app open. Fixes: #556 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-08-26Adjust signature to match data we needGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-26QML UI: replace button on DC download pageGravatar Joakim Bygdell
Replace the generic buttons on the DC download page with our own. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-23QML UI: Download from DC: tell user if BT is disabledGravatar Dirk Hohndel
This makes much more sense than displaying "No dives" Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-23QML UI: Download from DC: move label next to buttonsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-23QML UI: remove obsolete commentGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-22QML UI: Download from DC: remove unused propertyGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-19QML UI: fix some obvious UI errorsGravatar Jan Mulder
Fixes: #490 items 1) and 2). 1) Reference to isBluetooth.leftPadding is removed as the isBooltooth checkbox is gone. 2) Do not set background color of downloaded dives. The checkbox is used to denote "selected or not". In addition, incorrect references to subsurfaceTheme.PrimaryColor (which does not exist) are replaced by the correct subsurfaceTheme.primaryColor. Finally, an obvious copy/paste error width: childrenRect.height. that is supposed to be width: childrenRect.width. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-19QML UI: Allow cancel of ongoing downloadGravatar Jan Mulder
This commit adds the capability to cancel a running download from DC. The actual cancel is fully handled in the underlying libdivecomputer code. As the user may be interested in the dives downloaded up to the moment of cancel, do not just close the download screen (as it was before this commit). Now, the <quit> button changes to <cancel> when the download is started, and pressing cancel, only cancels the download and does not close the download screen, but presents the so far downloaded data. When no download is running, the <quit> button just quits the screen as before. Fixes: #485 Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-07-18QML UI: Download from DC: remove Bluetooth checkboxGravatar Dirk Hohndel
The connection already clearly defines whether this is Bluetooth or not. No reason for the separate checkbox. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-18QML UI: Download from DC: smaller font for connectionGravatar Dirk Hohndel
Also style all three drop downs the same (otherwise the left edge of the text doesn't align). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-18QML UI: remove the Paired Bluetooth Devices virtual vendorGravatar Dirk Hohndel
We now actually handle connections in a sane manner and don't need that workaround anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-17QML UI: automatically set the Bluetooth checkboxGravatar Dirk Hohndel
I wonder if we even need this anymore at all as the connection clearly determines whether this is a BT download or not. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-17QML UI: only change connection when finding a matchGravatar Dirk Hohndel
If we can't find a match, just leave it unchanged. This way, if we mis-recognize a device, the user can correct the product (or even vendor) without losing the correct connection. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-16QML UI: show the connection choices in Download UIGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-12QML UI: only offer BT checkbox if BT is availableGravatar Dirk Hohndel
Right now we need to restart Subsurface-mobile in order to detect Bluetooth devices - so simply turning on BT after Subsurface-mobile was started is not sufficient. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09QML UI: correctly wrap devinfo messageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09QML UI: show progress messages on the download pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09QML UI: Download from DC: disable misleading UI elementsGravatar Dirk Hohndel
These buttons only work when we successfully downloaded a dive. Also, don't show a list of dives when there are no dives. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-07-09QML UI: Style the BT download checkboxGravatar Joakim Bygdell
Style the checkbox to the themes primary color Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-07-09QML UI: Style DC download buttonsGravatar Joakim Bygdell
Style the button in the DC download dialog so they follow the theme colors. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-06-25QML UI: Download from DC: move accept button to the rightGravatar Dirk Hohndel
So it doesn't conflict with the hamburger menu button / opening the global drawer. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-25QML UI: Download from DC: avoid assignments of undefined valuesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-25QML UI: DC Download progress indicatorGravatar Dirk Hohndel
For now just do an indeterminate busy indicator - we can get more fancy and use the libdivecomputer progress event, later. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-21QML UI: attempt to add dark themeGravatar Dirk Hohndel
This isn't great, yet, but a first step to show that this is possible (and in doing so I found quite a few spots where the colors weren't correctly propagating, yet). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-16QML UI: clear the previous list when downloadingGravatar Dirk Hohndel
When you start a new session with Download from DC, clear out the table from the last attempt before adding the page. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-13QML UI: small fix and whitespace cleanupGravatar Dirk Hohndel
In the JS code we should use assignment with '='. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12Mobile: wrap up fixes for BT download on AndroidGravatar Jan Mulder
Major functional change in this commit is the addition of found static BT devices to the internal administration (on Android), in a way that is equivalent to mobile-on-desktop. So, in both cases, the list of devices in the app are as in the list of devices on the host OS (Linux or Android). To minimize code duplication, the btDeviceDiscovered slot is split in two parts, the part to act as slot for the Qt BT discovery agent (Linux, so mobile-on-desktop), and the part only needed for Android. Remaining to be fixed: the correct handling of the QML UI selection of vendor/product. The first default dive computer is correctly detected, all paired devices from the virtual vendow can be selected, but clicking through vendors results in non logical selections. It is obvious why this is, but a fix is not straigforward at this point. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12Mobile: add BT name to vendor/product capabilityGravatar Jan Mulder
This adds a central function to convert a BT name to a vendor/product pair known to Subsurface. This allows interfacing from a paired BT dive computer, without actively selecting its type, but by selecting it from the list of paired BT devices. So, after this, downloading from multiple (paired) DCs is also possible. And not the niced piece of code ... Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12QML UI: add internal admin for virtual vendorGravatar Jan Mulder
Added a list of paired BT devices for the "Paired BT Devices" vendor. The devices under this vendor represent all BT devces that can be found from the local BT interface. Some special processing is required, as the BT provided data is (obviously) missing the specific data needed to open a BT device using libdc code. This processing is not in this commit, but will follow. This commit is preparation for that. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-12QML UI: call correct function for BT addressGravatar Jan Mulder
After the recent refactoring of QMLManager to btdiscovery, the manager.getBtAddress() got superseeded by downloadThread.data().getDetectedDeviceAddress(). Corrected this here. Futher some debug output is modified, so that it report the proper function names. This corrects the download from an automatically detected OSTC 3. Manul selection of the same device from the fake vendor "Paired BT Devices" does not work, however. Still work to be done in that area. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-11QML UI: move BT handling into core codeGravatar Dirk Hohndel
This shouldn't be part of the UI (qmlmanager), but part of our overall handling of dive computers and BT devices. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-11QML UI: correctly set up the divecomputer for downloadGravatar Dirk Hohndel
If we find a paired BT divecomputer, this will populate vendor and product correctly for that device. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-06-04QML UI: show selection box on the Download from DC listGravatar Tomaz Canabrava
QML and C++ model don't interact too much, a new Rule should be created and used on the QML Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-31QML UI: use the BT address of the first dive computer foundGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: populate dive computer vendor and productGravatar Dirk Hohndel
If we detected a BT dive computer, we can already set up the vendor and product for it (as well as the new BT checkbox). Oddly, in my tests this doesn't set up the product correctly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: remove unused layoutGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: select / unselect dive by clicking on itGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: add DownloadDiveDelegateGravatar Tomaz Canabrava
A delegate to display the dives in a better way, based on the code from DiveList.qml Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-29QML UI: remove unused item on the interfaceGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28QML UI: add downloaded dives to dive listGravatar Dirk Hohndel
This already takes into account which of those dives were selected. Right now all we have is select all or none - this needs actual support in the UI, but once that's there, it will just work (famous last words). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>