summaryrefslogtreecommitdiff
path: root/tests/auto/qgeomapscene
Commit message (Collapse)AuthorAgeFilesLines
* Replace Qt3D with scene graph API for map rendering.Gunnar Sletta2014-03-242-84/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QtLocation now links against QtQuick and the QGeoMap has a updateSceneGraph(QSGNode *, QQuickWindow *) function to populate the scene graph with map content in what ever style the implementation decides. The only implementation right now is the QGeoTileMapData (same as with the Qt3D code). Camera positioning, zooming, panning, etc has been preserved in the interest of minimzing the change and keeping things "as they were". All rendering logic is moved into the updateSceneGraph function, where we find the delta between what is shown in the scene graph and what the scene things should be visible. Nodes are added removed accordingly. This logic is isolated from the rest of the code as it primarily lives in the scene graph render thread and may be released at an arbitrary time. Doing this every frame might seem daunting, but for the most, it is a couple of checks on a few tens of nodes, compared to rendering millions of pixels afterwards, so this is not going to be a bottleneck. Texture uploads are now done in the scene graph's rendering phase, so the map item's sync is fast. This means the map element doesn't block both GUI and render threads for extended time periods. In contrast, the Qt3D code path uploaded tiles and rendered them to an FBO in the sync phase, resulting in very poor parallelization. We cache the textures designated as visible and nothing else. Primarily in the interest of simplicity, but also because uploading 256x256 textures is a no-brainer on modern GPU's, including lower-end mobile and embedded. The QGeoTileTexture sits on a QImage instead of an actual texture to keep a strict separation between render thread and GUI thread clean. Texture cleanup is done by the scene graph structure. The Qt3D codepath rendered to an FBO, so it was implicitly clipped to its bounds. To preserve this behavior, the scene graph implementation does the same. Not doing so looks a bit odd, at least when zooming all the way out so the world is significantly smaller than the viewport. The scene graph code also adds a rectangle of solid 0.9 gray to match the default color of the old FBO code. Change-Id: Ia736cea6e3616721c2de6beb5d72e570adcb21e6 Reviewed-by: Fabian Bumberger <fbumberger@rim.com> Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Always use double point precision for geo lookups internallyErik Mattsson2013-11-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | This patch is to remedy rounding errors on ARM devices where qreal is defined as a float instead of double. The main change is to replace QPointF with QDoubleVector2D when using screenPositionToCoordinate and coordinateToScreenPosition. In many cases the QDoubleVector2D is converted to QPointF when the increased precision is not used. This because many of the surounding classes uses qreal so the precsision would be lost anyway. These classes include QVectorPath, QPainterPath and QQuickItem. The most important change is in polyline and polygon map item in the updateSourcePoints methods. Using floating point precision here resulted in many precision errors that caused for example route lines to be chopped of as the method erroneously thought it needed to wrap to the other side of the datum line. The external uses of the coordinate lookup functions in declarative geo map has been left untouched so they still use QPointF for compatibility reasons. Not sure how the process goes when updating externally visible parts of the API Change-Id: I01ed67a0563cfb5c4ff2db6395b7a62eaa8e4a19 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Make geo coordinates animatable in QML.Albin Olsson2013-10-112-3/+4
| | | | | | | | | | | | | | | | | | | | 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>
* Set the Qt API level to compatibility mode in all tests.Thiago Macieira2012-08-011-0/+1
| | | | | | | | | | Qt 5.0 beta requires changing the default to the 5.0 API, disabling the deprecated code. However, tests should test (and often do) the compatibility API too, so turn it back on. Task-number: QTBUG-25053 Change-Id: Ie0f96417cf765796e5288769563df7845086546a Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
* Fix qmake warnings.Aaron McCarthy2012-06-251-1/+1
| | | | | Change-Id: Id5ea727f3e45ed496a50bb8e2162b86fce640ad5 Reviewed-by: abcd <amos.choy@nokia.com>
* Remove Maps from public C++ API.Aaron McCarthy2012-06-071-1/+1
| | | | | | | | | | | | The preliminary C++ Maps API was exposed to provide an interface between the QML plugin and the geo services plugins. Mark it as private API for now as it is likely to change when the full C++ API is developed. Mapping functionality is currently only available through QML. Change-Id: Id16e0f1a2165c70192047dffa40e69ab1f29ba69 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>
* QtLocation: Fix compiler warnings.Friedemann Kleint2012-05-291-4/+0
| | | | | | | | - Assigned/unused variables. - Signed/unsigned comparison Change-Id: I712baa90442f9fc9699965e7c7e1c5f4ca319aab Reviewed-by: Jean Gressmann <jean.gressmann@nokia.com>
* Files renamed and cache only accessed through engineThomas Lowe2012-05-092-0/+494
This isn't completely what was requested on the ticket, but it makes the cache more separate, so easier to pull in/out. Mainly this is a slight reworking of the caching to make it a bit simpler for future prefetching. In particular: mapGeometry renamed to mapScene mapImages renames to tileRequestManager and mapImages::setVisible is now tileRequestManager::requestTiles The data flow has been simplified so the requestManager speaks directly to the tiledMappingManagerEngine and this engine takes care of inspecting the single cache. Task-number: QTBUG-25560 Change-Id: I31b2e26c45f7a7ac56fe138cf1a8906a228a93d3 Reviewed-by: Alex Wilson <alex.wilson@nokia.com>