aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
AgeCommit message (Collapse)Author
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>
2018-09-29Mobile: don't call clear_dive() on deleteDiveGravatar Berthold Stoeger
clear_dive() will be called anyway in the subsequent call to copy_dive(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-27mobile, QML UI: Settings page scalabilityGravatar Jan Mulder
A relatively big change for such a simple page. Most relevant changes are: 1) Do not use Kirigami.Header anymore. It appears that this header has word wrapping on (and we cannot override that). This is annoying on this page, as headings seems randomly be split over 2 lines, even in cases where there is more than enhough room to display it on one line. And as the Kirigami.Header is just a trivial wrapper of a Text field, we can simple replace it. 2) A lot of the toplevel GridLayouts had width properties set. These are not needed (and confused my debugging code), so they are removed withput any visual change. As a general rule, do not try to set properties that are not needed. In general, it can only lead to binding loops or undefined behavior. 3) Add a font size to our Theme. The step from regular to title size was a little too big. 4) And, obviously, numerous font.pointSize lines are added to actually resize the font. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-26mobile, QML UI: whitespace in dive details pageGravatar Jan Mulder
There was a strange big margin at the top of the the dive details page. Just make it a bit more "normal". Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-26mobile, QML UI: margings and paddings in download screenGravatar Jan Mulder
There was a significant of not needed whitespace on the download from DC page. Most importantly, the bottom buttons where not on the bottom, so we had to truncate the downloaded dives early (to prevent overflowing the buttons). Further, a tiny bit of padding is removed between the 3 top pull down items. All this, results in the diplay of more dives without scrolling. For example, previously, only 1 dive (with 1 stored DC) was shown on my 5.5" device, and now 3 (scale: regular). Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-26mobile, QML UI: make SsrfCheckBox resizableGravatar Jan Mulder
Changed some hard coded size and positioning of the SsrfCheckBox, in such a way that is scales nicely to the current setting of the mobile_scale. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-26mobile, QML UI: fix overlapping buttonGravatar Jan Mulder
The select buttons in the downloaded dives delegate overlapped the dive data. Simple margin change fixes this. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-26mobile, QML UI: ssrfButton and download controls resizableGravatar Jan Mulder
Make the ssrfButton and the pull down menu's on the download page resizable. Notice that also the contents of the pulldown menu's is scaled based on the font size. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25Mobile: use editText instead of currentText in Suit and DiveMaster boxesGravatar Berthold Stoeger
A user reported problems with editing the Suit and DiveMaster fields. Apparently, editing does not change the currentText. Without doing a deeper analysis, simply use editText (a more proper fix might be changing the currentIndex on editing). (Parially?) fixes #1694 Reported-by: Mark Powell <mcpowell123@gmail.com> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-25mobile, QML: correct font scaling of the divelistGravatar Jan Mulder
Changing the scale, it seems that the header of trips is not rescaled. The reason for this is simple. That string does not use our manipulated font but a different one. In fact, this is the only ocurrence on the divelist that did not scale. However, other screens hardly rescaled at all. All these will be fixed in seperate commits. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25mobile, QML: scale font from the buttonsGravatar Jan Mulder
After the work in the previous commit, it gets very simple to implement font scaling. Just assign a the new desired font scale to the used font metrics. The QML engine does all the work. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25mobile, QML: introduce basePointSize in subsurfaceThemeGravatar Jan Mulder
By manipulation the used font pointSize property, we can dynamically scale fonts and derived UI objects. At the same time, we have some logic to determine the default font, its size, etc, for example depending on screen properties. The scaling of the UI (and its font) does not need to interfere with those defaults. However, when we want to reset the pointSize, we alter the default, so a backup of the default is needed. Ok, not al full backup, as the only thing we like to manipulate is the pointSize, to which we want to be able to return. All this leads to this commit. A basePointSize property is added, that is initialized from the default. Due to the binding logic of the QML engine, it is not a classic initialization, but a binding between the 2 properties. We need to break that binding explicitly, so that the original PointSize is always preserved. In addition, a display of the new font property is added to the developers theme test. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25mobile, QML: do not user a local font metric objectGravatar Jan Mulder
This theme test display created a new local FontMetrics object, that does not per definition correspond with the "global" font metric as defined in main.qml. The fix is simple. Display the font theme data based on the one and only font metric from main.qml Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-25QML UI: add settings for scale factorGravatar Dirk Hohndel
The visual feels backwards as the selected one is grayed out... Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-25QML UI: ensure we use the correct default fontGravatar Dirk Hohndel
It seems the documentation is incorrect - unless you explicitly set the ApplicationWindow font to the the Application Font (just writing this down sounds so silly...), it doesn't actually work. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-25Mobile/download DC: disable selected DC buttonGravatar Jocke
Disable the button for the currently selected DC. This gives an extra visual hint of which DC is currently selected. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Mobile/settings: clear all of qPrefDiveComputer.vendorGravatar Jocke
To prevent stale data in the download DC path we need to clear the entire qPrefDiveComputer.vendor() object when the user purges the used DCs. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Mobile/Settings: Disable unusable optionGravatar Jocke
Disable the "Forget DCs" button when there is no DCs saved. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Mobile/download DC: simplify startupGravatar Jocke
Since we now store the last used DCs in out preferences we can use the information to pre-populate the DC selector. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Mobile/downloadDC: always start with empty indexGravatar Jocke
To prevent stale data being visible always set the combobox indexes to -1 Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-25Mobile: let Flow object use all of the parent widthGravatar Jocke
There is no point in further restricting the width of the Flow object. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-23Core: split process_dives() in post-import and post-load versionsGravatar Berthold Stoeger
process_dives() is used to post-process the dive table after loading or importing. The first parameter states whether this was after load or import. Especially in the light of undo, load and import are fundamentally different things. Notably, that latter should be undo-able, whereas the former is not. Therefore, as a first step to make import undo-able, split the function in two versions and remove the first parameter. It turns out the the load-version is very light. It only sets the DC nicknames and sorts the dive-table. There seems to be no reason to merge dives. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
2018-09-23Mobile/remember DCs: try to match device namesGravatar Dirk Hohndel
We only store the address part of the connection name, so don't try to find an exact match, try to find the sub-string. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-23Mobile/settings: add button to forget remembered dive computersGravatar Dirk Hohndel
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-23Mobile/remember DCs: allow the buttons to flowGravatar Dirk Hohndel
The hard grid may look nicer on bigger screens, on smaller screens it's a problem. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-23Mobile/remember DCs: add UI for the mobile appGravatar Dirk Hohndel
This uses the same backend as the desktop version. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-22Update divelist when changing unitsGravatar Jocke
We need to explicitly refresh the divelist when switching between metric and imperial unit systems. Or the changes will not be visible until we restart the app or scroll outside of what's in the current cache. This will update both the divelist view and the dive profiles to show the new units. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>
2018-09-19Mobile: git prefs overrules localeGravatar Jocke
The unit types are set from system locale when the app starts. We need to explicitly set the units to match the unit system that is saved in the git repo. Or we end up with situations where the preferences and git say "metric" but the units are "imperial". Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-19Mobile: set units system in "No cloud mode"Gravatar Jocke
When starting the app in "No cloud mode" we need to make sure that the units and unit_system match. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-19Mobile: add units selection to settings pageGravatar Jocke
Add the option for the user to set the desired unit system for Subsurface-mobile regardless of system locale Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-19Mobile: rename UI string for webserviceGravatar Jan Mulder
Trivial rename of a UI string. The string "Subsurface GPS data webservice" reminds me too much of the legacy webservice. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-12mobile-widgets: replace qmlprefs::theme with qPrefDisplay::themeGravatar jan Iversen
Shortcut and use qPrefDisplay::theme() direct Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-12mobile-widgets: remove setTimeThreshold from systemGravatar jan Iversen
Use qPrefLocationService::set_time_threshold and remove from qmlprefs.cpp and qmlmanager.cpp Remark: mobile UI shows time in minutes, while it is stored (and calculated) in seconds. Therefore a /60 when reading and *60 when setting. Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-12mobile-widgets: move distanceThreshold handling to qPrefGravatar jan Iversen
Remove distanceThreshold from qmlprefs and use qPref instead update qml no user experience change Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-12mobile-widgets: make show_developer persistentGravatar jan Iversen
Remove developer from qmlprefs and use qPref instead Update qml show_developer is saved on disk, and thus remembered between starts. Signed-off-by: Jan Iversen <jani@apache.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-11core/settings ... : remove qPref* includes in qPref.hGravatar jan Iversen
reduce number of includes by removing qPref* includes in qPref.h Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11core: declare cloud_status in qPrefCloudStorageGravatar jan Iversen
qml declaration of cloud_status (defined in pref.h) does not belong in qPref.h but in qPrefCloudStorage Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11core,tests: change qml register functionGravatar jan Iversen
In order to address the C++ object directy in qml, a different registration is needed. qmlRegisterType, registers the C++ class, allowing qml code to inherit from it and make qml objects. This is needed for graphical elemnets like profile and map setContentProperty, registers the C++ object, thus allowing signals to be catched. Signed-off-by: Jan Iversen <jani@apache.org>
2018-09-11cleanup[4/6], mobile: remove superfluous code from gpslocationGravatar Jan Mulder
Despite the fast that this code is sitting in core, its used mainly from mobile. In 987e221f8e6b7b, the buttons to interact with the GPS webservice were deleted from the UI. Now, delete all the code that was used under these buttons. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-10prefs: git_local_only is not a preferenceGravatar Dirk Hohndel
It's the current state of the app, so it should be a global variable, not a preference. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
2018-09-10Mobile: Remove webservice, remove UI componentsGravatar Jan Mulder
This is the first commit related to the removal of the GPS webservice. It is nothing more then removing 2 buttons from the menu to upload and download from the server, so technically a trivial change. As with the desktop application: Be very careful here as this forces our users to use Subsurface-mobile, and a online cloud account as that is the way to transfer GPS data from a mobile device to the desktop. Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
2018-09-06mobile_widgets: correct cloudCredentials save problemGravatar jan Iversen
When installing for the first time cloudCredentials needs to be added, this commit a problem with updating them correctly this problem was caused by da6e8a4cd5d80a4288129bf44b1efad69de1704f Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25mobile-widgets: remove QSettingsGravatar jan Iversen
update qmlprefs and qmlmanager to use qPref Signed-off-by: Jan Iversen <jani@apache.org>
2018-08-25Mobile: add default cylinder UIGravatar Jocke
Add the UI components to let the user set the default cylinder and select the chosen cylinder when adding a new dive. Signed-off-by: Joakim Bygdell <j.bygdell@gmail.com>