summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeomappingmanagerengine.cpp
diff options
context:
space:
mode:
authorAaron McCarthy <aaron.mccarthy@nokia.com>2011-09-09 15:12:43 +1000
committerAaron McCarthy <aaron.mccarthy@nokia.com>2011-09-09 15:24:34 +1000
commit5f42e961560a54a2d3978b42478cd90bc8c6927d (patch)
treeac23cb069e85786fbae0d1c11731330ea697e321 /src/location/maps/qgeomappingmanagerengine.cpp
parent3b55bbd1fbac94def3718133db574823948c3b01 (diff)
downloadqtlocation-5f42e961560a54a2d3978b42478cd90bc8c6927d.tar.gz
Squashed commit of the following:
commit 142bae21d2c938ea29ebfaf8cafd5b1791ae1f6e Merge: 1eac7c4 3b55bbd Author: Aaron McCarthy <aaron.mccarthy@nokia.com> Date: Fri Sep 9 12:41:26 2011 +1000 Merge remote branch 'origin/places' into maps-merge Conflicts: examples/declarative/flickr/qmllocationflickr.cpp examples/declarative/landmarkmap/landmarkmap.pro examples/declarative/landmarkmap/qmllandmarkmap.cpp examples/declarative/mapviewer/mapviewer.pro examples/declarative/mapviewer/qmlmapviewer.cpp examples/examples.pro src/3rdparty/proj.pri src/imports/location/location.cpp src/imports/location/location.pro src/imports/location/qdeclarativegeomapcircleobject.cpp src/imports/location/qdeclarativegeomapcircleobject_p.h src/imports/location/qdeclarativegeomapgroupobject.cpp src/imports/location/qdeclarativegeomapgroupobject_p.h src/imports/location/qdeclarativegeomapmousearea_p.h src/imports/location/qdeclarativegeomapobject.cpp src/imports/location/qdeclarativegeomapobject_p.h src/imports/location/qdeclarativegeomapobjectborder.cpp src/imports/location/qdeclarativegeomappixmapobject.cpp src/imports/location/qdeclarativegeomappixmapobject_p.h src/imports/location/qdeclarativegeomappolygonobject.cpp src/imports/location/qdeclarativegeomappolygonobject_p.h src/imports/location/qdeclarativegeomappolylineobject.cpp src/imports/location/qdeclarativegeomappolylineobject_p.h src/imports/location/qdeclarativegeomaprectangleobject.cpp src/imports/location/qdeclarativegeomaprectangleobject_p.h src/imports/location/qdeclarativegeomaprouteobject.cpp src/imports/location/qdeclarativegeomaprouteobject_p.h src/imports/location/qdeclarativegeomaptextobject.cpp src/imports/location/qdeclarativegeomaptextobject_p.h src/imports/location/qdeclarativegeoserviceprovider_p.h src/imports/location/qdeclarativegraphicsgeomap.cpp src/imports/location/qdeclarativegraphicsgeomap_p.h src/imports/location/qdeclarativelandmarkcategorymodel_p.h src/imports/location/qdeclarativelandmarkfilters_p.h src/imports/location/qdeclarativelandmarkmodel_p.h src/location/location.pro src/location/maps/qgeomapcircleobject.cpp src/location/maps/qgeomapcircleobject.h src/location/maps/qgeomapcircleobject_p.h src/location/maps/qgeomapcustomobject.cpp src/location/maps/qgeomapcustomobject.h src/location/maps/qgeomapcustomobject_p.h src/location/maps/qgeomapdata.cpp src/location/maps/qgeomapdata.h src/location/maps/qgeomapgroupobject.cpp src/location/maps/qgeomapgroupobject.h src/location/maps/qgeomapobject.cpp src/location/maps/qgeomapobject.h src/location/maps/qgeomapobjectengine_p.cpp src/location/maps/qgeomapobjectengine_p.h src/location/maps/qgeomapobjectinfo.cpp src/location/maps/qgeomapoverlay.cpp src/location/maps/qgeomappingmanagerengine.cpp src/location/maps/qgeomappixmapobject.cpp src/location/maps/qgeomappixmapobject.h src/location/maps/qgeomappixmapobject_p.h src/location/maps/qgeomappolygonobject.cpp src/location/maps/qgeomappolygonobject.h src/location/maps/qgeomappolygonobject_p.h src/location/maps/qgeomappolylineobject.cpp src/location/maps/qgeomappolylineobject.h src/location/maps/qgeomappolylineobject_p.h src/location/maps/qgeomaprectangleobject.cpp src/location/maps/qgeomaprectangleobject.h src/location/maps/qgeomaprectangleobject_p.h src/location/maps/qgeomaprouteobject.cpp src/location/maps/qgeomaprouteobject_p.h src/location/maps/qgeomaptextobject.cpp src/location/maps/qgeomaptextobject.h src/location/maps/qgeomaptextobject_p.h src/location/maps/qgraphicsgeomap.cpp src/location/maps/qgraphicsgeomap.h src/location/maps/tiled/makepoly_p.h src/location/maps/tiled/qgeotiledmapcircleobjectinfo_p.cpp src/location/maps/tiled/qgeotiledmapcircleobjectinfo_p.h src/location/maps/tiled/qgeotiledmapcustomobjectinfo_p.h src/location/maps/tiled/qgeotiledmapdata.cpp src/location/maps/tiled/qgeotiledmapdata.h src/location/maps/tiled/qgeotiledmapdata_p.h src/location/maps/tiled/qgeotiledmapgroupobjectinfo_p.cpp src/location/maps/tiled/qgeotiledmapgroupobjectinfo_p.h src/location/maps/tiled/qgeotiledmapobjectinfo_p.cpp src/location/maps/tiled/qgeotiledmapobjectinfo_p.h src/location/maps/tiled/qgeotiledmappingmanagerengine.cpp src/location/maps/tiled/qgeotiledmappingmanagerengine.h src/location/maps/tiled/qgeotiledmappolygonobjectinfo_p.cpp src/location/maps/tiled/qgeotiledmappolylineobjectinfo_p.cpp src/location/maps/tiled/qgeotiledmaprectangleobjectinfo_p.cpp src/location/maps/tiled/qgeotiledmaprequest.cpp src/location/maps/tiled/qgeotiledmaprequest_p.h src/location/maps/tiled/qgeotiledmaprouteobjectinfo_p.cpp src/location/maps/tiled/qgeotiledmaptextobjectinfo_p.cpp src/location/mapsgl/cameradata.h src/location/mapsgl/map.h src/location/mapsgl/map2d/projection2d_p.h src/location/mapsgl/map3d/map3d_p.h src/location/mapsgl/map3d/spheregeometry_p.h src/location/mapsgl/map3d/viewport.cpp src/location/mapsgl/map3d/viewport_p.h src/location/mapsgl/map3d/viewportcamera_p.h src/location/mapsgl/map3d/viewporttiles_p.h src/location/mapsgl/map3d/viewporttiles_p_p.h src/location/mapsgl/map3d/viewporttilesnew.cpp src/location/mapsgl/map3d/viewporttilesold_p.h src/location/mapsgl/mapitem.h src/location/mapsgl/mapsphere_p.h src/location/mapsgl/projection_p.h src/location/mapsgl/tile.cpp src/location/mapsgl/tile.h src/location/mapsgl/tilecamera.h src/location/mapsgl/tilespec.cpp src/location/mapsgl/tilespec.h src/location/projwrapper_p.cpp src/location/projwrapper_p.h src/plugins/geoservices/nokia/nokia.pro src/plugins/geoservices/nokia/qgeomappingmanagerengine_nokia.cpp src/plugins/geoservices/nokia/qgeomappingmanagerengine_nokia.h src/plugins/geoservices/nokia/qgeomapreply_nokia.cpp tests/auto/auto.pro tests/auto/qgeocodingmanagerplugins/qgeocodingmanagerplugins.pro tests/auto/testplugin/qgeosearchmanagerplugins.pro tests/auto/testplugin/testplugin.pro tests/declarativetestplugin/location.pro tests/declarativetestplugin/locationtest.cpp tests/declarativetestplugin/qdeclarativelocationtestmodel.cpp tests/declarativetestplugin/qdeclarativelocationtestmodel_p.h tests/tests.pro Change-Id: I23e2a324ad64ea1abe026c72569d578dcc664e75 commit 1eac7c46f40a1007e11841d7b9fc7934da3e3f45 Author: Aaron McCarthy <aaron.mccarthy@nokia.com> Date: Fri Sep 9 10:37:30 2011 +1000 Rename project files. Change-Id: Idc1d7f3fcf4f5fdbf38af3842928cdfada1b7ee8 commit db2d91abf29e52236358e67dabbabbf4568f5d84 Author: juhvu <qt-info@nokia.com> Date: Thu Sep 8 20:53:35 2011 +1000 Revert "temp check" This reverts commit 82f1370d2d29bfb95663a740d2b566fa22093388. commit 82f1370d2d29bfb95663a740d2b566fa22093388 Author: juhvu <qt-info@nokia.com> Date: Thu Sep 8 20:40:42 2011 +1000 temp check Change-Id: I1d497a44d9422dd9b08554ccaad80ac80a0b8bae commit 19276939b4b56281e8b5f5f418afa76383ff91b9 Author: juhvu <qt-info@nokia.com> Date: Thu Sep 8 20:20:51 2011 +1000 clear color more obvious Change-Id: I7609c4218a8d5112d7ff361b4b5515d418770364 commit 4a179d3a08e07ac3e32e0c2f555ddb2eed21b636 Author: juhvu <qt-info@nokia.com> Date: Thu Sep 8 19:53:55 2011 +1000 more qdebugs Change-Id: If1cede53f8d38e799e7da4ffee92e3dbb93af764 commit 3e63c9f5fe1062294734082ec4fd94c5badf0213 Author: juhvu <qt-info@nokia.com> Date: Thu Sep 8 19:11:47 2011 +1000 qdebugs more visible Change-Id: Ibd2acc57ce22bdf743b9a440ec77e59a2dc576bd commit 2c1f5c8cb245155e09677f3e3e592ac64a9ffc56 Author: juhvu <qt-info@nokia.com> Date: Thu Sep 8 18:39:39 2011 +1000 Some qdebugs always needed. Change-Id: I2af97585e7e4a14bf1f2ca9dccc5280e31d453b4 commit 3e1a6a12571ed056b9141475d6214c464a6693f7 Author: juhvu <qt-info@nokia.com> Date: Thu Sep 8 14:41:21 2011 +1000 Check qsgengine availability earlier. Change-Id: I65f3902f1829ff7869831135f574873ea4265374 commit cb71264ee7a573033985cc1eab8452cf29a34c65 Author: David Laing <david.laing@nokia.com> Date: Wed Sep 7 14:59:19 2011 +1000 First pass at improved intersection code. The old code has some dependencies on some QPainter specific code that we might not be able to rely on in the very near future. This could do with some testing. commit 09f101e685f48154c5bede732c147dee027dffd5 Author: David Laing <david.laing@nokia.com> Date: Wed Sep 7 13:54:18 2011 +1000 Removes accidentally added tex files. commit 675fa4c57a0f537ce5f30c06ffcf0f00e56a18ab Author: David Laing <david.laing@nokia.com> Date: Wed Sep 7 13:48:33 2011 +1000 Refactors the code to remove the deprecated parts of Maps. Also changes the new mapping code to make use of the existing maps plugin system. commit f873103da192c1ba5195018bdc8222c148d0c4c8 Author: juhvu <qt-info@nokia.com> Date: Tue Sep 6 14:14:39 2011 +1000 test plugin import fix Change-Id: Ib8f2fec09e38ebef43895a145520399ac470a7b7 commit 29719cdc6ebc62045ae8083836ce418ab21ba11b Author: juhvu <qt-info@nokia.com> Date: Tue Sep 6 11:19:07 2011 +1000 Temp hack to resolve the QML startup assert. Change-Id: I01ba9be3e1c92e032885dc71140a62392dbbfbc4 commit 680954a85ea69ed4146a66b726f8775b03fec311 Author: Xizhi Zhu <xizhi.zhu@nokia.com> Date: Mon Jun 27 16:48:29 2011 +0300 Fix copy2build output path for QML plugin. commit b309375dff7bc23b1759dfed1edcad609b7647f9 Author: David Laing <david.laing@nokia.com> Date: Fri Sep 2 14:14:30 2011 +1000 Cleans up the includes in the C++ code. commit 8b5328e06db5c5799f47feb57fa0ea33a65b9d74 Author: David Laing <david.laing@nokia.com> Date: Fri Sep 2 12:54:33 2011 +1000 Fixes some compile warnings for the new maps code. commit 43c7b2b76e3e634f0066a7cb012ea0eab4c4eb53 Author: David Laing <david.laing@nokia.com> Date: Fri Sep 2 11:42:21 2011 +1000 Further cleans up naming of files. commit ecfd70736d7bf3b7233940024756c81d73487d39 Author: David Laing <david.laing@nokia.com> Date: Thu Sep 1 17:40:48 2011 +1000 Adds licenses and sorts out private/public headers. commit f0a394389c3dc8c51f48e44c78300886f595887e Author: juhvu <qt-info@nokia.com> Date: Thu Sep 1 14:05:25 2011 +1000 Possible to run qml basic map without tweaks to qtdeclarative. Means that no map items or mouseareas will work. Change-Id: I6c6d1013462eb8424b5ec9eeb9e7779bb0cb5f25 commit 383983f2a2b4674332b63bb81da1b17fe11db3fa Author: David Laing <david.laing@nokia.com> Date: Wed Aug 31 16:13:32 2011 +1000 Removes unused debug output. commit 8bf2fc191b172525c3750205d0b0d3fcedf17a78 Merge: fea668d fa36fb7 Author: juhvu <qt-info@nokia.com> Date: Wed Aug 31 16:01:32 2011 +1000 Merge branch 'experimental_scenegraphing2' of scm.dev.nokia.troll.no:qt/dalaings-qtlocation-staging-experimental into experimental_scenegraphing2 commit fea668d9f69ef13ce79029869a9e440b65cb7230 Author: juhvu <qt-info@nokia.com> Date: Wed Aug 31 16:00:23 2011 +1000 Don't wait for texture when creating map item node. Change-Id: Ib5dbee82dbb27ba7bb18ef65df4ba401e8894818 commit fa36fb7905585c80109b262fd718aa71df31e882 Author: David Laing <david.laing@nokia.com> Date: Wed Aug 31 15:57:29 2011 +1000 Modifies the 2D map to take into account the window size. Previously we were setting various values based on the window sizes we were using for testing, which was never going to work in the long term. We might want to try to find out the DPI of the display and take that into account later on as well. commit d2ae0f0bde89b0ddb8278ba9595818fa9e37a004 Author: David Laing <david.laing@nokia.com> Date: Wed Aug 31 14:27:02 2011 +1000 Cleans up some of rendering code that was commented out. commit ba55afb9f39c60f0412f0f0a9a9bed98dcab2e0d Author: juhvu <qt-info@nokia.com> Date: Mon Aug 29 15:52:22 2011 +1000 Added zoomLevel to mapItems (much more joyous thingies now). Change-Id: Icd58b60920a8453fb5f26d0155ff027d86d11b73 commit f43db647753f8fa5ed9fa90c5c5a580d527bf4f1 Author: juhvu <qt-info@nokia.com> Date: Mon Aug 29 14:24:56 2011 +1000 Better working support for adding map items with Q_INVOKABLEs. Change-Id: I3c47a76369bd0968537c8490f9079f880aa54f26 commit d849ff492db227ab96ebca99dbaad9610cdc6130 Author: David Laing <david.laing@nokia.com> Date: Mon Aug 29 13:44:25 2011 +1000 Flips MapItem textures so they're drawn correctly. This was initially written to work with QPixmaps, which have a y-axis that points in the other direction. commit 5b60ed1d15f7fca457d347102d290664481eef0c Author: David Laing <david.laing@nokia.com> Date: Mon Aug 29 11:59:32 2011 +1000 Quick and dirty fix for map item rendering. We now draw the map, disable the depth test, draw the objects, then re-enable the depth dest. It's a bit dirty but it seems to work. Some of the map3d system test was modified to make it easier to check what works and what doesn't while this is played with. It'll probably change back once we've gotten this down. commit bccbfa89a0cab133871e29e735ee2724e88830c0 Author: juhvu <qt-info@nokia.com> Date: Fri Aug 26 16:22:43 2011 +1000 Solved map item threading -related crashes. However refactoring will be needed, this commit pinpointed and workarounded the issues but real solutions will follow shortly. Change-Id: I734ba79f36033f1d290f498f04310400a4074c57 commit 17f72db36f5084973ec470128a3edb1415f601ef Author: David Laing <david.laing@nokia.com> Date: Fri Aug 26 15:41:38 2011 +1000 Compilation fix. Also updates the include path in the map3d example / system test. commit a3fcbf90a599b8973331dab9fb75172027372651 Author: David Laing <david.laing@nokia.com> Date: Fri Aug 26 15:09:21 2011 +1000 Adds a copy of map3d to the system tests. This way the version in examples can be made into a nicely behaving example while the version in system tests can be used for benchmarking and verification. commit 496d8f4fe752c4f2c8899c5be6b34a91a03c01e9 Author: David Laing <david.laing@nokia.com> Date: Fri Aug 26 15:06:05 2011 +1000 Renames the maps3d directory to mapsgl. commit 23cce283c44cc98282150d76930d4e34d2ece683 Author: David Laing <david.laing@nokia.com> Date: Thu Aug 25 16:54:06 2011 +1000 Adds initial support for coordinate - screen conversions. The screen -> coordinate conversion could still be improved. commit 33d688d2b19a7b3fa80c12ff4284bb0efd39d6e6 Author: Cristian Adam <cristian.adam@nokia.com> Date: Wed Aug 24 12:00:51 2011 +0200 Buildfix for MSVC. commit a8490395427b460ada4eda118a6d22f2a067843f Author: David Laing <david.laing@nokia.com> Date: Wed Aug 24 16:10:26 2011 +1000 One last little change for the declarative texture problem. This change trades off correct behaviour for up to twice the memory consumption - once in the texture and once in the image - although we should be able to have both. I need to get my declarative environment up to scratch so I can figure this out properly. commit 3caea5c919bd2aa2c2e652a06270ea638dc82c25 Author: David Laing <david.laing@nokia.com> Date: Wed Aug 24 15:54:33 2011 +1000 Attempts to fix a bug introduced by the last commit. The last commit was a little less rendering-thread aware than it should have been - hopefully this fixes it. commit cc0f1d797097ad27bb537c5638b7e6e46318c423 Author: David Laing <david.laing@nokia.com> Date: Wed Aug 24 15:03:42 2011 +1000 Makes the tile cache eviction rendering-thread-aware. Some things weren't being cleaned up previously because we needed to clean them up in the rendering thread. The MapSphere class had a method for this but TileCache has the information. The cleanup is now done in TileCache, however the interface between the two classes for this task could do with some neatening. commit a7ac61adf978565e8e25adc2474f89e4414fc3a4 Author: David Laing <david.laing@nokia.com> Date: Wed Aug 24 11:01:17 2011 +1000 Refactors the code to separate the 2D and 3D mapping classes. Quite a few optimizations and other fixes are included. Now that this refactoring is done I should be able to make smaller and more frequent commits rather than these monsters... commit 01873d37f8eae15eccf424cc39e7810312d0b412 Author: Cristian Adam <cristian.adam@nokia.com> Date: Tue Aug 23 20:43:56 2011 +0200 Texture display "beautification" commit 87abf218bafaa98e55beaa050a14526427c88152 Author: Cristian Adam <cristian.adam@nokia.com> Date: Mon Aug 22 20:18:15 2011 +0200 Fixed for 2D map. commit f44f8dc61670bf21efa4b6e84fa8fa2291d16f95 Author: Cristian Adam <cristian.adam@nokia.com> Date: Fri Aug 19 19:25:10 2011 +0200 Compilation bugfix and some mouse navigation for map3d. commit bd929f6f11a16ff681d5fc543caf33f494fdbd27 Merge: 024214c ee5cd33 Author: Cristian Adam <cristian.adam@nokia.com> Date: Fri Aug 19 10:01:59 2011 +0200 Merge branch 'experimental_scenegraphing2' of scm.dev.nokia.troll.no:qt/dalaings-qtlocation-staging-experimental into experimental_scenegraphing2 commit ee5cd339b1f72df506905ee815988a65623584c5 Author: juhvu <qt-info@nokia.com> Date: Fri Aug 19 15:00:58 2011 +1000 First success on texturized map objects. Change-Id: Ied9276da69a047e578cee614318e7d6a6a5d4e6d commit 25f7f641787a43f16a7c379c5e0e0735296524a9 Author: juhvu <qt-info@nokia.com> Date: Fri Aug 19 09:37:08 2011 +1000 Interim commit for arbitrary QML map item support. Change-Id: Ica29abb6f9cd74e6c6fbdc028f31cd25957546f9 Conflicts: src/location/maps3d/mapsphere.cpp src/location/maps3d/mapsphere.h commit 6f7aa4e2eec65ee855992a22d019202234de4f9b Author: juhvu <qt-info@nokia.com> Date: Fri Aug 19 09:03:30 2011 +1000 Few changes to get QML Map example running. Change-Id: Iaada49719341b9c48682f2a5a87eb03986d8272d commit 024214cbc524584e719cc6e5baf67cfe68764918 Author: Cristian Adam <cristian.adam@nokia.com> Date: Thu Aug 18 19:23:01 2011 +0200 Bugfixes to build for Windows. commit 0c3b8d7250fcbef3c1ca6a8c538cf7440f6d3dae Author: David Laing <david.laing@nokia.com> Date: Thu Aug 18 17:36:57 2011 +1000 Adds preliminary support for map items. Dummy items at the moment, projected onto the map. - need to look at drawing items in a second pass to avoid rendering glitches - need to handle non-projected objects, which will probably involve yet another pass, possibly with an ortho projection - need to handle the texture stuff from Juha commit 8289b3227873576c9fa32bb117633135d89f5800 Author: David Laing <david.laing@nokia.com> Date: Thu Aug 18 17:31:46 2011 +1000 Improves the behaviour of the tile provider. - Queued connection between the cache and the provider - Provider aborts replies that are no longer going to be used commit 473bef88f86322d575936b1312a976a65ce116df Author: David Laing <david.laing@nokia.com> Date: Thu Aug 18 13:41:09 2011 +1000 Updates some of the rendering mutex related changes. commit 398a37255d09a862fae58760918ac6b3c4ef4ac7 Author: David Laing <david.laing@nokia.com> Date: Tue Aug 16 14:58:06 2011 +1000 Reworked the maps to allow for 2D Map projections There are numerous other changes and optimizations in here. commit 1a8844780b0e02f90e6929c1edaeaef80c288a3f Author: juhvu <qt-info@nokia.com> Date: Tue Aug 9 10:34:23 2011 +1000 Stop timers when stopping too. Change-Id: I0334eea1cfd6a0a9cdcb23bc9120b10a9f90b913 commit a4671b1517d3fc10107dd4b6da70f784a11d5855 Author: juhvu <qt-info@nokia.com> Date: Tue Aug 9 10:30:48 2011 +1000 Took out some asserts in maps. Change-Id: I0dd48f0c30ae9e2f958f1b750a1713315ec1d681 commit e524908c6b977307408d6992a1cb7d5c6c7874c5 Author: juhvu <qt-info@nokia.com> Date: Tue Aug 9 10:15:28 2011 +1000 Map (3D) zoom and flick working at same time. Change-Id: I4862882cfe9b23bcef88873372a7178635dc9485 commit 30aef46a61e8414985533f7b8eaaa7cf5578993f Author: juhvu <qt-info@nokia.com> Date: Mon Aug 8 16:27:03 2011 +1000 Fixed Map (3D) mousewheel (QSGItem event type changed) and flickable. Change-Id: If79463b84630ce8d96525a095fbb0167903a8ca5 commit 037eb28953eb78a628710aba487e78240805ea93 Author: juhvu <qt-info@nokia.com> Date: Fri Aug 5 14:15:36 2011 +1000 Corrected Map flick to work even with very short (<200ms) flicks. Change-Id: Ic6fc294d6f3517090578b3e66d1ddf425df845f5 commit ad28c2c32b1a14093e6a09d4fd3a0c100976366c Author: David Laing <david.laing@nokia.com> Date: Thu Aug 18 11:13:48 2011 +1000 Re-adding the non-revert parts of 6c39b17 commit 9f948f41b19e605e400d3303314a7d844a4a0a8c Author: David Laing <david.laing@nokia.com> Date: Thu Aug 18 11:13:04 2011 +1000 Revert "Revert "Further improvements to the camera / sphere intersect code."" This reverts commit 6c39b175188a8cddf290c3cf2aac2ea61835b109. commit 6c39b175188a8cddf290c3cf2aac2ea61835b109 Author: juhvu <qt-info@nokia.com> Date: Fri Aug 5 13:06:44 2011 +1000 Revert "Further improvements to the camera / sphere intersect code." This reverts commit 78b01bf94e196b3130e1b75d746dcd6a8cbbc8c2. Conflicts: src/location/maps3d/mapsphere.cpp Also improved the example application. Dodgy to do it in revert commit but forgot the thing and ran out of time. Change-Id: I0aaa934b5d93a4a9846304a5553276a0937439e8 commit c5bef97778e635722ee255b0da4366b3606fa44f Author: juhvu <qt-info@nokia.com> Date: Thu Aug 4 15:57:10 2011 +1000 Rough version of Map scene node thread protection. Change-Id: Ida38cd02fbfe42ac8908df54f8aad4ac61da28d4 commit 78b01bf94e196b3130e1b75d746dcd6a8cbbc8c2 Author: David Laing <david.laing@nokia.com> Date: Thu Aug 4 15:09:02 2011 +1000 Further improvements to the camera / sphere intersect code. Increased correctness, added some optimizations. commit 3c78999378e73167dacf72f511b4f75c0ed43b0f Author: juhvu <qt-info@nokia.com> Date: Thu Aug 4 13:26:54 2011 +1000 Added tilt support for Map(3D) pinch area. Change-Id: I17a3ee333f2ef594df3cc4f5d38604a77414ea2a commit 13d57872c57b62ee857a25eab65803552d813497 Author: juhvu <qt-info@nokia.com> Date: Thu Aug 4 10:53:09 2011 +1000 Added gesture option support for map pinch area. Change-Id: I2ca45d48626528f1c000d395d9dadfc3e665f8f2 commit 0a0d98d3f8b67946d601518beb8b15f671cba458 Author: juhvu <qt-info@nokia.com> Date: Thu Aug 4 09:57:43 2011 +1000 Improved the rotation for Map3D. Change-Id: I9f77ee2018cc878fdad56508a2037510ec405746 commit 0002c36d984516ffa2c6aa8e5ac0aa6e637d4b6e Author: juhvu <qt-info@nokia.com> Date: Wed Aug 3 16:08:48 2011 +1000 Radical pinch zooming improvements for Map3D. Change-Id: I402c712d577d5f3737271d6b34c79862cd838c44 commit 0fec6b84da9c9cbc99fa91452f7957b93ca7364a Author: juhvu <qt-info@nokia.com> Date: Tue Aug 2 13:29:53 2011 +1000 Fix for pinching gen - changed qapp->notify to canvas->sendEvent. Change-Id: I8e68b5d120ace5652cef4f4ad0b46b949d2e28bd commit fbbb3016c212214e18afa58452bd96253c0779ee Author: juhvu <qt-info@nokia.com> Date: Tue Aug 2 10:51:51 2011 +1000 Forgot .pro file for the testplugin. Change-Id: Iad18fa5e988b730c54e8deea7b4cea1bcbea3e98 commit c8ae01f629a6a5798bfd187c6c67d9fe31482155 Author: juhvu <qt-info@nokia.com> Date: Tue Aug 2 09:47:24 2011 +1000 Put pinchgenerator into test plugin. Change-Id: Ia401fb7d1ee7bc9bbd4decaa39b446a5dda81693 commit 4767ad9b4f37a1ac90f12b288df73f14469c616e Author: juhvu <qt-info@nokia.com> Date: Mon Aug 1 15:40:05 2011 +1000 First version of pinch generator. Change-Id: I3eff3559b6750e086de914b166545b66742a04c8 commit 2121ca14e5b8d7e0679711bac35cbc79df2f1fb1 Author: David Laing <david.laing@nokia.com> Date: Fri Jul 29 15:14:35 2011 +1000 Improves the sphere / plan intersection code. Now using a much improved algorithm - less code / memory time is needed to get results which are correct in more cases. commit 5e5e88471797a1d2de8c161cc00e26da1528c13c Author: juhvu <qt-info@nokia.com> Date: Fri Jul 29 11:40:06 2011 +1000 Map 3D pinch event support. Change-Id: I2196e59c581b6a17ccb87f2550102bce70e967f2 commit 7135d6717ff225445c7ec99d22a243f577e02b8b Author: juhvu <qt-info@nokia.com> Date: Thu Jul 28 16:15:41 2011 +1000 First version of 3D Map pinching. Change-Id: I834def992b01e6701cbc48cc49c86527033e7e26 commit 8380676866d777bda65d77148869cfb0ef787352 Merge: addf553 b36eae4 Author: juhvu <qt-info@nokia.com> Date: Wed Jul 27 15:41:47 2011 +1000 Merge branch 'experimental_scenegraphing' of scm.dev.nokia.troll.no:qt/dalaings-qtlocation-staging-experimental into experimental_scenegraphing Conflicts: src/location/maps3d/cameradata.cpp Change-Id: Ia822a689a1ea65e2bdadbd5dcf7e606f6091d3dd commit addf5532dc4b267ee7a4a8b26ce3e052c3f9f655 Author: juhvu <qt-info@nokia.com> Date: Wed Jul 27 15:38:30 2011 +1000 Added rough draft of Map 3D flicking. Change-Id: Ia9ed0723a906b52490cc5b05fd11d9569adfc285 commit b36eae47ba5a8f3809a088ddb9bfcdb511a4776e Author: David Laing <david.laing@nokia.com> Date: Tue Jul 26 11:34:39 2011 +1000 Fixes a bug with the relationship between zoom and distance. Was using z^2 instead of 2^z. commit 3fe3c2146615906cb8726d7326213cfc98de5821 Author: David Laing <david.laing@nokia.com> Date: Tue Jul 26 11:34:17 2011 +1000 Adds animation support to the C++ demo. commit 39f26af1d7f7b4bb59bb59b3ecef18f6481fbd51 Author: juhvu <qt-info@nokia.com> Date: Tue Jul 26 09:58:00 2011 +1000 Update Map3D backend. Change-Id: Ie1e3f730fb9505b42fa664f1da5f8af0c3818435 commit ff0bb0b48e27b3f9a9e92c6cc05dbfdd8f6106bf Author: juhvu <qt-info@nokia.com> Date: Mon Jul 25 15:38:18 2011 +1000 QtLocation to compile with qml2 header changes. Change-Id: Ia1724740fdcd6f6a4114737dea47b981658aa71e commit a3c4b9c1550ece97531954073bd0e0063695bf50 Author: David Laing <david.laing@nokia.com> Date: Tue Jul 26 09:34:22 2011 +1000 Switches the viewport-to-tiles backend to the stable version The new and improved version isn't ready quite yet. commit e32743ea59c4df2cd5e7cd67b63364e2cd653019 Author: David Laing <david.laing@nokia.com> Date: Mon Jul 25 16:37:45 2011 +1000 Fixes some camera bugs. The bearing rotation was being applied twice, and the coordinate interpolation was moving in the wrong direction i.e. from the end to the start. Fixed now. commit 62ed7d29e2e739d7ba82c5c280ec599a674ad513 Merge: 358d9ec 685693e Author: David Laing <david.laing@nokia.com> Date: Mon Jul 25 15:27:38 2011 +1000 Merge branch 'experimental_scenegraphing' of scm.dev.nokia.troll.no:qt/dalaings-qtlocation-staging-experimental into experimental_scenegraphing commit 358d9ecbea2b142238ff6696e40eb7012f387510 Author: David Laing <david.laing@nokia.com> Date: Mon Jul 25 15:25:49 2011 +1000 Another bulk update of backend stuff. - Quite a bit of refactoring - Adds scripting for the map example (for testing / profiling) - Adds switchable camera->tiles strategies - Including the start of the new approach - Adds interpolators for the camera commit 685693e68bdfc2d909063a344e5963ea753daf27 Author: juhvu <qt-info@nokia.com> Date: Mon Jul 25 14:20:35 2011 +1000 Small pinch update. Change-Id: I1fe08805200e8391963cf8ea513dc7fb843bcc0d commit 9d8f663ac423efe9d206936b367d84ac270cfdaa Author: juhvu <qt-info@nokia.com> Date: Fri Jul 22 15:38:42 2011 +1000 Simple mouse wheel support for Map 3d. Change-Id: I0d466cd923d62494870b952102ccb447203e7876 commit d3a57442cb921fab1cf1ae50e525308ae37513a5 Author: juhvu <qt-info@nokia.com> Date: Fri Jul 22 14:52:51 2011 +1000 Regular MouseArea integration to 3D Map element. Change-Id: Ib6fd5040a94c0a0dafe33de77254791d695809ea commit 7c7d6efcc3ce0ea3cc77e1523ac238d36b1cf544 Author: juhvu <qt-info@nokia.com> Date: Mon Jul 11 12:54:53 2011 +1000 Intermediate idea commit Map::MouseArea integration. Change-Id: I6f3ce7e15e540943581aa678f421a45418a8d763 commit dc9545e75f3c0dc60fdf60d323f46e5159e8506b Author: juhvu <qt-info@nokia.com> Date: Tue Jul 5 16:13:25 2011 +1000 Added the sphere/map toggle to map3d qml example. commit abbc8d5b33537856e13f0b1787c4202d29d1471d Author: juhvu <qt-info@nokia.com> Date: Tue Jul 5 13:23:30 2011 +1000 Anchors to work with 3d map element. commit 19048b9260b3e51a1fb9aa8c04eb10f32f37ce56 Author: juhvu <qt-info@nokia.com> Date: Tue Jul 5 10:57:11 2011 +1000 Restored gl context defaults after rendering underlay (warnings). commit 220c3feec0aefce34ec73db23d90f853876dfabd Merge: 708b242 1f375c2 Author: juhvu <qt-info@nokia.com> Date: Mon Jul 4 12:01:42 2011 +1000 Merge branch 'experimental_scenegraphing' of scm.dev.nokia.troll.no:qt/dalaings-qtlocation-staging-experimental into experimental_scenegraphing commit 708b2423dc6e4474a77f85cb16dc121d05359d56 Author: juhvu <qt-info@nokia.com> Date: Mon Jul 4 12:01:10 2011 +1000 Simplified QSG rendering for Map element. commit 1f375c2ebbbe66eecbb36f9d0b3bfe2f0506bfb8 Author: David Laing <david.laing@nokia.com> Date: Mon Jul 4 11:45:23 2011 +1000 Massive update to 3D maps code. Still need to rework TileCamera so we have a camera API with user-friendly goodness. commit eeaa93cd262581cadc674daa03267a4b96ca7053 Author: juhvu <qt-info@nokia.com> Date: Fri Jul 1 14:37:08 2011 +1000 Cube tests for QSG underlay. commit 04991ff06f733f554f701e9bf1ae7f1e3a9b1aa0 Author: juhvu <qt-info@nokia.com> Date: Mon Jun 27 15:37:07 2011 +1000 Modified tile camera. commit c39ef64e914ba40929821d7c115bdff9ae73c675 Author: juhvu <qt-info@nokia.com> Date: Tue Jun 21 10:48:17 2011 +1000 Map3D element to run 3d map. commit 049466a6581af6a78bd02ca316ceb379b76fbad9 Author: David Laing <david.laing@nokia.com> Date: Fri Jun 17 16:47:00 2011 +1000 Removing example executable. commit 8de142a35f3f6630cc7114e08e4e5c4234515fce Author: David Laing <david.laing@nokia.com> Date: Fri Jun 17 16:44:59 2011 +1000 Adding initial code dump. commit 2ccd4851439daf76165187c20c1981b305782957 Merge: f9a921e 54c829a Author: David Laing <david.laing@nokia.com> Date: Fri Jun 17 16:11:31 2011 +1000 Merge branch 'master' into experimental_scenegraphing commit f9a921e84f19c52d7ea7452a47f8aa0c0417852b Author: juhvu <qt-info@nokia.com> Date: Tue Jun 14 15:51:19 2011 +1000 Map3D object visible in QML. commit 416fdb11c2649f72a04cfe9c64d5fdc4cc175aa3 Author: juhvu <qt-info@nokia.com> Date: Fri Jun 10 15:47:12 2011 +1000 Some maps scenegraphing drafting. Change-Id: I96b5c5a396f371e7e9acf983441d674a55b44368
Diffstat (limited to 'src/location/maps/qgeomappingmanagerengine.cpp')
-rw-r--r--src/location/maps/qgeomappingmanagerengine.cpp257
1 files changed, 172 insertions, 85 deletions
diff --git a/src/location/maps/qgeomappingmanagerengine.cpp b/src/location/maps/qgeomappingmanagerengine.cpp
index 362ec23f..df1f464f 100644
--- a/src/location/maps/qgeomappingmanagerengine.cpp
+++ b/src/location/maps/qgeomappingmanagerengine.cpp
@@ -41,6 +41,8 @@
#include "qgeomappingmanagerengine.h"
#include "qgeomappingmanagerengine_p.h"
+#include "qgeotiledmapreply.h"
+#include "tilespec.h"
#include <QNetworkProxy>
@@ -76,7 +78,7 @@ QGeoMappingManagerEngine::QGeoMappingManagerEngine(const QMap<QString, QVariant>
: QObject(parent),
d_ptr(new QGeoMappingManagerEnginePrivate())
{
- Q_UNUSED(parameters)
+ d_ptr->parameters = parameters;
}
/*!
@@ -95,6 +97,124 @@ QGeoMappingManagerEngine::~QGeoMappingManagerEngine()
delete d;
}
+QMap<QString, QVariant> QGeoMappingManagerEngine::parameters() const
+{
+ Q_D(const QGeoMappingManagerEngine);
+ return d->parameters;
+}
+
+void QGeoMappingManagerEngine::init()
+{
+}
+
+void QGeoMappingManagerEngine::threadStarted()
+{
+ Q_D(QGeoMappingManagerEngine);
+
+ init();
+
+ d->timer_ = new QTimer(this);
+
+ d->timer_->setInterval(0);
+
+ connect(d->timer_,
+ SIGNAL(timeout()),
+ this,
+ SLOT(requestNextTile()));
+
+ d->started_ = true;
+ if (!d->queue_.isEmpty())
+ d->timer_->start();
+}
+
+
+void QGeoMappingManagerEngine::requestTiles(const QList<TileSpec> &tiles)
+{
+ Q_D(QGeoMappingManagerEngine);
+
+ if (!d->started_) {
+ d->queue_ = tiles;
+ return;
+ }
+
+ for (int i = 0; i < d->queue_.size(); ++i) {
+ QGeoTiledMapReply* reply = d->invmap_.value(d->queue_.at(i), 0);
+ if (reply) {
+ reply->abort();
+ d->map_.remove(reply);
+ d->invmap_.remove(d->queue_.at(i));
+ reply->deleteLater();
+ }
+ }
+
+ d->queue_ = tiles;
+
+ if (!d->queue_.empty())
+ d->timer_->start();
+}
+
+void QGeoMappingManagerEngine::requestNextTile()
+{
+ Q_D(QGeoMappingManagerEngine);
+
+ TileSpec ts = d->queue_.takeFirst();
+
+ QGeoTiledMapReply *reply = getTileImage(ts);
+
+ if (reply->isFinished()) {
+ handleReply(reply, ts);
+ } else {
+ connect(reply,
+ SIGNAL(finished()),
+ this,
+ SLOT(finished()));
+
+ d->map_.insert(reply, ts);
+ d->invmap_.insert(ts, reply);
+ }
+
+ if (d->queue_.isEmpty())
+ d->timer_->stop();
+}
+
+void QGeoMappingManagerEngine::finished()
+{
+ Q_D(QGeoMappingManagerEngine);
+
+ QGeoTiledMapReply *reply = qobject_cast<QGeoTiledMapReply*>(sender());
+ if (!reply)
+ return;
+
+ if (!d->map_.contains(reply)) {
+ reply->deleteLater();
+ return;
+ }
+
+ TileSpec spec = d->map_.value(reply);
+
+ d->map_.remove(reply);
+ d->invmap_.remove(spec);
+
+ handleReply(reply, spec);
+}
+
+void QGeoMappingManagerEngine::handleReply(QGeoTiledMapReply *reply, const TileSpec &spec)
+{
+ Q_D(QGeoMappingManagerEngine);
+
+ if (reply->error() == QGeoTiledMapReply::NoError) {
+ QByteArray bytes = reply->mapImageData();
+ emit tileFinished(spec, bytes);
+ } else {
+ emit tileError(spec, reply->errorString());
+ }
+
+ if (d->queue_.isEmpty())
+ emit queueFinished();
+
+ reply->deleteLater();
+}
+
/*!
Sets the name which this engine implementation uses to distinguish itself
from the implementations provided by other plugins to \a managerName.
@@ -141,42 +261,23 @@ int QGeoMappingManagerEngine::managerVersion() const
return d_ptr->managerVersion;
}
-/*!
-\fn QGeoMapData* QGeoMappingManagerEngine::createMapData()
-
- Returns a new QGeoMapData instance which will be managed by
- this manager.
-
- A QGeoMapData instance contains and manages the information about
- what a QGraphicsGeoMap is looking at. A single manager can be used by several
- QGraphicsGeoMap instances since each instance has an associated QGeoMapData instance.
-
- The QGeoMapData instance can be treated as a kind of session object, or
- as a model in a model-view-controller architecture, with QGraphicsGeoMap
- as the view and QGeoMappingManagerEngine as the controller.
-
- Subclasses of QGeoMappingManagerEngine are free to override this function
- to return subclasses of QGeoMapData in order to customize the
- map.
-*/
-
-/*!
- Returns a list of the map types supported by this engine.
-*/
-QList<QGraphicsGeoMap::MapType> QGeoMappingManagerEngine::supportedMapTypes() const
-{
- Q_D(const QGeoMappingManagerEngine);
- return d->supportedMapTypes;
-}
-
-/*!
- Returns a list of the connectivity modes supported by this engine.
-*/
-QList<QGraphicsGeoMap::ConnectivityMode> QGeoMappingManagerEngine::supportedConnectivityModes() const
-{
- Q_D(const QGeoMappingManagerEngine);
- return d->supportedConnectivityModes;
-}
+///*!
+// Returns a list of the map types supported by this engine.
+//*/
+//QList<QGraphicsGeoMap::MapType> QGeoMappingManagerEngine::supportedMapTypes() const
+//{
+// Q_D(const QGeoMappingManagerEngine);
+// return d->supportedMapTypes;
+//}
+
+///*!
+// Returns a list of the connectivity modes supported by this engine.
+//*/
+//QList<QGraphicsGeoMap::ConnectivityMode> QGeoMappingManagerEngine::supportedConnectivityModes() const
+//{
+// Q_D(const QGeoMappingManagerEngine);
+// return d->supportedConnectivityModes;
+//}
/*!
Returns the minimum zoom level supported by this engine.
@@ -203,32 +304,44 @@ qreal QGeoMappingManagerEngine::maximumZoomLevel() const
return d->maximumZoomLevel;
}
-/*!
- Sets the list of map types supported by this engine to \a mapTypes.
-
- Subclasses of QGeoMappingManagerEngine should use this function to ensure
- that supportedMapTypes() provides accurate information.
-*/
-void QGeoMappingManagerEngine::setSupportedMapTypes(const QList<QGraphicsGeoMap::MapType> &mapTypes)
+///*!
+// Sets the list of map types supported by this engine to \a mapTypes.
+
+// Subclasses of QGeoMappingManagerEngine should use this function to ensure
+// that supportedMapTypes() provides accurate information.
+//*/
+//void QGeoMappingManagerEngine::setSupportedMapTypes(const QList<QGraphicsGeoMap::MapType> &mapTypes)
+//{
+// Q_D(QGeoMappingManagerEngine);
+// d->supportedMapTypes = mapTypes;
+//}
+
+///*!
+// Sets the list of connectivity modes supported by this engine to \a connectivityModes.
+
+// Subclasses of QGeoMappingManagerEngine should use this function to ensure
+// that supportedConnectivityModes() provides accurate information.
+
+// If createMapData does not specify a connectivity mode the first mode from
+// \a connectivityModes will be used, or QGraphicsGeoMap::NoConnectivity will
+// be used if \a connectivityModes is empty.
+//*/
+//void QGeoMappingManagerEngine::setSupportedConnectivityModes(const QList<QGraphicsGeoMap::ConnectivityMode> &connectivityModes)
+//{
+// Q_D(QGeoMappingManagerEngine);
+// d->supportedConnectivityModes = connectivityModes;
+//}
+
+void QGeoMappingManagerEngine::setTileSize(const QSize &tileSize)
{
Q_D(QGeoMappingManagerEngine);
- d->supportedMapTypes = mapTypes;
+ d->tileSize = tileSize;
}
-/*!
- Sets the list of connectivity modes supported by this engine to \a connectivityModes.
-
- Subclasses of QGeoMappingManagerEngine should use this function to ensure
- that supportedConnectivityModes() provides accurate information.
-
- If createMapData does not specify a connectivity mode the first mode from
- \a connectivityModes will be used, or QGraphicsGeoMap::NoConnectivity will
- be used if \a connectivityModes is empty.
-*/
-void QGeoMappingManagerEngine::setSupportedConnectivityModes(const QList<QGraphicsGeoMap::ConnectivityMode> &connectivityModes)
+QSize QGeoMappingManagerEngine::tileSize() const
{
- Q_D(QGeoMappingManagerEngine);
- d->supportedConnectivityModes = connectivityModes;
+ Q_D(const QGeoMappingManagerEngine);
+ return d->tileSize;
}
/*!
@@ -364,32 +477,6 @@ void QGeoMappingManagerEngine::setSupportsTilting(bool supportsTilting)
}
/*!
- Returns whether custom map objects are supported by this engine.
-
- Custom map objects are map objects based on QGraphicsItem instances, which
- are hard to support in cases where the map rendering is not being
- performed by the Qt Graphics View framwork.
-*/
-bool QGeoMappingManagerEngine::supportsCustomMapObjects() const
-{
- Q_D(const QGeoMappingManagerEngine);
- return d->supportsCustomMapObjects;
-}
-
-/*!
- Sets whether custom map objects are supported by this engine to \a supportsCustomMapObjects.
-
- Custom map objects are map objects based on QGraphicsItem instances, which
- are hard to support in cases where the map rendering is not being
- performed by the Qt Graphics View framwork.
-*/
-void QGeoMappingManagerEngine::setSupportsCustomMapObjects(bool supportsCustomMapObjects)
-{
- Q_D(QGeoMappingManagerEngine);
- d->supportsCustomMapObjects = supportsCustomMapObjects;
-}
-
-/*!
Sets the locale to be used by the this manager to \a locale.
If this mapping manager supports returning map labels
@@ -422,7 +509,7 @@ QGeoMappingManagerEnginePrivate::QGeoMappingManagerEnginePrivate()
supportsTilting(false),
minimumTilt(0.0),
maximumTilt(0.0),
- supportsCustomMapObjects(false) {}
+ started_(false) {}
QGeoMappingManagerEnginePrivate::~QGeoMappingManagerEnginePrivate() {}