aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
AgeCommit message (Collapse)Author
2017-06-11Add a messageHandler to take care of qDebug & friends on QMLGravatar Tomaz Canabrava
all qDebug / qCDebug and friends now will be properly logged into developer -> log, on QML. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> 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>
2017-05-28QML UI: stub out saving downloaded divesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28QML UI: add some DC Download info to AppLogGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28QML UI: fix typo in component idGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-28QML UI: remove code that's commented outGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: use QtQuick.Controls 2.0 everywhereGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: add the Downloaded Dive ModelGravatar Tomaz Canabrava
Still to do: - select the dives to save - record the downloaded dives but download is already working. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: add the DownloadThreadGravatar Tomaz Canabrava
For this I had to also make the DCDeviceData accessible, and for that it needed to be a pointer. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: Fill the product listGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: show the VendorList on the Download from DCGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: fix the layout for the Download from DCGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-05-27QML UI: initial code for Download from Dive ComputerGravatar Tomaz Canabrava
Add a new action on the drawer to display the Download from Dive Computer options. Nothing works yet. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-29Add SPDX header to mobile widgets and QML filesGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-15QML UI: fix broken delete from dive details pageGravatar Dirk Hohndel
Trying to close the non-existing context drawer caused the function to abort (and consequently not to delete the dive). Fixes #309 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-15QML UI: fix GPS list renderingGravatar Dirk Hohndel
There was an extra BasicListItem inside the SwipeListItem. This commit just removes 5 lines, the rest is indentation change. Fixes #312 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML UI: reset completion fields when adding diveGravatar Dirk Hohndel
Otherwise the last value in those fields might still be shown. Also, set up the cylinder completion. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML UI: better simulation of onPressed in TextFieldGravatar Dirk Hohndel
Prior to Qt Quick Components 2.1 there was no onPressed signal for a TextField; in order to be able to build against Qt 5.7 (which comes with Qt Quick Components 2.0) we need to work around the lack of this signal. This code seems to do a pretty good job at simulating it. My attempt in commit 73c66e1d7d9f ("QML UI: make run with Qt 5.7 again") didn't work so well. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML UI: don't populate hints texts when adding diveGravatar Dirk Hohndel
If we don't have values for the HintsTextEdit fields, don't show any values. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML UI: correctly render dive list when showing delete buttonGravatar Dirk Hohndel
This fixes the visual artifact that Willem reported. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML UI: keep the fontMetricGravatar Dirk Hohndel
We reference it elsewhere. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML UI: don't shrink fonts on narrow displaysGravatar Dirk Hohndel
Now that wrapping should work correctly, this isn't necessary any more. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML UI: make run with Qt 5.7 againGravatar Dirk Hohndel
onPressed needs to be relative to Keys in Qt 5.7. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-14QML-UI: remove references to download from divecomputerGravatar Dirk Hohndel
This needs to be reimplemented. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-13QML UI: add 2cm x 2cm square to theme test pageGravatar Dirk Hohndel
This should make it easier to spot displays that are completely out of whack in their scaling. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-13QML UI: only assign actions in a declarative wayGravatar Marco Martin
Assigning actions in an imperative way on component complete, seems to cause a crash on some devices, assign declaratively the whole list instead, hiding the gps related actions on iOS as they are not supported on that platform. Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-11QML UI: re-layout the details viewGravatar Dirk Hohndel
This is a different take that seems to deal much better with different width and font size combinations. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-10QML UI: correctly set grid column widthsGravatar Dirk Hohndel
Spending more time reading the documentation, we need to set the Layout.maximumWidth, not the width. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-04QML UI: fix saving fields using HintsTextEditGravatar Marco Martin
The editText property is not there anymore, we need text Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-04QML UI: dialog of HintsTextEdit on topGravatar Marco Martin
Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-03QML UI: ensure actions are set up for Credentials pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-03QML UI: use a scrollable page for StartPageGravatar Marco Martin
Fixes scrolling of the cloud credentials and simplifies code Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-04-01QML UI: replace combobox with custom text field with hintsGravatar Marco Martin
Signed-off-by: Marco Martin <notmart@gmail.com>
2017-04-01QML UI: Fully port dive edit to Kirigami2Gravatar Marco Martin
Completely adapt to the api changes of OverlaySheet in Kirigami2 in order to achieve the same look and behavior for the dive edits that had with kirigami1 Port most components to QtQuickContrls2, except comboboxes in the dive edit sheet that will need a new control type Signed-off-by: Marco Martin <notmart@gmail.com>
2017-03-24Subsurface-mobile: do send decimal GPS to GoogleGravatar Jan Mulder
Sending nicely readable formatted coordinates to Google Maps does not result in a correctly positioned map. Google likes unreadable decimal format. Little hacky solution. Added a gps_decimal attribute, populate that with the standard function for format a coordinate to string, but reset the preferences value temporarly so that it always converts it to decimal style. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-24mobile: the infamous enumerate problemGravatar Jan Mulder
This fix seems to fix the enumerate problem: the problem that on a seemingly non-determinstic way, all the profiles get enumerated and rendered, causing freeze of the app, or even crash due to out of memory. Only 3 lines of code change, but this fix did not come easy. The enumerate problem seems some kind of race condition between QML, Kiragami and most definitely, the Subsurface QML code itself. The breakthrough in my debugging was the setting of highlightRangeMode: ListView.StrictlyEnforceRange based on the QML documentation on snapMode: enumeration. This fix deserves proper testing in multiple environments. As could be seen on the developpers mailing list, I was (easily) able to reproduce the enumerate problem, but Rick was not. So I definitely do not claim to understand why this fix solves the issue for me. And as a sidenote: fixes #263 for me as well. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2017-03-18QML UI: enable caching of the details viewGravatar Dirk Hohndel
This way the dive on either side should be cached. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: don't explicitly position viewGravatar Dirk Hohndel
Instead have the view follow the currentItem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: don't unset the currentIndex in the dive listGravatar Dirk Hohndel
It's unclear why this code was added in the first place - removing it makes the highlight of the selected dive in the dive list work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: don't clipGravatar Dirk Hohndel
At least that's what the QML documentation recommends. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: small cleanupsGravatar Dirk Hohndel
Remove unused signal handler. Small whitespace cleanup. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-03-18QML UI: don't access members of undefined objectsGravatar Dirk Hohndel
If we don't have a currentItem, don't try to access its members. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>