summaryrefslogtreecommitdiff
path: root/src/positioning/qgeopolygon.h
Commit message (Collapse)AuthorAgeFilesLines
* QGeoPath/QGeoPolygon: defer bbox computationPaolo Angelelli2018-12-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | | This patch introduces 2 versions of QGeoPath/polygon private: a lazy version (default) and an eager version. The reason is that certain classes such as MapItems make heavy use of the bounding box of the geoshapes, as well as the contains method, and in those cases it's beneficial to have it eagerly computed and cached. Other use cases do not see this feature so much in use, and the added costs, both in terms of computation and in terms of memory requirements for cached data can be avoided. As the patch currently stands, using copy constructors for QGeoPath and QGeoPolygon with a QGeoPathEager and a QGeoPolygonEager (and vice-versa) changes the type of d_ptr. This means that doing, for example, QGeoPath(someQGeoPathEager) effectively returns a QGeoPath that behaves like a QGeoPathEager (although not being one). Change-Id: I8cfed1e0a747139d0fb6d5fb5236bf5f5fbf24c1 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add hole support in QGeoPolygonJulian Sherollari2018-08-201-0/+6
| | | | | | | | [ChangeLog][QtPositioning] Added holes in QGeoPolygons Change-Id: I490bcf8c4a6d9f35fa364072d8ea70b914bfc640 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli@qt.io>
* Add property for QGeoPolygon's perimeter and QML autotests using itPaolo Angelelli2018-07-231-1/+7
| | | | | | | QML autotests were previously missing. Change-Id: Id2c3a7fc61c57cef369dda109dbbfca183979443 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add QGeoPolygon to QtPositioningPaolo Angelelli2017-08-041-0/+99
This patch introduces a new QGeoShape, QGeoPolygon, together with helper functions in the location singleton (QtPositioning.*) to create and convert geopolygons from QML. [ChangeLog][QtPositioning][QGeoPolygon] Added QGeoPolygon shape. Change-Id: I111c576d7428f2a953f0459d16c25eea7ab2bd7c Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>