subsurface/mobile-widgets/qml
Lubomir I. Ivanov f21ae69f7b mapwidget.qml: more improvements for the dynamic zoom-in/out
The QML Map has a couple of methods - toCoordinate(someQPointF) and
fromCoordinate(someQGeoCoordinate). Ideally, if one passes a point to
toCoordinate() and then attempts to convert the resulted coordinates
back to the point, the same point in the Map view port with minimal error
should be retrieved. That's not always the case - e.g. near
47.400200 -123.142066, which means that the methods are not exactly
*reliable* and there might be Map class bugs at hand.

The new zoom-in and zoom-out improvements try to work around the above:
- for both centerOnRectangle() and centerOnCoordinate(), if no good
zoom-out level is found (newZoomOut), the zoom-out is set to the default
value of defaultZoomOut. In practice, this prevents the case where the map
does not zoom-out at all when going from one place to another
- centerOnRectangle() now uses rectangle diagonals to estimate a fit,
instead of checking if 2 points (top-left and bottom-right) are visible
in the viewport. The usage of fromCoordinate() was giving bad results
in this case and comparing distances (diagonals) is more reliable
but more expensive on the CPU.

Due to the inconsistencies of toCoordinate() and fromCoordinate()
the dynamic zoom-in and zoom-out are still not ideal, but the current
implementation is somewhat usable with decent accuracy.

Signed-off-by: Lubomir I. Ivanov <neolit123@gmail.com>
2017-08-10 09:08:28 -07:00
..
icons Add star icons 2017-08-02 18:49:47 -07:00
About.qml Add SPDX header to mobile widgets and QML files 2017-04-29 13:32:55 -07:00
CloudCredentials.qml QML UI: Settings: remove more margins 2017-08-03 16:00:09 -07:00
dive.jpg Move subsurface-core to core and qt-mobile to mobile-widgets 2016-04-04 22:33:58 -07:00
DiveDetails.qml QML UI: loose focus on endEditMode 2017-08-02 18:49:47 -07:00
DiveDetailsEdit.qml DiveDetailsEdit: make sure model data exists 2017-08-07 00:51:51 -07:00
DiveDetailsView.qml QML UI: display rating and visibility stars 2017-08-02 18:49:47 -07:00
DiveList.qml DiveList.qml: set detailsWindow index before deleting dive from list 2017-08-10 09:06:44 -07:00
DownloadedDiveDelegate.qml QML UI: replace all checkboxes with our own 2017-07-26 01:39:26 +09:00
DownloadFromDiveComputer.qml QML UI: replace button on DC download page 2017-07-26 01:39:26 +09:00
GpsList.qml QML UI: GPS: remove header 2017-08-07 00:52:32 -07:00
HintsTextEdit.qml QML UI: dive edit autocomplete 2017-08-02 18:49:47 -07:00
Log.qml QML UI: drop AppLog title and add margin instead 2017-07-06 09:34:37 -07:00
main.qml Revert "QML UI: color the status bar correctly" 2017-07-28 07:30:44 -07:00
MapWidget.qml mapwidget.qml: more improvements for the dynamic zoom-in/out 2017-08-10 09:08:28 -07:00
MapWidgetContextMenu.qml mapwidget.qml: add menu action for selecting visible locations 2017-08-07 00:51:21 -07:00
mobile-resources.qrc Add star icons 2017-08-02 18:49:47 -07:00
qtquickcontrols2.conf QML UI: Fully port dive edit to Kirigami2 2017-04-01 09:35:51 +02:00
Settings.qml QML UI: Settings: remove more margins 2017-08-03 16:00:09 -07:00
SsrfButton.qml QML UI: add missing id line in our button 2017-07-26 14:13:22 +09:00
SsrfCheckBox.qml QML UI: add our own styled checkbox 2017-07-26 01:39:26 +09:00
SsrfSwitch.qml QML UI: add our own styled switch 2017-07-26 01:39:26 +09:00
StartPage.qml Mobile: consolidate settings to one page and menu entry 2017-07-23 03:20:58 +09:00
ThemeTest.qml Add SPDX header to mobile widgets and QML files 2017-04-29 13:32:55 -07:00