aboutsummaryrefslogtreecommitdiffstats
path: root/qt-mobile
AgeCommit message (Collapse)Author
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-29Add helper to remove dive from modelGravatar Dirk Hohndel
I tried various things to do this from QML but it just doesn't seem to work at all. So I gave up and instead added a trivial helper function. 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: make manually added dives more like those added on desktopGravatar Dirk Hohndel
By giving them a fake profile we can actually edit the dive profile in the desktop app. Fixes #998 Fixes #1000 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-28QML UI: clear out empty strings from the UIGravatar Dirk Hohndel
Right now the UI shows "--" as place filler for empty data. That may or may not change - but while it's there, we should not store that string in the corresponding string fields of the dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-28Avoid uninitialized memory accessGravatar Dirk Hohndel
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-27QML UI: avoid clearing and rebuilding the dive list modelGravatar Dirk Hohndel
This causes all profiles to be rendered which is a massive performance concern. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: fix Qt's broken handling of two digit years in datesGravatar Dirk Hohndel
Because dives in 1912 are unlikely to be added to my dive log... 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: on edit only request location if user checks the boxGravatar Dirk Hohndel
The code inexplicably always checked for a gps location. Oops. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-27QML UI: fix precision of total weight displayedGravatar Dirk Hohndel
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-26Correct usage of QString on qmlmanagerGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-26We already have a QNetworkAcessManager global, use itGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-25QML UI: If a dive has multiple cylinders show "Multiple" in the details pageGravatar Joakim Bygdell
Since we are short on space on the mobile version, lets just show "Multiple" if a dive has multiple cylinders. 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 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 UI: fix bugs in change detection on dive editGravatar Dirk Hohndel
We were comparing apples to oranges on a few items and therefore more or less always assumed that a dive had been modified. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-01-20If set imperial units explicitly on mobile appGravatar Miika Turkia
If unit_system is set to imperial, we need to set the units explicitly on mobile application. Fixes #993 Signed-off-by: Miika Turkia <miika.turkia@gmail.com> 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>