summaryrefslogtreecommitdiff
path: root/src/positioning/qgeorectangle.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Deprecate QGeoShape::extendShapePaolo Angelelli2016-12-071-0/+11
| | | | | | | | | | | | 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>
* Use QLocationUtils::wrapLong thoughout the codePaolo Angelelli2016-11-301-25/+5
| | | | | | | | 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-301-4/+8
| | | | | | | | | | | | 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>
* Workaround for failing conversion between Q_GADGET'sAlex Blasche2015-05-261-0/+18
| | | | | | | | | | | | | | QGeoRectangle and QGeoCircle are subclasses of QGeoShape. Before this patch setting a QGeoShape property of a QML object is not possible because the QGeoRectangle/QGeoCircle cannot be converted to a QGeoShape. This patch addresses the problem by providing custom converters for the above classes. It enables QVariant::convert() for the classes above. Change-Id: I7daba5254dad0df598324432db3b1819e68648b6 Task-number: QTBUG-46232 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Shift generic docs away from planespotter exampleAlex Blasche2015-05-071-1/+2
| | | | | | | | | They are more general and are linked to from other pages too. Change-Id: I828008e3692a593bf9343346508b9c0ad8183108 Task-number: QTBUG-45415 Reviewed-by: Topi Reiniƶ <topi.reinio@digia.com> Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
* Add missing documentation for QtPositioning and fix qdoc warningsAlex Blasche2015-02-251-23/+107
| | | | | 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>
* 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>
* Merge remote-tracking branch 'gerrit/5.4' into devAlex Blasche2015-01-091-20/+0
|\ | | | | | | Change-Id: I784619fd03371ec90e42b79dbb68afdda5dc5530
| * Remove Q_NO_USING_KEYWORD usageThiago Macieira2014-12-181-20/+0
| | | | | | | | | | | | | | Compilers that don't support the using keyword are too old Change-Id: I5337271984845bdecee058da9320197ccb6f6981 Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* | Make QtLocation work after internal valuetype changes in QtQMLAlex Blasche2015-01-081-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-17/+21
|/ | | | | | | | | | | | | | 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>
* Fix documentation errors.Aaron McCarthy2014-02-101-3/+2
| | | | | Change-Id: I16b4f9116a651edaebc54957daf528278785bc55 Reviewed-by: Alex Blasche <alexander.blasche@digia.com>
* Merge branch 'stable' into devAlex Blasche2013-10-221-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+1
| | | | | | | | | | | | | | | | | | 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>
* | Added possibility to create a georectangle from a list of coordinatesErik Mattsson2013-10-071-1/+67
|/ | | | | | | | | | 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/+899
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>