aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile/qml
AgeCommit message (Collapse)Author
2016-02-08QML UI: correctly handle back key on editsGravatar Dirk Hohndel
This requires mobile components that include commit 03c868fc57e5 from earlier today. With this a single press on the back key cancels the edit and a second press on the back key brings you up one level in the page stack (usually back to the dive list). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-08Move preferences under GPS menuGravatar Miika Turkia
Since we currently only have preferences that affect the GPS functionality, it might be more logical to have the preferences under GPS menu. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07Avoid QtCreator warning about ==Gravatar Henrik Brautaset Aronsen
Warning M126: == and != may perform type coercion, use === or !== to avoid it Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07Move endEditMode() to DiveDetails.qmlGravatar Henrik Brautaset Aronsen
Having endEditMode() in main.qml seemed wrong somehow. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07Add top-right edit and back buttons for mobileGravatar Henrik Brautaset Aronsen
Adds a back button in edit mode, and an edit button for view mode. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07QML UI: another attempt to fix the random crashesGravatar Dirk Hohndel
I finally was able to reproduce the crashes with the infinite recursion when computing a GridLayout. This seems to be triggered by competing Layout.fillWidth settings that the layout engine couldn't figure out how to accomodate. I did three things to make this work better: - explicitly grab the columnWidth for the width of the DiveDetailsView. - split the GridLayout in two so the area above and below the profile are no longer forced to fit in the same column widths. - remove most of the Layout.fillWidth settings and only leave a couple that seem sufficient to get reasonable on screen layout in my experiments. Here's hoping that this one is finally resolved. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07QML UI: disable download from divecomputer button on start pageGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-07Revert "QML UI: end edit mode when leaving the edit page"Gravatar Dirk Hohndel
This reverts commit d2928a137cabab30973a96a71beee9fd840db516. The presence of this Action causes crashes for one of the testers. Which is utterly ridiculous.
2016-02-06QML UI: end edit mode when leaving the edit pageGravatar Dirk Hohndel
This should fix the problem when using the back key to exit the edit page. Requires a patch to the mobile components that isn't upstream, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-05QML UI: enable editing of weightGravatar Dirk Hohndel
But only if there is only one weight system defined in the dive. Otherwise display a read only text that explains that this cannot be edited. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-05QML UI: explicitly hide the keyboard when exiting dive editGravatar Dirk Hohndel
If you save or cancel the dive edit, the keyboard should be closed. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-05QML UI: disable download from divecomputerGravatar Dirk Hohndel
This is not hooked up, yet, and would likely only confuse potential testers. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-03Mobile. Modify DownloadFromDiveComputer.qmlGravatar Willem Ferguson
1) Create space for sillybutton at bottom of screen 2) Reformat columns in tableview 3) General cleanup and simplification of code. Signed-off-by: Willem Ferguson <willemferguson@zoology.up.ac.za> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-02-01QML UI: Another attempt to shift dive number to top rowGravatar Rick Walsh
Commit 1030cb265a46436a1903cdf66d88a7dd3351d3aa 'QML UI DiveDetailsView: shift dive number to right of top row' was reverted because it caused mysterious crashes for some testers, inferred to be related to sizing items in a gridLayout. This patch brings the dive number back up to the right of the top row, so the page width doesn't exceed the screen width. Using text wrapping should prevent the date text and dive number items from increasing in width, and hopefully avoids the mysterious crashes. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-31Revert "QML UI DiveDetailsView: shift dive number to right of top row"Gravatar Dirk Hohndel
This reverts commit 1030cb265a46436a1903cdf66d88a7dd3351d3aa. Simply trying to find out if this is the cause for the odd crashes one tester is seeing.
2016-01-29Minor cleanupsGravatar Dirk Hohndel
Improve readability of the code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29QML UI: introduce "add" state and correctly clean up when canceledGravatar Dirk Hohndel
Adding a dive is just like editing it, except that canceling the operation has different consequences. Instead of trying to figure this out by some inference on other state, let's just make it explicit and then clean up after ourselves if the user canceled a manual dive add. This also switches to use the properties that we defined in order for the main menu to be able to setup these values. Makes the code easier to read and is more consistent. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-29QML UI: remove apparently obsolete codeGravatar Dirk Hohndel
I couldn't make sense of either the code nor the comment, so I tried what broke when I removed it. Nothing that I could find. So maybe we don't need this after all? Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: better way to determine dive details edit widthGravatar Dirk Hohndel
Instead of passing magic values around, calculate the columnWidth as part of the SubsurfaceTheme object. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: once again hide "--" as section headerGravatar Dirk Hohndel
The fix for correctly showing multiple trips with the same location text inadvertantly broke the detection of empty location text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: use the new helper to ensure the right dive is selected after editGravatar Dirk Hohndel
There are two cases where this is important - when running Manually add dive which may add a dive in the middle of the dive list - when editing the date and time of a dive which may move it around in the dive list Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: add the properties needed to be able to manually add diveGravatar Dirk Hohndel
This way the trigger from the main drawer works again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: add field to edit the total weightGravatar Dirk Hohndel
This isn't hooked up to anything, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28Better id for yet another QML itemGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28QML UI: use unique names for the different ListViewsGravatar Dirk Hohndel
Having both the dive list (the vertical list) and the sequence of dive details (the horizontally swipe-able list) named the same caused me endless confusion. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: end edit mode when switching to different pageGravatar Dirk Hohndel
Fixes #997 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27Move helper function to DiveObjectsHelperGravatar Joakim Bygdell
As per Tomaz recomendation the helper functions from 19588ce and e072596 are moved from qmlmanager to DiveObjectsHelper. [Dirk Hohndel: merged with the latest code] Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: revert dive detail view layout changesGravatar Dirk Hohndel
Now the layout flows again and shouldn't cause clipping on the right (unless the user has excessively long, unbreakable words it seems. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26QML UI: don't combine multiple trips to the same location into oneGravatar Dirk Hohndel
The way sectioning of the dive list works is by watching for different strings in the section.property. In order to be able to tell different trips apart we combine the address of the dive trip variable with the location (which will create a new section for a new trip, even if the location text is the same) and then strip that information out before showing the trip header. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26Round placement sizes of TopBar.qmlGravatar Tomaz Canabrava
I was having really ugly fonts here and I actually blamed QML for that (while I still think it is it's fault), but we where using pixel fractions. So every time we may hit a pixel fraction, round that. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25QML UI: Add helper function to get weightsGravatar Joakim Bygdell
Helper function that retrieved the total weight for a dive to be displayed on the DiveDetials page. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25QML UI: Add helper function to get cylinder infoGravatar Joakim Bygdell
Helper function that retrieves the cylinder description to be displayed in the DiveDetails. Only the first cylinder for a dive is retrieved. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25QML-UI: Rearrange the DiveDetails pageGravatar Joakim Bygdell
After adding "Cylinder" to the DiveDetails page the objects had to be rearranged in order to better utilise the space. To get a cleaner look on smaller screens the left side is left aligned and the right side is right aligend. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25MOBILE: update downloadFromDiveComputer tableGravatar Willem Ferguson
Patch #2 that formats the table to be used for downloaded dives. Signed-off-by: Willem Ferguson <willem@localhost.localdomain> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25Layout proposal for download from dove computer screenGravatar Willem Ferguson
This is a proposal for the layout of this page and which may be useful during further development of the download code. Signed-off-by: Willem Ferguson <willem@localhost.localdomain> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25Move dive list menu entry to topGravatar Henrik Brautaset Aronsen
I guess the Dive list item will be accessed more often than the preferences item, so put it to to. Also remove the "back to" prefix. Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-24QML-UI: Do not show strange double dashes for trips in DivelistGravatar Jan Mulder
This is a multi-part message in MIME format. After fixing the regression (commit 9e9d220c9803) strange double dashes appeared in the Divelist headers for trips. Just suppress it. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-24Return to divelist even from "further away"Gravatar Miika Turkia
If one browses the application more than one step (e.g. details, gps fix list and preferences), we need to pop the stack a bit more to get back to the dive list. This will clear the whole stackView as I saw no harm in discarding the history when one jumps back to the dive list. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-24Show map from the list of GPS fixesGravatar Miika Turkia
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-22QML UI: remove no longer needed debug outputGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-22QML-UI. Improved button styleGravatar Jan Mulder
Pressing of buttons were difficult to see mainly due to small buttons and small color distance between pressed and un-pressed state. This fix enlarges the buttons a little, and choses a different color for the pressed state. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-22QML-UI. Add Back to Divelist menu itemGravatar Jan Mulder
As asked for on the mailinglisrt, a menu item is added to return to the Divelist the easy way. In addition to the standard Android back button. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-21QML UI: maximize horizontal size of notes when editingGravatar Dirk Hohndel
This seems a bit brute force but I couldn't get the width to propagate correctly any other way. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-21QML UI: show dive trip againGravatar Dirk Hohndel
This once again displays trips in the dive list and makes the visual a bit more spaceous. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-21QML UI: fix map display regressionGravatar Dirk Hohndel
In commit 6540e95425eb ("dive details navigation") the change to access the gps variable was only partially implemented. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20QML UI: switch edit back to not being a drawerGravatar Dirk Hohndel
With this edit seems to work again. The edit page can be scrolled around on smaller screens to allow editing every part of it and to allow the user to press the "save" button. This is mainly intended to make sure testing can continue - it's unclear if this will be the final design. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20QML UI: show date and time for diveGravatar Dirk Hohndel
We keep losing the time when people move code around. date really is just the date and doesn't include the time component. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20QML preferences: use Layout.preferredHeight within GridLayoutGravatar Rick Walsh
It's not recommended to set the height explicitly of an item in a layout. Use Layout.preferredHeight instead Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20QML UI: make all buttons more attractiveGravatar Rick Walsh
Commit f3f7930 introduced a more attractive button style to the start page. This patch turns it into its own type so it can easily be used everywhere. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-19QML UI: make the buttons on the start page more attractiveGravatar Dirk Hohndel
Those plain rectangular buttons were just too ugly. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>