summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
2017-02-05Merge informational_prefs into git_prefsGravatar Joakim Bygdell
There is no need to have two variables for the same purpose. [Dirk Hohndel: changed to keep the two separate functions as otherwise we no longer parse existing repos successfully] Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-02-05MOBILE: Read profile settings from gitGravatar Joakim Bygdell
Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-29QML UI: Parse multiple buddies when editing a diveGravatar jbygdell
This allows the user to enter multiple buddies as a comma separated list, the "Multiple Buddies" entry is still a special case as we can only populate the combobox with a single name for each entry. fixes #168 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2017-01-22QML UI: allow magic phrase for multiple buddies to be localizedGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22QML UI: correctly test if there are multiple buddiesGravatar Dirk Hohndel
The JS string function search returns the position of the string you search for and -1 if that string isn't found. Also, search allows regular expression, indexOf does just a string match. So let's use that as it is much faster. See issue #168 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-22QML UI: prevent modification of Multible Buddies textGravatar Dirk Hohndel
"Multiple Buddies" is magic in that it means "do not change the buddies set for this dive". Allowing the user to edit that magic phrase defeats the purpose. This deals with part of issue #168 - but of course that magic phrase shouldn't be fixed as English text. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21QML UI: move 'No dives in dive list' downGravatar Dirk Hohndel
Otherwise it overlaps with the page title. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2017-01-21Revert "QML UI: build against latest Kirigami"Gravatar Dirk Hohndel
This reverts commit a842e44b685dbb7e34df317a8beacff747cee6bd.
2017-01-21Revert "QML UI: steps towards working with Kirigami 2"Gravatar Dirk Hohndel
This reverts commit 53ce3ce3e3cc38555bf7f2a1e7540638e5d294f8.
2017-01-01Update from 2016 to 2017. Happy new year!Gravatar Henrik Brautaset Aronsen
Signed-off-by: Henrik Brautaset Aronsen <subsurface@henrik.synth.no> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27Remove opacity callsGravatar Tomaz Canabrava
ApplicationWindow has no Opacity calls no more. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27QML UI: steps towards working with Kirigami 2Gravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-12-27QML UI: build against latest KirigamiGravatar Dirk Hohndel
But of course this doesn't work, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-20QML UI: smaller fonts on narrow screensGravatar Dirk Hohndel
This may be excessive, but it fixes the issue with the German localization on some narrow screens. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17QML UI: deal with multiple buddies correctlyGravatar Joakim Bygdell
When editing adive in Subsurface-mobile we can only handle one buddy due to the limitations of the combobox. To prevent loss of data when editing a dive with more than one buddy we display "Multiple Buddies" in the buddy field. This creates a special case where no changes are written to the buddy field unless the user changes buddy for that dive. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-17QML UI: two columns on 1024x768 iPadsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04Fix some warningsGravatar Dirk Hohndel
At least the warnings about size potentially being uninitialized seem correct and valid. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04iOS: Don't show "No GPS source available"Gravatar Dirk Hohndel
We don't support GPS on iOS right now, the message is confusing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04Remove hacks regarding multiple gasmixes and cylindersGravatar Joakim Bygdell
Enabling cylinder edit in Subsurface-mobile our previous hacks regarding multiple cylinders and gasmixes must be removed. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-09-04QML UI: Enable cylinder editGravatar Joakim Bygdell
This adds the option to select a cylinder when adding or editing a dive. Due to limited screen size we restrict the editing to the first cylinder only. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-27Settings update: Simplify code by using the SettingsObjectHelperGravatar Tomaz Canabrava
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-16QML UI: set a reasonable default column widthGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-15QML UI: format numbers for Theme infoGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-14Use kirigami built in static modeGravatar Marco Martin
Now kirigami needs to be built with a C++ plugin. In cases of mobile operating systems such as iOS (and in a lesser measuse, Android) having a proper plugin loaded at runtime may be difficult, so statically link it together with all of its qml files compiled as a qresource inside the static library. Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-08-10Unify handling of QDateTime time zone informationGravatar Robert C. Helling
Subsurface uses "local time" which in particular means we never display time zone information to the user. The user (and our file format) only sees times like 5pm or 17:00. A better name than local time (which could mean "local at the dive spot) would be "watch time", the time displayed by the diver's watch when she entered the water. Internally, we store times as time_t, seconds since Jan 1 1970 0:00 UTC. Our convention for conversion between 5pm and time_t as always been to treat 5pm as if it were UTC. Then confusion arose since Qt's QDateTime (which is tied to UI elements like QTimeEdit and similar) is time zone aware and by default assumes the system time zone. So when we set a QDateTime to 5pm and then later convert it to time_t we have to take care about the difference between UTC and the system time zone. This patch unifies our solution to this problem: With it, we set all QDateTime's time zone to UTC. This means we don't have to correct for a time zone anymore when converting to time_t (note, however, the signedness issue: Qt's idea of time_t is broken since it assumes it to be unsigned thus not allowing for dates before 1970. Better use the millisecont variants). We only need to be careful about time zones when using the current time. With this convention, when assigning the current time to a QDateTime, we need to shift for the time zone since its value in UTC should actually be the watch time of the user who is most likely used to the system time zone. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-21make sure the ListView is the last elementGravatar Marco Martin
since the contentItem is the default property of ScrollablePage, putting another Item after it will change contentItem with that one, in this case the Label Signed-off-by: Marco Martin <notmart@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-17QML UI: correctly check cloud verification statusGravatar Dirk Hohndel
Oops. That's embarrassing. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-14QML UI: Not giving wrap info improves dive details on narrow screensGravatar Robert C. Helling
This prevents label text from overlapping. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-14QML UI: show an empty dive list with explanationGravatar Dirk Hohndel
If the credentials are valid we should show the dive list. If there are no dives, simply say so. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-13QML UI: explain that the user can create a new cloud storage accountGravatar Dirk Hohndel
Fixes: #1073 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-13QML UI: allow entering the cloud PIN on the mobile UIGravatar Dirk Hohndel
Now the user doesn't need to do this on the desktop app anymore. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-13QML UI: prepare to enter the cloud PIN on mobile UIGravatar Dirk Hohndel
This just creates the properties to connect QML and C++ code. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-13QML UI: serialize checking credentialsGravatar Dirk Hohndel
If we run the backend to verify credentials without waiting for it to finish, the redirect might happen before we know if the credentials are invalid, unverified or verified - which will cause us to give the wrong information to the user. Yes, this additional wait is annoying, but I can't come up with a better way to do this and avoid incorrect information. At least the UI isn't hung while we wait. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12QML UI: don't proceed unless cloud credentials are verifiedGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12Remove strange whitespace on right of divelistGravatar Robert C. Helling
There was a column of whitespace in the divelist that looked strange. It was there so a trash can icon can appear. Now the trashcan overlaps with the item. Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12QML UI: add debug output for dive edit save buttonGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12Fix typoGravatar Dirk Hohndel
Duh. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12Don't quit when hitting the back button on iOSGravatar Dirk Hohndel
This should finally fix this problem. Famous last words. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12QML UI: disable GPS functionality on iOSGravatar Dirk Hohndel
I still haven't figured out how to make GPS work on iOS. So let's not pretend this works. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12QML UI: somewhat improve GPS list renderingGravatar Dirk Hohndel
At least now it's readable, but on the flipside there's now this odd margin around the entries. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-06-12QML UI: update for latest KirigamiGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21Make autocomplete work on add diveGravatar Joakim Bygdell
This sets the list models for autocompleting suit, buddy and divemaster. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-21Add init function to qmlmanagerGravatar Joakim Bygdell
In order to get autocomplete to work on manual dive add we apparently need a separate init function. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-16QML UI: hide handles for comboboxesGravatar Joakim Bygdell
Hide the handles for the comboboxes, making the text input fields look like the normal text fields. This is left as a separate patch as there currently seems to be issues with autocomplete on Android. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-16QML UI: add comboboxes to DiveDetailsEditGravatar Joakim Bygdell
This adds autocompleting text input fields for suit, buddy and divemaster. [Dirk Hohndel: some whitespace cleanup] Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-05Fix typoGravatar Miika Turkia
Ends up being "enteryour" without the space. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-04QML-UI: don't translate the theme test stringsGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03QML DiveDetailsView only use one bottomlayoutGravatar Rick Walsh
Splitting the bottomlayout in two leads to columns in the grid not lining up. It was a workaround that hopefully isn't needed any longer. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03QML Set width instead of minimumWidth equal to maximumWidthGravatar Rick Walsh
The QML manual advises against setting width property of gridLayout children directly, and recommends setting preferred, min and/or max width instead, letting QML do the work to determine the optimum width. But we've found letting QML determine gridLayout widths leads to infinite loops in too many situations, so we're forcing a width. It's better to force a width by setting it directly, rather than setting minimum = maximum. Signed-off-by: Rick Walsh <rickmwalsh@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2016-05-03Mark strings in qml files for translationGravatar Robert C. Helling
I did this semi-automatically: I used the script from the previous patch and then did some manual corrections. This marks only title: and text: tags, there might be others Signed-off-by: Robert C. Helling <helling@atdotde.de> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>