summaryrefslogtreecommitdiff
path: root/tests/auto/declarative_ui/tst_map_item_fit_viewport.qml
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.9' into devLiang Qi2017-06-071-1/+1
|\ | | | | | | | | | | | | | | Conflicts: .qmake.conf src/plugins/geoservices/geoservices.pro Change-Id: Ie82dd22c588e5cba409fc1ef31a65968ce9f719b
| * Add mapReady to test case start conditionsKarol Polak2017-04-111-1/+1
| | | | | | | | | | | | | | | | | | | | It is reasonable to add mapReady property to the condition for the start of test cases where it is required that the map is initialized. This covers the case when one of the initialization steps runs asynchronously. Change-Id: I2eff52dbe3a7bec0b2f3fb26d607398829b5c9f2 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Simplify a mathematical expressionEdward Welbourne2017-03-211-2/+2
|/ | | | | | | | | | Squaring a number, doubling it and taking the square root is just a roundabout way of multiplying the number by sqrt(2); so do that instead, saving some computational cost and probably reducing the amount of rounding errors that can creep in. Change-Id: I1abf3c2de318f48f80536379156ace8f25a6acaf Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Merge remote-tracking branch 'origin/5.6' into 5.7Michal Klocek2016-07-281-69/+146
|\ | | | | | | Change-Id: I37542960aa091ab2074914a2cebb8c5114237a26
| * Fix the fitViewportToGeoShape calculationMichal Klocek2016-07-281-70/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation is calculating the bounding box of a geocircle based on moving along a circle of latitude by the distance of a circle's radius. Unfortunately the distances on a small circle of a sphere are greater than great circle distances. Reimplement the calculation using tangential points between a geocircle and meridians. Do not center the viewport in the center of the geoshape, use the center of the bounding box instead. Simplify zoom level adjustment calculations, use the reference world plane to get rid of longitude wrapping and rounding erros. Finally update a viewport unit test, adjust the minimum map size to 256x256, so fitToViewport calls have chance to succeed. Fix out of order test execution. Task-number: QTBUG-54337 Change-Id: I61726a4eb7183470c493ceb03d101f3a75305121 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
| * A fix for not working setVisibleRegionMichal Klocek2016-06-241-0/+21
| | | | | | | | | | | | | | | | | | | | | | Setting the visibleRegion, than changing the map center or zoom and than setting it again does not work. Fix the issue by invalidating the region on the zoom or center change. Task-number: QTBUG-54141 Change-Id: I4e680f146312e3a3aa90e27fae213042cc2b2a42 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'gerrit/5.6' into 5.7Alex Blasche2016-05-271-2/+0
|\ \ | |/ | | | | Change-Id: I066dc4f161f4bdfe182ba9fe00d273e5fbcedf5d
| * Replace waitForRendering calls in qml unit testsMichal Klocek2016-05-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Changes eea315187d1add70aaf69745c031b8d6342b2303 moved map items final position calculation to "polish" call of sg. In unit testing "waitForRendering" was introduced to sync between input events processing and items being polished. Unfortunately this approach is race condition prone, since render can run in separate thread and frame swapped signals are emitted from render thread. Replace waitForRendering with waitForPolished instead. Improve test execution by providing init() and intTestCase() functions for map items unit tests, so test can be run "out of order" manner. Add missing namespace macros for location test qml plugin. Task-number: QTBUG-31797 Task-number: QTBUG-53455 Change-Id: Iec083143ae621e5be603d03f43d6ef260b056d0f Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-201-17/+12
|/ | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: Ic9ed595cc04b1fbbefb8ec8cac20c1480681857a Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Improve map item rendering performanceMichal Klocek2015-11-271-0/+2
| | | | | | | | | | | | A flood of input events, such as when pinch, triggers multiple map item geometry updates to occur per frame. These geometry updates are potentially expensive and only the last generated geometry is used. Mark items to be polished to make geometry updates once per frame when updatePolish() is called. Done-with: Aaron McCarthy <aaron.mccarthy@jollamobile.com> Change-Id: I0af40e2d0b09c8364382d4b4c018988f3986f7f0 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove fitViewportToGeoShape from map qml apiMichal Klocek2015-11-231-4/+4
| | | | | | | | | Use visibleRegion to fit the map's viewport [ChangeLog][Map] Remove fitViewportToGeoShape from map qml api Change-Id: I378329602a5c1f4cceda327f7abcca61c1217564 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Bump all QtLocation 5.5 tags to 5.6Alex Blasche2015-09-231-1/+1
| | | | | | | | | | | | | | | 5.5 was a tech preview release. The real release is 5.6. Some 5.5 interfaces did change. It is possible that there are apps in existence which are based on the 5.5 API's. To avoid miscommunication we bump all version tags to the real first release version. The existing 5.5 QML imports will continue to work but apps may encounter API changes when they move from 5.5 to 5.6. The API changes are listed in the QtLocation documentation. Change-Id: Ia7000e871a5ee6b09234e5d58d4fc8927e93b154 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Fix warning about registering test plugin without idMichal Klocek2015-06-161-3/+3
| | | | | | | | | | | | Fixes warning 'Module 'QtLocation.test' does not contain a module identifier directive - it cannot be protected from external registrations.' Add proper plugin description to qmldir, use proper plugin naming convention QtLocation.Test Change-Id: I67b24e2f82c6d07ec577b9cf477f9a581af65fe6 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Small cleanup of _ui qml unit testsMichal Klocek2015-06-151-1/+1
| | | | | | | | Fix version numbers across test files, fix formating and remove useless debug Change-Id: Ib7721716a5e270a32c7620d087d9c2982a61fa59 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update contact URL in all license headers to qt.ioAlex Blasche2015-02-181-1/+1
| | | | | Change-Id: Ia1e333be7fec8898de609d9b9303b1ad7687632e Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Update BSD and LGPLv2.1 licensesAlex Blasche2015-02-181-3/+3
| | | | | | | | - Removes subsidiary extension from Qt Company - Replaces remaining occurrences of Digia in BSD and LGPLv2.1 Change-Id: I7467a6744af7d1c3aef3c29118f219399162a18c Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* Update all LGPLv2.1 license headers in source to latest versionAlex Blasche2015-02-151-4/+4
| | | | | | | | | | | This affects all QtPositioning related code and the test code in the entire repository. The Qt Company is set as new copyright owner and the copyright year is bumped to 2015. Change-Id: Iee0e990680683c20f5920e49cc1063ea9349e2cd Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Better names for incorrectly named Map functions.Aaron McCarthy2015-01-201-5/+5
| | | | | | | | | | | | | | | | | | | The functions to transform between coordinates and position on screen were incorrect. Documentation and function names did not match implementation. New functions with better names have been added and documentation updated to match implementation. Old invalid functions have been deprecated. Related private symbols have been renamed to match their purpose. [ChangeLog][QtLocation][Important Behavior Changes] Functions in Map item which are used transform between coordinates and screen position have been deprecated due to confusing naming. Change-Id: Ic501cd81220414800bc2247eae9f510954ee469f Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Update license headers and add new license filesAntti Kokko2014-08-241-19/+11
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 & LICENSE.GPLv2 - Removed LICENSE.GPL Change-Id: Iedee2507ab1bd46788409a98505d7be510253110 Reviewed-by: Jani Heikkinen <jani.heikkinen@digia.com>
* Bump all qml code to QtLocation 5.3Alex Blasche2014-02-261-1/+1
| | | | | | | It is the baseline for all subsequent additions. Change-Id: Ia56da45b8b92dd0224dbeff97976cd06aa25d943 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Missing changes from MapMouseArea removal.Aaron McCarthy2014-02-061-1/+1
| | | | | | | | | | | MapMouseArea has been removed. Remove MapMouseEvent, it is no longer required. Remove some remaining MapMouseArea instances in the tests. Change-Id: I12c534bb3360f6a19ec9e1dd40ecf7bb0d7b8e21 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Remove the GeoMapMouseAreaFabian Bumberger2014-02-061-4/+3
| | | | | | | | | | | | | | | | | I don't see a reason for keeping this. First of all, only half of it is implemented. Second we can have the same behavior with a normal MouseArea. The only advantage a MapMouseArea has is that mouse events are only received in the boundaries of the parent map item. However with a bit of work in the parent map item we can have this behavior as well for a normal mouse area. The only thing we are eventually loosing is the geocoordinate property of the MapMouseEvent. But this can be easily obtained with the "toCoordinate" function in the Map item. Change-Id: Icb176ee7d7c2881df714ab3191fa1f7f5c8915e2 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge branch 'stable' into devAlex Blasche2013-10-221-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/location/qdeclarativegeomap.cpp src/imports/location/qdeclarativegeoroute.cpp src/imports/location/qdeclarativegeoroutemodel.cpp src/imports/location/qdeclarativegeoroutesegment.cpp src/imports/location/qdeclarativepolygonmapitem.cpp src/imports/location/qdeclarativepolylinemapitem.cpp src/imports/positioning/positioning.cpp Change-Id: Ieaa5f567d2144d0267e7eef5bd75bde7e0079fbe
| * Add proper version to QtPositioning and its QML API.Alex Blasche2013-10-141-1/+1
| | | | | | | | | | | | | | | | | | The QML API remains available under 5.0 though. Change-Id: I037b82e5b12825db610e8458d6c82122ecde4f44 Reviewed-by: Erik Mattsson <erik.mattsson@appello.com> Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Added qml function to fit map to geo shapeErik Mattsson2013-10-151-0/+61
|/ | | | | | | | | | | Added a qml invokable function in the map object to fit the viewport to a geo shape. It's heavily influenced from fitViewportToMapItems. Also added some basic ui tests. Added handlig for the case with an empty shape Change-Id: Iecad849f2c1b6d9a54eab90e26435b31a138886c Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Split QtLocation into QtPositioning and QtLocationAlex Blasche2013-09-021-18/+19
| | | | | | | | | | | | QtPositioning is not dependent on any gui component and mostly covers everything around the retrieval of position information. QtLocation covers place, map and navigation APIs. Several documentation issues were fixed during the process. Change-Id: I98e2a53065549a2fc43f93a75b4f65b5bc884c92 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Update copyright year to 2013Sergio Ahumada2013-06-131-1/+1
| | | | | Change-Id: I5b0cb7d56997ad7b91c073b3e02b31d0368fdcfa Reviewed-by: Alex <alexander.blasche@digia.com>
* Change copyrights from Nokia to DigiaIikka Eklund2012-09-241-24/+24
| | | | | | | | Change copyrights and license headers from Nokia to Digia Change-Id: Ic1390da64a219642fa1e1482a7677a4c2db15cbc Reviewed-by: Janne Anttila <janne.anttila@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
* Convert GeoShape, GeoRectangle and GeoCircle into QML value types.v5.0.0-beta1Aaron McCarthy2012-08-281-14/+3
| | | | | | | | | | | | | This replaces the GeoShape, GeoRectangle and GeoCircle QML elements with value types. A value type is a better fit for shape types. It is very similar to a rect with some utility functions. Declare QGeoShape, QGeoRectangle and QGeoCircle as movable types. Update documentation. Change-Id: Id6c48e1e841c68f2f0c5c6a9c4a6580a57e2dfb6 Reviewed-by: abcd <amos.choy@nokia.com>
* Convert Coordinate into a QML coordinate value type.Aaron McCarthy2012-08-241-62/+50
| | | | | | | | | | | | | | This replaces the Coordinate QML element with a value type. A value type is a better fit for a coordinate. It is very similar to a vector3d except it has an explicit coordinate system and some utility functions. Declare QGeoCoordinate as a movable type. Update documentation. Change-Id: I758fa9dfd7154a4d60fb791fe553b9fee3164c2c Reviewed-by: abcd <amos.choy@nokia.com>
* Rename QGeoBoundingArea and related classes to QGeoShape.Aaron McCarthy2012-06-211-1/+1
| | | | | | | | | | | | | | | | | | | | | QGeoBoundingArea is used for describing more than just a bounding area. Renaming it to a more appropriate name, QGeoShape. The same is done for subclasses and QML equivalents. In C++: QGeoBoundingArea -> QGeoShape QGeoBoundingCircle -> QGeoCircle QGeoBoundingBox -> QGeoRectangle In QML: BoundingArea -> GeoShape BoundingCircle -> GeoCircle BoundingBox -> GeoRectangle Change-Id: I93c6df8f1b6c5179ed52fd8354a05f709063b1cf Reviewed-by: abcd <amos.choy@nokia.com>
* Comment out fit viewport move item testIan Chen2012-05-011-3/+3
| | | | | | | Temporary disable test as it occasionally fails in CI Change-Id: Ifc6428623ffb7a6d55c7747ceab22011f6751942 Reviewed-by: abcd <amos.choy@nokia.com>
* Change the way polygon coords are set in auto testsIan Chen2012-04-271-7/+2
| | | | | Change-Id: I652d31155a7f4322f3b9bf0ff04e1e9e99d5b607 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Add 'fit viewport to map item' function and its unit tests.Ian Chen2012-04-231-0/+593
A mouse menu in MapViewer is also added to illustrate this function Task-number: QTBUG-24482 Change-Id: I9ba519c9e6a30a39b47117c25bdc16f65df8dc2d Reviewed-by: Alex Wilson <alex.wilson@nokia.com>