summaryrefslogtreecommitdiff
path: root/src/positioning
Commit message (Collapse)AuthorAgeFilesLines
* Fix outdated BSD license headerKai Koehne2017-10-173-9/+39
| | | | | | | Use new version with commercial exception. Change-Id: I11058c94138615f7df2f99b6c3245ab075cd8222 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix outdated FDL headerKai Koehne2017-10-177-35/+35
| | | | | Change-Id: Ie9771204ea1aa46e333d96ab0f392c795c512946 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add a configure feature for each geoservice pluginPaolo Angelelli2017-08-301-1/+1
| | | | | | | | This patch makes it possible to disable geoservice plugins at configuration time using the QtLite -no-feature-geoservices_xxx syntax. Change-Id: I276382833db8cfca27383705cbb3f994ced47cb3 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix visible region computation in QGeoProjectionWebMercatorPaolo Angelelli2017-08-091-1/+1
| | | | | | | | | | | | | | | | | | | | | Currently the visible region is calculated as the intersection between the viewing frustum and the map plane clipped against the map extended rectangle in mercator space (from -1 to 2 in x coords, 0 to 1 in y coords). The result is correct in the extended mercator space. However, this may lead to overlapping coordinates when converted back to latitude and longitude. For this reason, this patch changes the clipping geometry to be the map un-extended rectangle centered around the current map center. The result is a geometry that never wraps around or overlaps, thus removing the need for handling separately the case when the map is fully visible when returning the visible region. Task-number: QTBUG-57690 Change-Id: I8396c40a123ce94bff4388dfefbd8a694657b8bd Reviewed-by: BogDan Vatra <bogdan@kdab.com>
* Fix for incorrect QGeoPathPrivate::containsPaolo Angelelli2017-06-061-1/+1
| | | | | Change-Id: I4067d6df69aad0af9495a29532a34f0a7e992596 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Fix NMEA time parsing errorOleg Evseev2017-05-161-1/+1
| | | | | | | | | Before this patch parsing time strings with less than 3 digits for number of milliseconds gave the wrong time result. Task-number: QTBUG-60814 Change-Id: Iab354bf47c0f7def3752326fe3ef2845d4be31c1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Move QGeoRectangle definition inside qgeorectangle.hPaolo Angelelli2017-05-036-87/+88
| | | | | | Change-Id: I7d0bb4eac89ca9a018f71faa9d73f62d97a24085 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Remove QtGui dependency from QDoubleMatrix4x4Alex Blasche2017-04-112-1/+2
| | | | | | | | | This fixes the -no-gui build. Task-number: QTBUG-60062 Change-Id: I71400dfddac8ddf6a74906be8ba1272bf4a86781 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix size conversion warningsThiago Macieira2017-04-111-2/+2
| | | | | | | | | Found by MSVC 2015 qclipperutils.cpp(65): warning C4267: 'argument': conversion from 'size_t' to 'int', possible loss of data Change-Id: I523b0abacd5148b2bf08fffd14b41a36046adafa Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix DLL linkage of operator>>(QDataStream, QDoubleMatrix4x4)Thiago Macieira2017-04-111-1/+1
| | | | | | | | | | | | | It's marked as exported from QtGui, yet the implementation is in qdoublematrix.cpp. That cannot be. Found by MSVC 2015: qdoublematrix4x4.cpp(1097): warning C4273: 'operator >>': inconsistent dll linkage qdoublematrix4x4_p.h(939): note: see previous definition of '>>' Change-Id: I523b0abacd5148b2bf08fffd14b419faf3d1e584 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: Complete parameter documentationNico Vertriest2017-04-102-2/+4
| | | | | | | | | | | qdeclarativegeomap.cpp: 1327: warning: Can't link to 'Component.onCompleted' qgeopath.cpp:117: warning: Undocumented parameter 'width' in QGeoPath::QGeoPath() qgeopath.cpp:117: warning: Undocumented parameter 'path' in QGeoPath::QGeoPath() qgeoshape.cpp:90: warning: Undocumented enum item 'PathType' in QGeoShape::ShapeType qgeoshape.cpp:231: warning: No such parameter 'QGeoRectangle' in QGeoShape::boundingGeoRectangle() Change-Id: Ie57dff2aabe82d61b8122362a396ac706939c3b3 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Optimize QtPositioning release buildPaolo Angelelli2017-03-141-0/+1
| | | | | | | | With this patch the vector math in QtPositioning .cpp files should also get the -O3 flag when building release Change-Id: I11cd1e1bdcfb4c49f4782d02ad48528cb2e48fec Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-03-101-3/+0
|\ | | | | | | Change-Id: Ibd6d68ced4edbd96fb67fe61244b83d597df5775
| * Fix build with -no-feature-libraryUlf Hermann2017-03-061-3/+0
| | | | | | | | | | | | | | | | | | Drop unnecessary guards around QFactoryLoader (which is available without QLibrary) and drop an unused include. Change-Id: I0368eb857474fc728f1dad76977758b6d773f1d6 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Increase the QGeoCoordinate debug operator precisionAlex Blasche2017-03-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The current precision of 6 digits only ever guarantees 110m on Earth. That's not sufficient for some use cases. A precision of 11 guarantees at least 8 digits after the comma since there are at most three digits before the comma. The 8th digit reflects a geographical precision of 1.1 mm on earth. More precision for navigation purposes is not needed. Task-number: QTBUG-59259 Change-Id: I4f59c152171c3a71f22aa7520718d0fcb611b697 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Use qRadiansToDegrees() and qDegreesToRadians() more widelyEdward Welbourne2017-02-275-44/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | They document intent more clearly (and replace *two* local hand-rolled versions of each). Also kill an extraneous #include of <math.h>; and switch to qmath.h as source for M_PI, replacing the M_PID value (and friends) previously provided by (thankfully private) qlocationutils_p.h (at more precision than even long double would retain - qmath.h's M_PI is entirely sufficient even for long double, as is the Linux <math.h> one). Task-number: QTBUG-58083 Change-Id: I6fa4abd3c8ed9c826998f2cdc2aefc51681c19c1 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | Remove moc_* inclusions from source filesPaolo Angelelli2017-02-144-9/+0
| | | | | | | | | | | | Change-Id: I7385348d7b6ec22fa92ed1be65f89e262c38b5c0 Reviewed-by: Michal Klocek <michal.klocek@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Adapt QQuickGeoMapGestureArea to work with tilted and rotated mapsPaolo Angelelli2017-01-261-5/+5
| | | | | | | | | | | | | | | | This patch fixes the handling of pan/flick/pinch in presence of tilt or bearing. Change-Id: Iad04fd92e1c8e318e3b1b0d344852c81e554ebb7 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* | Use geoshapes as geo-model in qdeclarativegeomapitemsPaolo Angelelli2017-01-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch uses QGeoShapes as data model inside the QDeclarativeMapItemBase subclasses. Advantages: - avoids duplication of implementation for geo-related methods (now only inside QGeoShapes). - provides map items a bounding box, usable for area based item searching ,or simple viewport fitting - allows to follow the graphics-view pattern, and have the same items visualized in different Maps (not yet supported). Change-Id: I6eec738fef5d753d90bdeeb4b109be89155b25f8 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add clipping for rotated/tilted Map ItemsPaolo Angelelli2017-01-267-16/+262
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds proper rotation/tilting support to Map Items. To do so, clipping is now performed in wrapped mercator space instead of screen space. This prevents projection of geo coordinates that ended behind the camera, and that would be projected incorrectly by the projection transformation. This patch therefore does not use the screen clipping code any longer (clipPathToRect), since the geometry has already been clipped. The downside is that updateSourcePoints is now necessary for any viewport change. This would be necessary anyway in presence of tilt or rotation. NB: Handling of MapQuickItems with zoomLevel set is still TODO. Future work: 1) Optimize updateSourcePoints by pre-computing the mercator projection of the geometry, and let updateSourcePoints do only the wrapping/clipping/projection-to-screen operations. 2) Remove updateScreenPoints altogether Change-Id: Ie0d3dbef68d48ac97a596d40240d0ac126c0efaf Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | Add rotation and tilt controls to QDeclarativeGeoMapPaolo Angelelli2017-01-251-14/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | Make QGeoProjectionWebMercator use a projection matrixPaolo Angelelli2017-01-234-1/+2068
| | | | | | | | | | | | | | | | | | | | | | This patch changes the way QGeoProjectionWebMercator implements its operations -to and -from screen coordinates. By using a double matrix 4x4 instead of only scaling and shifting this will make it possible to convert coordinates also in presence of bearing and tilting != 0 Change-Id: I6a74a9675a7ad397ec6ad32f4274f897aa7694b1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Rename QGeoProjection to QWebMercatorPaolo Angelelli2017-01-166-27/+28
| | | | | | | | | | | | | | | | | | | | 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>
* | Deprecate QGeoShape::extendShapePaolo Angelelli2016-12-075-1/+35
| | | | | | | | | | | | | | | | | | | | | | | | As the collection of QGeoShapes grows, this method loses its scope, as it would have undefined behavior for certain shapes (polygon, or polyline, for example). Therefore the base class virtual method is now deprecated, with the documentation pointing to the specific implementations instead. Change-Id: I9717df092b8686b5413556858e9dfe7eaa92dd80 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add support for QGeoPathPaolo Angelelli2016-12-016-4/+924
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds an addition qgeoshapes, QGeoPath. This represents a geographical path where each consecutive geopoints are connected along the shortest line of constant bearing (rhumb line). The path has a width, in meters, that is used in the contains() method to decide whether a coordinate is or not on the path, based on shortest distance to the rhumb line segments. Change-Id: Ia02780e3c8ac6c6d63a6083f53ea0677f8a21a1d Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Use QLocationUtils::wrapLong thoughout the codePaolo Angelelli2016-11-303-37/+8
| | | | | | | | | | | | | | | | This patch remove if-else used to wrap longitude in the codebase, replacing with the existing utility method wrapLong Change-Id: I7a6eefa6f40b3dd0f47fec987c9197e294303873 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Change QGeoRectangle::translate to not modify the rectanglePaolo Angelelli2016-11-301-27/+9
| | | | | | | | | | | | | | | | | | | | QGeoRectangle::translate currently modifies the rectangle if the latitudinal offset brings the rectangle out of bounds. This patch changes the behavior of the translation, clamping the latitudinal offset, and preventing changes to the rectangle geometry. Change-Id: Iedb8823bbd6e3c04ee499bb9f9945049a9590aae Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Add support for boundingGeoRectangle to QGeoShapePaolo Angelelli2016-11-3010-109/+288
|/ | | | | | | | | | | | this patch introduces QGeoShape::boundingGeoRectangle, which returns a QGeoRectangle containing the latitudinal/longitudinal bounds of a geoshape. The bounding geo rectangle is projection independent, as it returns a georectangle containing the min/max latitudes/longitudes of the shape. Change-Id: Ie3a83ec41f87ea3753899d2278e664fe2469f778 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge remote-tracking branch 'gerrit/5.7' into 5.8Alex Blasche2016-11-021-0/+93
|\ | | | | | | | | | | | | Conflicts: tests/auto/declarative_ui/BLACKLIST Change-Id: I0f6c9228c899c4d1d55fffc596c661ee0f6c2b66
| * Merge remote-tracking branch 'gerrit/5.6' into 5.7Alex Blasche2016-11-021-0/+93
| |\ | | | | | | | | | | | | | | | | | | | | | Conflicts: src/imports/location/qdeclarativegeomap.cpp src/location/maps/maps.pri Change-Id: I346d7351e98f4a1aa67c9c0401d41b6da9099f48
| | * Add OSRMv5 support in osm pluginPaolo Angelelli2016-10-061-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the OSRMv5 protocol (the only one currently available on the OSRM demo server router.project.osrm.org). Support for the old v4 protocol is retained, in case of users who supply their own osm.routing.host parameter pointing at a self hosted OSRMv4 server. The support for OSRMv4 and v5 has been moved away from the osm plugin and into the location module because this should be used in the mapbox plugin in a subsequent patch (the routing support in the mapbox plugin currently uses the text direction coming from the server, which does not support i18n) Task-number: QTBUG-56119 Change-Id: Id30fd536c7fd434011795f643221f55becfc9e18 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* | | Fix symmetry of streaming in QDataStreamThiago Macieira2016-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | If one uses int to stream in, then use int to stream out too. Change-Id: Ic46ff326a6ba46bc877cfffd1483206384439f78 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | | Convert qtlocation to the new configure systemLars Knoll2016-10-281-0/+48
|/ / | | | | | | | | | | | | | | And clean up the code detecting gypsy and the WinRT positioning API. Change-Id: Ic561d565d6fc733703ef6c0dc164e737e0b3d4fd Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Doc: Remove references to Windows CEVenugopal Shivashankar2016-08-181-3/+0
| | | | | | | | | | | | | | | | The platform is not supported since Qt 5.7 Task-number: QTBUG-55331 Change-Id: Iba1146abaa8b17537453c367aed2a7c58e0aacda Reviewed-by: Martin Smith <martin.smith@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-08-161-1/+1
|\ \ | |/ | | | | Change-Id: I1903c3a181663c424f0ff13abcc9fb7a5bdb784e
| * Doc: Change instances of 'OS X' to 'macOS'Topi Reinio2016-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | As of version 10.12 (Sierra), the name of Apple's desktop operating system will be macOS. Change all occurrences where the platform is discussed to use the macro \macos (defined in the documentation configuration in qtbase). Change-Id: Iea1581dc1929e53d710a2fc5eedbdf560a2d225f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
* | Remove obsolete WinCE doc from QGeoPositionInfoSourceAlex Blasche2016-07-191-3/+0
| | | | | | | | | | Change-Id: Ie5c08b9a4bf9a4adc7c02ff81eb94b547c305dba Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Simon Hausmann2016-05-181-1/+1
|\ \ | |/ | | | | Change-Id: Ifed3a326085bd4aaff069007966efd6932c2be3b
| * Doc: Remove repository name from examplesinstallpathTopi Reinio2016-05-181-1/+1
| | | | | | | | | | | | | | | | Examples in binary packages now directly match the install path. Change-Id: I9315d395c4546adfa58e264f66d98fb443ab1e72 Task-number: QTBUG-52953 Reviewed-by: Antti Kokko <antti.kokko@qt.io>
* | Fix for negative QGeoCoordinate.azimuthTo results in range ]360, 359[Paolo Angelelli2016-04-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | QGeoCoordinate.azimuthTo() currently returns negative value (between 0 and -1) for azimuths that should instead be in the range between 360 and 359. This patch should bring all returned values in the range [0, 360[ (360 excluded). Change-Id: I0b5ee7c3fc2bbeb80ca8167a53c7c16d9e067e29 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-04-081-0/+2
|\ \ | |/ | | | | Change-Id: I9e85d2002151f7c53d2edbb4d8a078816aff693e
| * winrt: add default capabilitiesMaurice Kalinowski2016-04-081-0/+2
| | | | | | | | | | | | | | | | | | | | A module compiled for WinRT should define a default set of capabilities to enable all features specified by the module. Task-number: QTBUG-38802 Change-Id: Icaf02178eeb81c76128c1fc886aa6363d74e07ee Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-03-089-363/+1
|\ \ | |/ | | | | Change-Id: I18bb1c341e7d87cd1d649f2c3fc9c50141c6a1a9
| * Add explicit and make public headers compile with ↵Marc Mutz2016-03-031-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | -Wzero-as-null-pointer-constant ... or equivalent. QtBase 5.6 headers already compile that way, so let the other modules follow suit. Added explicit where it was missing. This is not a source- incompatible change, because code that breaks by this is a bug. Let's not have this sitting around in an LTS. Task-number: QTBUG-45291 Change-Id: I279fd100b61d3e2b2e46e7cbd30cc6b4bfb4d10e Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Update examples documentation locationMichal Klocek2016-02-268-362/+0
| | | | | | | | | | | | | | | | | | | | The current way of documenting examples is to include qdoc and images source into example directory. Fix examples in location and positioning. Replace planespotter.jpg with png. Change-Id: I4eeacbfa575e7ae3ef747703348f2f201899e548 Reviewed-by: Topi Reiniö <topi.reinio@theqtcompany.com>
* | Add hash function for QGeoCoordinateAlex Blasche2016-03-022-0/+19
| | | | | | | | | | | | | | | | | | [ChangeLog][QtPositioning][General] Added qHash(QGeoCoordinate()). Task-number: QTBUG-51404 Change-Id: I02c6dc0a5399ebf3181b34ffa58a82a2119118a0 Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.6' into devLiang Qi2016-01-262-0/+13
|\ \ | |/ | | | | Change-Id: I23c874c5dcd0452142c3cf8abff65415ad31a1e7
| * Add "We mean it." comment to qpositioningglobal_p.h.Friedemann Kleint2015-12-151-0/+11
| | | | | | | | | | | | | | | | Fix warning: QtPositioning: WARNING: qtlocation/src/positioning/qpositioningglobal_p.h does not have the "We mean it." warning Change-Id: I72d276587e2d1476be3ec26f1e86d0aa9865ac65 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
| * Fix broken weatherinfo exampleAlex Blasche2015-12-071-0/+2
| | | | | | | | | | | | | | | | | | openweathermap.org requires an appid these days. The free plan permits usage for commercial and non-commercial cases. Task-number: QTBUG-49772 Change-Id: I28be90709b4879df515346e03372d494d94a4f01 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
* | Updated license headersAntti Kokko2016-01-2052-730/+1042
| | | | | | | | | | | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: Iaee1a5fd53291752a1891710ee375ca32778b142 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>