summaryrefslogtreecommitdiff
path: root/src/positioning/qgeoshape.h
Commit message (Collapse)AuthorAgeFilesLines
* Move QGeoRectangle definition inside qgeorectangle.hPaolo Angelelli2017-05-031-82/+0
| | | | | | Change-Id: I7d0bb4eac89ca9a018f71faa9d73f62d97a24085 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Deprecate QGeoShape::extendShapePaolo Angelelli2016-12-071-0/+1
| | | | | | | | | | | | 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-011-1/+2
| | | | | | | | | | | | | | 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>
* Add support for boundingGeoRectangle to QGeoShapePaolo Angelelli2016-11-301-4/+85
| | | | | | | | | | | | 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>
* 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>
* 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>
* 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>
* Remove temporary operator< for QtPositioning value typesAlex Blasche2015-01-151-8/+0
| | | | | | | | | | | | 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-2/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Add center() function to QGeoShape.Aaron McCarthy2014-12-041-0/+2
| | | | | | | | | | | | | | It is frequently useful to calculate the geometric center of a shape. Both QGeoCircle and QGeoRectangle already define center() functions, however, the application developer must cast each QGeoShape into either a QGeoCirlce or QGeoRectangle before calling. Providing QGeoShape::center() allows application code to be simplified. Existing QGeoCircle::center() and QGeoRectangle::center() functions are kept for compatibility. Change-Id: I92b727ab5e713f70174588a27040446c992ae14e Reviewed-by: Alex Blasche <alexander.blasche@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>
* Added possibility to create a georectangle from a list of coordinatesErik Mattsson2013-10-071-0/+2
| | | | | | | | | | It will create the smallest possible rectangle that contains all of the coordinates. This is accessible from qml using the locationsingleton. The plan is to include the ability to fit the view-port of the map to a georectangle. Change-Id: I616ac8ef169f697e53a3d9ebcf114f4f2cde8298 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Split QtLocation into QtPositioning and QtLocationAlex Blasche2013-09-021-0/+103
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>