aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qml
AgeCommit message (Collapse)Author
2018-10-27QML UI: we don't need Controls 2.4Gravatar Dirk Hohndel
In commit 99c06dec3d ("Mobile/filtering: simple busy indicator") we switched to Controls 2.4 which requires Qt 5.11. Revert that one line of the commit as it isn't necessary. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: make busy indicator smallerGravatar Dirk Hohndel
Suggested-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: update number of dives shown when resetting filterGravatar Dirk Hohndel
Otherwise we start showing an illogical '0' there when first opening the filter dialog, and the equally wrong previous count when closing and then re-opening the filter dialog. Reported-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23QML UI: remove some of the log file noiseGravatar Dirk Hohndel
A couple came from this series, others are much older. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: show a better message while waiting for the filterGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: implement the filter update through a threadGravatar Dirk Hohndel
It's important to disconnect the model from the ListView, otherwise the update in a different thread will fail. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: remove redundant busy indicator on dive listGravatar Dirk Hohndel
We should use the global one instead. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: simplify the filter toggleGravatar Dirk Hohndel
Simply make it always reset the filter. There's no point remembering the last filter pattern and explicitly setting it, if the last thing we do is to reset this pattern. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: add properties for dive list model and filter textGravatar Dirk Hohndel
This allows us to modify those from different parts of the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23QML UI: add busy indicator to the main windowGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: clean up whitespace from last commitGravatar Dirk Hohndel
This one does nothing but whitespace - separating it into two commits makes the previous one a lot easier to read. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: add background rectangle for filter rowGravatar Dirk Hohndel
We are still trying to ensure that the filter is indeed shown in front of the dive list. This is working when running on the desktop without the rectangle, but on Android this appears to be needed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: simplify transitionsGravatar Dirk Hohndel
We don't need to toggle visibility, toggling height is sufficient. This dramatically simplifies the transitions. But as a result we need to use the 'enabled' property to reset the filter. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: simple busy indicatorGravatar Dirk Hohndel
Filtering takes a noticeable time on mobile, so lets show the user we are doing something. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: add Settings options for filteringGravatar Dirk Hohndel
Toggle case sensitive and whether or not to include the notes in full text search. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: make sure the header is top-most elementGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: ensure filter input field has focus when shownGravatar Dirk Hohndel
QML's logic for who gets focus is a bit complicated. But forceActiveFocus() cuts through the confusion and makes sure that your field does indeed get focus. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: use margins instead of rectangles to create spaceGravatar Dirk Hohndel
I'm not sure why this had initially failed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: only filter when editing is finishedGravatar Dirk Hohndel
This is a usability / performance tradeoff. I like it better when it filters as I type, but on mobile this may make things feel sluggish. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: reset the filter text when toggledGravatar Dirk Hohndel
This seemed less UI clutter than adding a clear button. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: improve code readabilityGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: animate the filter headerGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: add count of filtered dives to search barGravatar Dirk Hohndel
The count in the trip headers is still that for the complete trip and therefore misleading. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: make the search box an overlayGravatar Dirk Hohndel
This way it stays at the top of the dive list. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: first attempt to filter on dive siteGravatar Jan Mulder
[Dirk Hohndel: this is the starting point of my following commits, I decided to leave it in place to give Jan credit for the work he did on figuring out some of the plumbing needed to get things to work] Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-23Mobile/filtering: add icons for filter and sortGravatar Jan Mulder
Add 2 icons for filter and sort capabilities. And as before, these icons are coming from the Google Material design set. [Dirk Hohndel: Jan's commit forgot to add the actual icons, I added those so the commit matched its message] Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-10-21Mobile UI: make SsrfSwitch resizableGravatar Jocke
Back in 8ab8a67f the checkbox where made resizable. This applies the same functionality to the selector switch and makes the two objects match in vertical size. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-10-12QML, cleanup: remove stackViewGravatar Jan Mulder
There is no reason (any more?) to have a property defined that basically renames the global pageStack into a local pageView. Just cleanup. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-10QML UI: disable rescan when no bluetoothGravatar Jan Mulder
This is cosmetic only. It make no sense to selected rescan when Bluetooth is off. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-10QML UI: do not try to download from DC with empty vendor/productGravatar Jan Mulder
Disable the Download button when one of the fields vendor, product, connection is not filled in. The app will crash when trying. In addition, make the underlying core code to actual download more safe by checking this, and silently fail instead of crash. And, yes, this is a double fix in this scenario, but the core code is used in more places, so better safe than sorry. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-09Mobile/DC download: reset the "Download" buttonGravatar Jocke
When changing to another DC, reset the "Download" button text. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-10-09Mobile/rememberDCs: remove duplicated codeGravatar Jocke
The code to disable a quick button has moved to the DC matching logic, in order to inactivate the correct button also for USB DCs. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-10-09Mobile/rememberDC: update matching logicGravatar Jocke
Update the matching logic to account for known and unknown BT DCs. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-10-09Mobile: factor out syncToCloud [3/3]Gravatar Jan Mulder
After the previous commits, we now have a preference that nicely preserves the state of the UI, and we have the well known git_local_only global, that is used to denote whether we want to use to local repo only, or we want to interact with the online cloud as well. This commit gets rid of the now superfluous syncToCloud logic. Instead we simply set the git_local_only directly. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-09Mobile: preserve auto download status [2/3]Gravatar Jan Mulder
Hook up the new preference to the UI. So now, an earlier choice if automatic or manual download to the cloud is preserved in between sessions. Strictly speaking this fixes issue 1725. Notice that there is also a higly related syncToCloud thing present. As factoring out that seemingly duplicate piece of code is non-trivial, this will be done in a seperate commit. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-09Mobile: no switch to auto cloud in no-cloud modeGravatar Jan Mulder
We disabled the drawer menu button to switch between auto/manual sync when in no cloud mode. Unfortunately, disabeling does not give a visual cue to the user (like greyed out). Instead, just make this button invisable in no cloud mode. In conjunction a question. The manual sync to cloud menu item takes you to the Cloud Credetials page in case pressed in no cloud mode. While valid, this seems strange. This is not changed in this commit. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-07QML UI: set proper active background color for downloaded divesGravatar Jan Mulder
And another simple one. Make the active background of the dowloaded dives follow the theme. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-07QML UI, trivial: set proper background color GPS listGravatar Jan Mulder
The background color was plain white, where we use a slightly different color in other places. In addition, the background when clicking on a row did not follow the theme setting. Consistency fix. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-07QML UI, consistency: add text attribute for all actionsGravatar Jan Mulder
Something I only see on mobile-on-desktop, so at this point in time not very relevant to the device apps. When hovering on the action button, a toast message shows a hint box. These where empty in some cases. So, just give the actions a text attribute where it was missing. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-07QML UI, cleanup: remove usesless ItemGravatar Jan Mulder
Trivial cleanup. A QML Item is intendend for visual items, so embedding a timer in it is plain useless. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-02Mobile: simpify startup logicGravatar Jan Mulder
When starting the mobile app, I noticed a short display of an empty page with title "Cloud creditials" just before showing the divelist. Simply a not nice visual effect. This commit simplifies some logic and resolves this. As the code in this part is fragile, this is tested for normal and clean startup of the app, switching credentials, from no cloud to valid account (which even nicely imports the no cloud dives: this surprised me as I have never seen this working). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-02Mobile: remove all related data when forgetting DCsGravatar Jocke
We need to delete all related data when forgetting dive computers or we will have an issue if we connect a DC from the same vendor but of a different model. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-10-01Mobile download from DC: improve selection logicGravatar Jocke
Improve the logic when auto selecting a DC for download. Some USB cables only supply vendor information but we can select the correct model if we have downloaded from it before. For BT/BLE our discovery process adds the device name to the address, so we need to keep that in mind when we try to match against what we seen before. When we have a positive match for a DC we have seen before we deactivate the corresponding button of our saved DCs. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-10-01Mobile QML UI: bump Kirigami imports to 2.4Gravatar Jan Mulder
Primarily for reasens of keeping up with upstream. And hopefully bugfixes and added functionality. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-01QML UI: clip divedetails ListviewGravatar Jan Mulder
A technically trival commit, but one with long story. This commit basically reverts dd1d90b5295b146e (1.5 year ago). While upgrading Kirigami after Kirigami commit 26b8bdea24c39, we suddenly have overlapping divelist and details pages in case they are both on the pageStack (this occurrs when navigating from divedetails to the divelist using breadcrumb navigation). At this point, its not clear (to me) if this the by design of Kirigami, or an unintended effect of the mentioned Kirigami commit. This all said. Simply clipping resolves our issue of overlapping pages, and it does not harm. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-10-01QML UI: trivial resize of dateboxGravatar Jan Mulder
Something that I simply overlooked earlier with respect to scaling the divelist. The trip databox did scale a bit, but it was not nicely related to the hight of the trip header. So there was a tiny overflow on the small scale on a small device. Fixed here. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-30QML UI: correct trip separator lineGravatar Jan Mulder
Partially cosmetic and partially a bug fix. 1) the seperator line between trips and dives that are not in a trip was drawn in the background color => the line was invisible. 2) When looking very closely, there was a 1-2 pixel wide error between the seperator line between trips and dives that are not in a trip. 3) there was a comment that the trip separator needed to be extra thick. IMHO, this looks ugly, and is superfluous as there is a nice sidebar along the dives that belong to the trip. Finally, the line shall not be displayed when not in a trip. So, basically, the line (the QML rectangle) is completely rewritten, to take care of all issues. There is 1 hack: the line color is taken from the dive separator line. But its fully unclear to me where that color is defined in Qt/QML or Kirigami, so I hardcoded the proper color. That just works. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-30QML UI: center delete from divelist buttonGravatar Jan Mulder
A small cosmetic change. The delete from divelist button was "glued" to the top of the line. Not nice, so just center it vertically, and make the button a tiny bit smaller, so that it fits nicely on the line. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-30QML UI, cleanup: no reason for 2 overlapping mouseareasGravatar Jan Mulder
Fully usure why the code was as it was. The trip header had 2 overlapping mouse areas, to expand the trip and vise versa. Simply remove the smallest one. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-30QML UI, cleanup: do not use iconSizes for unrelated sizingGravatar Jan Mulder
A very unimportant change, but found when looking through the code for places where size of icons where used. The one changed here has nothing to do with icon related placement of a string, so its replaced by a way more logical placement of the affected string. Simply center the "no dives in the dive list" for an empty logbook on the screen, instead of at some random place in the upper left corner. Like I said: very unimportant, but it just looks nicer in the UI. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>