summaryrefslogtreecommitdiff
path: root/src/location/declarativemaps/qdeclarativepolylinemapitem_p_p.h
Commit message (Collapse)AuthorAgeFilesLines
* Reorganize code for map items into separate folderVolker Hilsheimer2022-09-231-802/+0
| | | | | | | | | Splitting the code that only provides declarative wrappers around types from the implementations of the map and item rendering makes it easier to work with the code base and identify dependencies. Change-Id: I00064f928043dfa77f22e68b1efe54f414cb62f7 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Refactor: for loopsVolker Hilsheimer2022-09-141-4/+4
| | | | | | | | | | Replace indexed for loops with ranged for, replace int with qsizetype otherwise as appropriate. Apply const and line breaks in surrounding code. Pick-to: 6.2 Change-Id: I1c2ee372545b8ab2cbb84c4b4b97ae52dedff1d0 Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* More include cleanupVolker Hilsheimer2022-07-291-7/+10
| | | | | | | | | | | Remove includes of private headers from other modules where possible. Get rid of some duplicate includes, and try to group includes by module, with private includes in a separate block for better visibility where we have dependencies to private APIs. Pick-to: 6.2 Change-Id: Ia6419bee2a2c50463dcc515f3f1590a749dfabc1 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Use 'const' correctlyVolker Hilsheimer2022-07-281-5/+5
| | | | | | | | | | Don't return or pass const copies, use either plain copies or const references. Make getters const, make variables const, and use qAsConst in ranged for loops to avoid detaches. Pick-to: 6.2 Change-Id: If1463cf7f0077c08dedb15388d912b652c2b037c Reviewed-by: Oliver Eftevaag <oliver.eftevaag@qt.io>
* Port OpenGL dependent code to Qt6 updated graphics APILauri Laanmets2022-02-281-105/+7
| | | | | | | | | | | | All 'old' map object ported to new Qt6 API and tested (almost). Labs project is not tested. This is part of a bigger work to port QtLocation maps to Qt6. Task-number: QTBUG-96795 Change-Id: I0b748a7f4c37f4fcc0cad038e2846b7c86dec84e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Use up-to date LGPL license headerKai Köhne2021-12-021-11/+14
| | | | | | | | Remove usages of outdated LGPL3 header that references LICENSES.LGPLv3 instead of LICENSES.LGPL3. Change-Id: Ied647fc10d2bf051cccc8b38d75570b7caef1f28 Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
* Fix compilation for no opengl buildsMichal Klocek2021-03-251-1/+4
| | | | | | | | | | | | | Disables experimental labs qml plugin, which since a4469cad40 depends heavily on opengl backend. Fix warnings with msvc when compiling without experimental plugin. Task-number: QTBUG-91623 Fixes: QTBUG-88017 Change-Id: I53c5da915981bd05f39134ba57f585d0a0786aa8 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Merge branch '5.15' into devIvan Solovev2021-03-231-1/+1
|\ | | | | | | | | Task-number: QTBUG-91623 Change-Id: I3218a516d4ecb0030a14c692c7d3d94d5833c3fa
| * Add missing "override"Robert Loehning2020-04-281-1/+1
| | | | | | | | | | | | | | | | Fixes developer build with clang 7. Change-Id: I551a5b90d02f5ccb9a7e2e0f9e455d593237a562 Reviewed-by: Alex Blasche <alexander.blasche@qt.io> Reviewed-by: Paolo Angelelli <paolo.angelelli.qt@gmail.com>
* | Add ; to Q_UNUSEDLars Schmertmann2020-06-291-1/+1
| | | | | | | | | | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I1aaf36e893b8f947abd0770acd9d3007cffdcb10 Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* | Use QList instead of QVectorJarek Kobus2020-06-251-17/+18
|/ | | | | | Task-number: QTBUG-84469 Change-Id: Iefd2fb627602ef4744d80858eee72a089ef5f4ec Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Fix segmentation fault due to null pointer usagePaolo Angelelli2020-02-171-23/+3
| | | | | | Change-Id: I3b030728b32af6e340738583f78b2cfb0d2df11a Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
* Add geometry simplification to MapPolyline/MapPolylineObjectQSGPaolo Angelelli2020-02-121-11/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a metric-based implementation of the Ramer-Douglas-Peucker line simplification algorithm to generate a LOD pyramid for the polyline geometries. This comes with a related property (in MapItemBase), lodThreshold, that can be used to change the threshold after which no simplification will be used. By default the value of this property is 0, meaning that the behavior will be unchanged and no LOD will be used. This change also introduces LOD on map polyine objects QSG, for which no property is introduced, and there's a default threshold set to zoom level 12 (which appear to produce acceptable results). Finally, this patch makes use of a threadpool with 1 thread to enqueue geometry simplification tasks, which would otherwise freeze the UI when computing for the first time. Support for geometry simplification is currently added only to polylines. It might be of interest extending it to polygons as well, once a proper strategy for handling the simplification of inner holes has been identified. Finally, extending it to circles could be of interest, while potentially bringing only minor benefits, as circle geometries are currently fixed to 128 vertices. Also adds a MapObject-based delegate to the geojson viewer example. Task-number: QTBUG-46652 Task-number: QTBUG-38459 Task-number: QTBUG-49303 Change-Id: I64b5db4577962db17e5388812909285c9356ef0d Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Enable mercator-to-screen projection in GLSLPaolo Angelelli2020-02-111-0/+823
With this change, all the geo-to-screen conversion, and the triangulation operations for geo polylines and geo polygon are performed either at set time or in the shader. A separate bounding box geometry is processed in the old way to provide a correct QtQuick Item geometry, that can be used for nesting mouse areas, performing translations, input event delivery, etc. With this approach, performance are improved by more than one order of magnitude in average, but complex geometries will of course benefit more. It also adds correct rendering support for polygons with holes, previously only rendered correctly by the MapboxGL plugin. The polyline shader has basic miter joins. The miter is skipped if the angle is too sharp to avoid complicating the implementation. This shader introduces some glitches when the polyline is minified, for which the real fix is to have LOD for the geometry, and render simplified geometries at low zoom levels (added in a subsequent patch). Note: this approach, at least in its current implementation, does not support enabling layers on individual items, only on the Map element. Task-number: QTBUG-49303 Task-number: QTBUG-38459 Change-Id: I0c2dc0bf364d32f74ca7c4014f6d66e6219c8ae4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>