![]() |
Qt 6.x
The Qt SDK
|
#include <qdeclarativepolygonmapitem_p_p.h>
Inheritance diagram for QGeoMapPolygonGeometry:
Collaboration diagram for QGeoMapPolygonGeometry:Public Types | |
| enum | MapBorderBehaviour { DrawOnce , Duplicate , WrapAround } |
Protected Attributes | |
| QPainterPath | srcPath_ |
| qreal | maxCoord_ = 0.0 |
| bool | assumeSimple_ = false |
Protected Attributes inherited from QGeoMapItemGeometry | |
| bool | sourceDirty_ = true |
| bool | screenDirty_ = true |
| bool | clipToViewport_ = true |
| bool | preserveGeometry_ = false |
| QGeoCoordinate | geoLeftBound_ |
| QPointF | firstPointOffset_ |
| QPainterPath | screenOutline_ |
| QRectF | sourceBounds_ |
| QRectF | screenBounds_ |
| QGeoCoordinate | srcOrigin_ |
| QList< QPointF > | screenVertices_ |
| QList< quint32 > | screenIndices_ |
Additional Inherited Members | |
Static Public Member Functions inherited from QGeoMapItemGeometry | |
| static QList< QGeoCoordinate > | path (const QGeoRectangle &rect) |
| static QList< QGeoCoordinate > | perimeter (const QGeoRectangle &rect) |
| static QList< QDoubleVector2D > | pathMercator (const QList< QGeoCoordinate > &p) |
Public Attributes inherited from QGeoMapItemGeometry | |
| bool | m_dataChanged = false |
Definition at line 38 of file qdeclarativepolygonmapitem_p_p.h.
| Enumerator | |
|---|---|
| DrawOnce | |
| Duplicate | |
| WrapAround | |
Definition at line 41 of file qdeclarativepolygonmapitem_p_p.h.
|
default |
\qmltype MapPolygon \instantiates QDeclarativePolygonMapItem \inqmlmodule QtLocation
The MapPolygon type displays a polygon on a Map.
The MapPolygon type displays a polygon on a Map, specified in terms of an ordered list of \l {QtPositioning::coordinate}{coordinates}. For best appearance and results, polygons should be simple (not self-intersecting).
The \l {QtPositioning::coordinate}{coordinates} on the path cannot be directly changed after being added to the Polygon. Instead, copy the \l path into a var, modify the copy and reassign the copy back to the \l path.
Coordinates can also be added and removed at any time using the \l addCoordinate and \l removeCoordinate methods.
For drawing rectangles with "straight" edges (same latitude across one edge, same latitude across the other), the \l MapRectangle type provides a simpler, two-point API.
By default, the polygon is displayed as a 1 pixel black border with no fill. To change its appearance, use the \l color, \l border.color and \l border.width properties.
|
inline |
Definition at line 56 of file qdeclarativepolygonmapitem_p_p.h.
Referenced by QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), and QDeclarativeRectangleMapItemPrivateCPU::updatePolish().
Here is the caller graph for this function:
|
inline |
Definition at line 49 of file qdeclarativepolygonmapitem_p_p.h.
|
inline |
Definition at line 55 of file qdeclarativepolygonmapitem_p_p.h.
Referenced by QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), and QDeclarativeRectangleMapItemPrivateCPU::updatePolish().
Here is the caller graph for this function:| void QGeoMapPolygonGeometry::updateSourcePoints | ( | const QGeoMap & | map, |
| const QList< QList< QDoubleVector2D > > & | basePaths, | ||
| MapBorderBehaviour | wrapping = Duplicate |
||
| ) |
Definition at line 113 of file qdeclarativepolygonmapitem.cpp.
References QClipperUtils::addClipPolygon(), addPoint(), QClipperUtils::addSubjectPath(), QList< T >::append(), assumeSimple_, QPainterPath::boundingRect(), QDeclarativeGeoMapItemUtils::boundingRectangleFromList(), QPainterPath::closeSubpath(), QDeclarativeGeoMapItemUtils::distanceSqrPointLine(), DrawOnce, Duplicate, QClipperUtils::execute(), QList< T >::first(), i, QList< T >::insert(), QClipperUtils::Intersection, QRectF::intersects(), QList< T >::isEmpty(), j, QList< T >::last(), QRectF::left(), QList< T >::length(), QPainterPath::lineTo(), map, maxCoord_, QPainterPath::moveTo(), QGeoMapItemGeometry::origin(), QClipperUtils::pftEvenOdd, QList< T >::push_front(), qMax(), QList< T >::reserve(), QRectF::right(), QPainterPath::simplified(), QList< T >::size(), QGeoMapItemGeometry::sourceBounds_, QGeoMapItemGeometry::sourceDirty_, QGeoMapItemGeometry::srcOrigin_, srcPath_, QList< T >::swapItemsAt(), QRectF::top(), QDoubleVector2D::toPointF(), QRectF::translated(), WrapAround, QDoubleVector2D::x(), and QDoubleVector2D::y().
Referenced by QDeclarativeCircleMapItemPrivateCPU::updatePolish(), QDeclarativePolygonMapItemPrivateCPU::updatePolish(), and QDeclarativeRectangleMapItemPrivateCPU::updatePolish().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 61 of file qdeclarativepolygonmapitem_p_p.h.
Referenced by updateSourcePoints().
|
protected |
Definition at line 60 of file qdeclarativepolygonmapitem_p_p.h.
Referenced by updateSourcePoints().
|
protected |
Definition at line 59 of file qdeclarativepolygonmapitem_p_p.h.
Referenced by updateSourcePoints().