summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeocameradata.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add field of view support to QtLocation mappingPaolo Angelelli2017-01-261-1/+17
| | | | | | | | | | | | | | | | This patch introduces a new camera parameter, field of view, used in QGeoCameraCapabilities, QGeoCameraData and QDeclarativeGeoMap. This is necessary as now QtLocation supports map tilting, and different QGeoMap implementations support different ranges for the field of view of the camera. Through this API it becomes possible to query the supported range and current value, and to stack Map elements using different plugins while keeping a consistent camera projection across all of them. Change-Id: Ie061142bea090ec223d842efbe7924f924430496 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add rotation and tilt controls to QDeclarativeGeoMapPaolo Angelelli2017-01-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDeclarativeGeoMap currently does not provide any mean to set bearing and tilt into qgeocameradata. It has been not a problem since QGeoTiledMap and sons did not support it. External renderers however support it, so this patch adds QML api calls to control these parameters, and adapt the existing logic to take them into consideration in camera-related calls, as well as in the afterViewportChange handlers of the Map Items. This patch also sligthly modifies the QML api to make the handling of all the bounded camera property more homogeneous. Minimum and maximum zoom levels prior plugin initialization aren't -1 anymore, but are some valid lower and upper bounds for this property, that is 0 and 30. in this way all the 2 bounded properties (zoomLevel and tilt) behave the same, in that they can be freely set before plugin initialization, within reasonable predefined bounds, and, after that, they may be clamped depending on the actual plugin capabilities. Autotests for the QML part of the API included. Change-Id: I9d09e32698a7330388e465e8ea7523ee39577d34 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Rename QGeoProjection to QWebMercatorPaolo Angelelli2017-01-161-1/+2
| | | | | | | | | | QGeoProjection is currently a class containing only static methods for WebMercator conversion/interpolation. This patch renames it to QWebMercator, effectively freeing the QGeoProjection name for a real projection class Change-Id: I15b71d04f7d1d21a1d26f46687ed33aa277f6deb Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Remove QGeoMapController from QGeoMapMichal Klocek2016-03-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | Refactor code to use QGeoCameraData directly. All functionality related to zoom, center boundary checks are now handled in QDeclaratvieGeoMap class. This makes handling of center and zoomLevel properties much simpler and less error prone, since camera data can not be modified along the call stack. As result we avoid forwarding change signals back and forth: * qgeodeclarativegeomap::setCenter -> qgeomapcontroller::setCenter * qgeomapcontroller::setCenter -> qgeomap::setCameraData * qgeomap::setCameraData -> qgeomacontroller::cameraDataChanged * qgeomapcontroller::cameraDataChanged -> emit qdecalartivegeomap::centerChanged Call always setCenter and setZoomLevel on qdeclarativegeomap instance instead. Introduce initialize() method to handle cases where map plugin is loaded and scenegraph geometery is not yet set. This is required to correctly handle new boundary checks to limit grey areas. Change-Id: I6066cefd4a648dc76333dc241d1f261451a32e9c Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Cleanup QGeoCameraData classMichal Klocek2015-05-281-42/+37
| | | | | | | Renames class members to use m_ naming convention Change-Id: I5bebc9be7fc29cce15d2b198beb8e8216f9cae4b Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Remove LGPLv2.1 and add GPLv2+ from/to QtLocationAlex Blasche2015-02-191-14/+17
| | | | | | Change-Id: I3007aa04d3dbc0e00cb0a43987d64d01ddf91edd Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@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 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>
* Make geo coordinates animatable in QML.Albin Olsson2013-10-111-31/+16
| | | | | | | | | | | | | | | | | | | | Interpolation logic in AnimatableCoordinate has been moved around so that QGeoCoordinates can be animated directly by QPropertyAnimation. A new QML type has been added, 'CoordinateAnimation', for animating coordinates in QML. This type follows the pattern of 'ColorAnimation' and other specializations of 'PropertyAnimation'. QDoubleVector2D, QDoubleVector3D and QGeoProjection has been moved to QtPositioning Testcase for CoordinateAnimation has been added to declarative_ui. AnimatableCoordinate and QGeoCoordinateInterpolator are redundant and have been removed. Change-Id: I0809da566e1800274384f9c5337df65623d1e61a 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>
* Coding style fixes: whitespace around pointers/referencesAlex Wilson2012-05-151-3/+3
| | | | | | Change-Id: Ie527591e2d9a1578137136fb6664e86c43eed1bf Reviewed-by: Thomas Lowe <thomas.lowe@nokia.com> Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Coding style fixes, round #1Alex Wilson2012-05-151-0/+3
| | | | | | | | | | | In this patch: * Assignment operators that don't check for self-assignment * Using const references where possible in function arguments * Using const refs in the iterator var of a foreach() loop * Add 'explicit' to constructors taking one parameter Change-Id: I640fd85c3312851f0d8c10193333efec41232e05 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Coverity and compiler warning fixesAlex Wilson2012-04-191-0/+3
| | | | | Change-Id: Iae536630edbfbda2c0e8c67c48477d5867d25f07 Reviewed-by: Aaron McCarthy <aaron.mccarthy@nokia.com>
* Cleans up the QGeoCameraData class.David Laing2012-02-161-67/+7
| | | | | | | | | | | | There were some fields that were unused or only used for debugging the prototype of the library which are no longer needed. This removes those fields and renames zoomFactor to zoomLevel - "zoomLevel" is a better name for it, but we need the double type / semantics of zoomFactor. Change-Id: I32ba97ca1b4bccfe33b86c8eccd2c94b12079d2e Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Corrects for some uninitialized variable usage.David Laing2012-02-071-2/+3
| | | | | | | Thanks to valgrind for the warnings. Change-Id: Id1ca2b3560f2f1e470844454be0d0e9f7729db2b Reviewed-by: Alex <alex.blasche@nokia.com>
* Cleans up the projection code.David Laing2012-02-021-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There was no longer any point in providing the screen <-> 3d scene position functions, which meant that the projection class was just doing coordinate <-> mercator conversions and intepolating coordinates. The interpolation code was moved out and the mercator conversions were made static. We have future changes coming which will allow people who want different projections to provide them, so it's not to big a deal to specialize the class towards the mercator projection. There were some other small changes made which make the map actually pay attention to the size of the tiles and the maximum zoom level as per the plugin. Actually enforcing the tilt / bearing / zoom parameters will appear in a separate commit before very long. Change-Id: I31dc39165bde123fbe8e3e2e70e401c5d73932b3 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Remove "All rights reserved" line from license headers.Jason McDonald2012-01-301-1/+1
| | | | | | | | | | As in the past, to avoid rewriting various autotests that contain line-number information, an extra blank line has been inserted at the end of the license text to ensure that this commit does not change the total number of lines in the license header. Change-Id: I00c66363046e475e6924aafd221483c7fad5c0d9 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Update obsolete contact address.Jason McDonald2012-01-231-1/+1
| | | | | | | Replace Nokia contact email address with Qt Project website. Change-Id: I3850177e14291901e924f9c27ba09e75df00f96a Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Adding private API warnings for the Maps API.David Laing2012-01-091-1/+1
| | | | | | | | Also renamed some of the files to follow the naming conventions for private header files. Change-Id: I84a6bc0956b942861dfb63169cb4cdcc2033f2df Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* Update copyright year in license headers.Jason McDonald2012-01-061-1/+1
| | | | | Change-Id: I496795d13a615be8d252ca20a40dd2c5ba84ed60 Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
* Renames the new mapping classes.David Laing2012-01-051-0/+291
Also moves them into src/location/maps. We still need to take a closer look at which classes are public and which are private, and then do the associated file renaming and addition of private header warnings. Change-Id: Ide0225ad5d5dc23834baaa9f6841646e4c92de39 Reviewed-by: Juha Vuolle <juha.vuolle@nokia.com>