summaryrefslogtreecommitdiff
path: root/src/imports/positioning/positioning.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Always step QML versions when Qt steps a versionAlex Blasche2017-12-081-4/+2
| | | | | Change-Id: I2b9751dcdcee4a5d8d3353bfc2fcc43cd995b584 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Fix for non-existing QtPositioning 5.9Paolo Angelelli2017-06-081-4/+4
| | | | | | Change-Id: I5190564ef3e4a25f1e387c8918ec269a0a52bbea Task-number: QTBUG-61266 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Doc: correct link issueNico Vertriest2017-04-261-2/+2
| | | | | | | positioning.cpp: cannot link to 'geoshape.contains' Change-Id: I610dfe90432a224b2e20825c68d24c795774ae09 Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
* Add geopath qml basic type documentationPaolo Angelelli2017-04-101-0/+32
| | | | | | | Change-Id: I4f0b09cb8aac0b4d4f2d27cf350a30b7ed800f11 Reviewed-by: Nico Vertriest <nico.vertriest@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
* Merge remote-tracking branch 'origin/5.8' into 5.9Liang Qi2017-02-021-3/+3
|\ | | | | | | Change-Id: I07a2f4160750b548dfee882cb9b5b057d83236e2
| * Update QtLocation and QtPositioning QML versions for 5.8 releasev5.8.0-rc1v5.8.05.8.0Alex Blasche2016-12-071-3/+3
| | | | | | | | | | | | Change-Id: I780c23ae48c548e799c853cd3a5ac1aa77586839 Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io> Reviewed-by: Michal Klocek <michal.klocek@qt.io>
* | Rename QGeoProjection to QWebMercatorPaolo Angelelli2017-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | 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>
* | Add support for QGeoPathPaolo Angelelli2016-12-011-0/+3
|/ | | | | | | | | | | | | | 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>
* Improve robustness of QML plugin loadingSimon Hausmann2016-08-261-1/+1
| | | | | | | | | Use a variable that expands to the latest plugin version instead of hard-coding the string. Change-Id: I8f7864e4ead85487943ed2c4dc2ae2584005c1c9 Reviewed-by: Paolo Angelelli <paolo.angelelli@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Update QML version to 5.7 for QtPositioning and QtLocationAlex Blasche2016-04-291-1/+1
| | | | | Change-Id: Ibbd06c3bc6c2c745a8e2fc6ee12a974bb40bf80a Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Enable using the module in a statically linked applicationAndy Shaw2016-02-041-0/+8
| | | | | Change-Id: I2c9652f13421b21cee2cd07c65918aacc4e1a836 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Updated license headersAntti Kokko2016-01-201-14/+20
| | | | | | | | | | 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>
* Cache coordToMercator result during coordinate animationsMichal Klocek2015-07-031-1/+1
| | | | | | | | | | A calculation of Mercator transformations is expensive. Cache calculated values in QGeoMercatorCoordinatePrivate. Caching is only enabled for QGeoCoordinateAnimation. Default coordinate interpolation does not use caching. Change-Id: I5fe67e6a3da6e4b01c0e0ad33d1f45a152660937 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix map flick animation in qdeclarativegeomapgestureareaMichal Klocek2015-06-301-1/+1
| | | | | | | | | | | | Current implementation is using QPropertyAnimation for flick, which was suitable for old QML1. Use QQuickCoordinateAnimation instead. This change is necessary to control what type of coordinate interpolation is used for flicks. It reverts 58d8b5e84ac6952b411cff3bca7336073349290e. Task-number: QTBUG-46147 Change-Id: I0a3bf263147b3733c617d38c364f66173b806de5 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add new types of interpolation to CoordinateAnimationMichal Klocek2015-06-231-2/+2
| | | | | | | | | | | | | | A longitude animation can go in two directions West and East. Current implementation is always using the shortest animation path between two coordinates. Provide setting to overload this behavior. Add 'direction' setting to CoordianteAnimation. Implement two new interpolators and provide new private implementation derived form qquickpropertyanimation. Change-Id: Ida70780c8aef60ebea7a8b8d59f115c583430374 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Register location/position qmlplugins with 5.6Michal Klocek2015-06-031-1/+1
| | | | | | Task-number: QTBUG-40043 Change-Id: I28beeae5d550cdc33ec4ab469043745e6cb8d299 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* More fixes to geoshape.type qml documentationAlex Blasche2015-05-221-0/+3
| | | | | | | | | | | - Add \since information. We cannot use \since directly as geoshape is not documentated by proper class doc style. - Add section heading. Change-Id: I0ea15617439454627a34ced78168cdb212beab5f Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Fix crash when initiating map flick w/o QtPositioning importAlex Blasche2015-05-201-0/+1
| | | | | | | | | | | | | | | | | | A map flick requires a QPropertyAnimation for a QGeoCoordinate. The required animation interpolator is exported by the QtPositioning QML plugin. In general a QML Location app should always import QtPositioning as well. In this case the import was missing and subsequently the interpolator for the QGeoCoordinate was never registered. This patch ensures that the QtLocation QML code that requires the animation registers the interpolator in addition to the regular QtPositioning registration. Change-Id: I61759418f0cdf1cb30ff946cc325a112e90c1a2f Task-number: QTBUG-46147 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Add missing documentation for QtPositioning and fix qdoc warningsAlex Blasche2015-02-251-2/+8
| | | | | Change-Id: I396f937f945f158e7bb19f1f7e4633cfcdeffb72 Reviewed-by: Topi Reiniö <topi.reinio@digia.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>
* Prepare QtLocation & QtPositioning QML type definition for Qt 5.5Alex Blasche2015-02-171-0/+3
| | | | | | | | | | | | | The GeoShape is compatibile as the class name changes but the functionality and naming is the same in QML. The QtLocation changes are additions which become available and Qt 5.5. is the first official release anyway. Hence the normal rules about \since do not apply. Change-Id: I41d8afea955001845ab143535f6653fce715b9d8 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.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>
* Cleanup QtQml header includes in Positioning and LocationAlex Blasche2015-01-271-3/+0
| | | | | | Change-Id: Ib79de53b05cc5a9edf4ed84021b90809c9816052 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Michal Klocek <michal.klocek@digia.com>
* Re-add removed docs for QtPositioning QML value typesAlex Blasche2015-01-151-0/+417
| | | | | | | | | | | The documentation was removed by 8bf0a15bfc124fbb664592d4c3f29973fc23262e The change includes and update of the content as well. Change-Id: I2200d989d0de343f9b2776388a4bc3a989851f1f Reviewed-by: Michal Klocek <michal.klocek@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Cleanup qRegisterMetaType<T>() callsAlex Blasche2015-01-151-5/+5
| | | | | | | The non-parameter version is much more secure. Change-Id: I70612c60d780a972bbf9c852f50f7b0c6f2a0402 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
* Remove temporary operator< for QtPositioning value typesAlex Blasche2015-01-151-4/+4
| | | | | | | | | | | | The operators were added by 8bf0a15bfc124fbb664592d4c3f29973fc23262e. They were required to enable QML comparison of those value types. This requirement was removed by the introduction of QMetaType::registerEqualsComparator() in Qt 5.5. Change-Id: I3950726c26144420157f12b59b9c15cc1f5ffc40 Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com> Reviewed-by: Michal Klocek <michal.klocek@digia.com>
* Make QtLocation work after internal valuetype changes in QtQMLAlex Blasche2015-01-081-15/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The value type wrapper code was completely removed. Instead QGeoShape & derived classes and QGeoCoordinate use Q_GADGET to advertise their meta data which in turn allows QtQML to dynamically discover the types when needed. This implies that the above C++ classes become larger as the meta data is permanently added. On the positive side all QML value type wrapper were removed which reduces the QML plugin size. At the same time it becomes significantly easier to use those types in other QML plugins such as the QtLocation one. Unfortunately this change comes with an unavoidable behavior change as well. Previously is was possible to set a width and height on an invalid QML rectangle. In the case of an invalid rect it was made valid (setting center to 0,0) before setting the height or width. The QGeoRectangle class explicitly aborts calls to setHeight() and setWidth() in case of an invalid rect. From now on the C++ class behavior is used in QML too. This was the reason for the change to tst_map_routing.qml in this patch. Incidentally the documentation always referred to the QGeoRectangle documentation and thus always stated the now new behavior. Documentation for the value types and the relevant behavior changes will be re-added in a later commit. Each Gadget must be registered using QMetaType::registerComparators<T>() to enable == and != operators in QML. Unfortunately QMetaType requires the operator< which does not make any sense for the value types touched by this patch. Right now, a warning is printed. Attempts will be made to remove the operator< requirement in QMetaType. Otherwise the warning has to be removed before the release as they are printed very often. [ChangeLog][QtPositioning][Important Behavior Changes] The QML rectangle type ignores setting of the height and width if the rectangle is invalid. Previously the property setter changed the rectangle center to QGeoCoordinate(0,0) before setting the height and width of a previously invalid rectangle. Change-Id: Iab98ede58066ce03b2b4e0ce03ed85ba7ecb1020 Reviewed-by: Simon Hausmann <simon.hausmann@digia.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>
* Add magneticVariation and magneticVariationValid property to QML PositionAlex Blasche2014-08-141-1/+1
| | | | | | | | | [ChangeLog][QtPositioning][Position] Added magneticVariation and magneticVariationValid property to the QML Position type Task-number: QTBUG-39547 Change-Id: I59d0039f2b501701f67404dabef2ab4c62bcb16b Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Merge remote-tracking branch 'origin/stable' into devSergio Ahumada2014-05-221-1/+1
|\ | | | | | | | | | | | | Conflicts: tests/auto/qgeocameratiles/tst_qgeocameratiles.cpp Change-Id: I2bf1657c6dd3b73e654e7db8bdadadfb293e2180
| * Add missing classname entry for positioning and location qml module.v5.3.0-rc1v5.3.0Alex Blasche2014-05-051-1/+1
| | | | | | | | | | | | Task-number: QTBUG-38770 Change-Id: Id4577bd23858880b6f406f9d82a8e5195c4e3d8c Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
* | Fix typo in source code commentsAlex Blasche2014-04-021-1/+1
| | | | | | | | | | | | Change-Id: Id06713fea9ce90436a3d65a84cdbd70f07cd9397 Reviewed-by: Rainer Keller <rainer.keller@digia.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* | Introduce "QtPositioning 5.4" QML import tagAlex Blasche2014-03-061-10/+6
|/ | | | | | | | | | | 5.2 declaration is no longer needed as it is implicitly done by 5.3/5.4. The 5.4 declaration is just a redeclaration to introduce 5.4. If a new type is introduced or an existing type changed it can be removed in favor of the changed type. Change-Id: I2113751faff062feaa2f7ea5e3ab9f290e90f0c2 Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com> Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Add direction and vertical speed properties to QML Position type.Aaron McCarthy2014-02-101-0/+3
| | | | | | | | | | | | | | | The QML and C++ position types now provide the same functionality. Position attributes are always set/reset on every position update. This ensures that old values of speed, accuracy, direction, and vertical speed are not indefinitely reported in QML. Values are set to NaN and if appropriate the associated is valid property is set. [ChangeLog][QtPositioning][Position] Added direction and vertical speed properities. Change-Id: Ia02da8a5bc1cd68489eb58180986df512c24aa2f Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Introduces 5.3 QML APIs.Alex Blasche2013-10-241-1/+2
| | | | | | | | | | Existing 5.2 QML APIs automatically become available under 5.3 import tags too Change-Id: I5101c63eaaa00a124475bbc7f60fda0eecfde6ec Reviewed-by: Erik Mattsson <erik.mattsson@appello.com> Reviewed-by: Anders Gunnarsson <anders.gunnarsson@appello.com> Reviewed-by: Aaron McCarthy <mccarthy.aaron@gmail.com>
* Merge branch 'stable' into devAlex Blasche2013-10-221-11/+25
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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-11/+23
| | | | | | | | | | | | | | | | | | 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>
* | Make geo coordinates animatable in QML.Albin Olsson2013-10-111-0/+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>
* Split QtLocation into QtPositioning and QtLocationAlex Blasche2013-09-021-0/+123
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>