![]() |
Qt 6.x
The Qt SDK
|
#include <qgeopolygon_p.h>
Public Member Functions | |
QGeoPolygonEager () | |
QGeoPolygonEager (const QList< QGeoCoordinate > &path) | |
QGeoPolygonEager (const QGeoPolygon &other) | |
QGeoPolygonEager (const QGeoShape &other) | |
~QGeoPolygonEager () | |
![]() | |
QGeoPolygon () | |
Constructs a new, empty geo polygon. | |
QGeoPolygon (const QList< QGeoCoordinate > &path) | |
Constructs a new geo polygon from the coordinates specified in path. | |
QGeoPolygon (const QGeoPolygon &other) | |
Constructs a new geo polygon from the contents of other. | |
QGeoPolygon (const QGeoShape &other) | |
Constructs a new geo polygon from the contents of other. | |
~QGeoPolygon () | |
Destroys this polygon. | |
QGeoPolygon & | operator= (const QGeoPolygon &other) |
Assigns other to this geo polygon and returns a reference to this geo polygon. | |
void | setPerimeter (const QList< QGeoCoordinate > &path) |
Sets the perimeter of the polygon based on a list of coordinates path. | |
const QList< QGeoCoordinate > & | perimeter () const |
Returns all the elements of the polygon's perimeter. | |
Q_INVOKABLE void | addHole (const QVariant &holePath) |
Sets the holePath for a hole inside the polygon. | |
void | addHole (const QList< QGeoCoordinate > &holePath) |
Overloaded method. | |
Q_INVOKABLE const QVariantList | hole (qsizetype index) const |
Returns a QVariant containing a QList<QGeoCoordinate> which represents the hole at index. | |
const QList< QGeoCoordinate > | holePath (qsizetype index) const |
Returns a QList<QGeoCoordinate> which represents the hole at index. | |
Q_INVOKABLE void | removeHole (qsizetype index) |
Removes element at position index from the list of holes. | |
Q_INVOKABLE qsizetype | holesCount () const |
Returns the number of holes. | |
Q_INVOKABLE void | translate (double degreesLatitude, double degreesLongitude) |
Translates this geo polygon by degreesLatitude northwards and degreesLongitude eastwards. | |
Q_INVOKABLE QGeoPolygon | translated (double degreesLatitude, double degreesLongitude) const |
Returns a copy of this geo polygon translated by degreesLatitude northwards and degreesLongitude eastwards. | |
Q_INVOKABLE double | length (qsizetype indexFrom=0, qsizetype indexTo=-1) const |
Returns the length of the polygon's perimeter, in meters, from the element indexFrom to the element indexTo. | |
Q_INVOKABLE qsizetype | size () const |
Returns the number of elements in the polygon. | |
Q_INVOKABLE void | addCoordinate (const QGeoCoordinate &coordinate) |
Appends coordinate to the polygon. | |
Q_INVOKABLE void | insertCoordinate (qsizetype index, const QGeoCoordinate &coordinate) |
Inserts coordinate at the specified index. | |
Q_INVOKABLE void | replaceCoordinate (qsizetype index, const QGeoCoordinate &coordinate) |
Replaces the path element at the specified index with coordinate. | |
Q_INVOKABLE QGeoCoordinate | coordinateAt (qsizetype index) const |
Returns the coordinate at index . | |
Q_INVOKABLE bool | containsCoordinate (const QGeoCoordinate &coordinate) const |
Returns true if the polygon's perimeter contains coordinate as one of the elements. | |
Q_INVOKABLE void | removeCoordinate (const QGeoCoordinate &coordinate) |
Removes the last occurrence of coordinate from the polygon. | |
Q_INVOKABLE void | removeCoordinate (qsizetype index) |
Removes element at position index from the polygon. | |
Q_INVOKABLE QString | toString () const |
Returns the geo polygon properties as a string. | |
![]() | |
QGeoShape () | |
Constructs a new invalid geo shape of \l UnknownType. | |
Q_INVOKABLE | QGeoShape (const QGeoShape &other) |
Constructs a new geo shape which is a copy of other. | |
~QGeoShape () | |
Destroys this geo shape. | |
ShapeType | type () const |
Returns the type of this geo shape. | |
bool | isValid () const |
Returns whether this geo shape is valid. | |
bool | isEmpty () const |
Returns whether this geo shape is empty. | |
Q_INVOKABLE bool | contains (const QGeoCoordinate &coordinate) const |
Returns whether the coordinate coordinate is contained within this geo shape. | |
Q_INVOKABLE QGeoRectangle | boundingGeoRectangle () const |
Returns a QGeoRectangle representing the geographical bounding rectangle of the geo shape, that defines the latitudinal/longitudinal bounds of the geo shape. | |
QGeoCoordinate | center () const |
Returns the coordinate located at the geometric center of the geo shape. | |
QGeoShape & | operator= (const QGeoShape &other) |
Assigns other to this geo shape and returns a reference to this geo shape. | |
Q_INVOKABLE QString | toString () const |
Returns a string representation of this geo shape. | |
Additional Inherited Members | |
![]() | |
enum | ShapeType { UnknownType , RectangleType , CircleType , PathType , PolygonType } |
Describes the type of the shape. More... | |
![]() | |
QGeoShape (QGeoShapePrivate *d) | |
![]() | |
QSharedDataPointer< QGeoShapePrivate > | d_ptr |
![]() | |
QList< QGeoCoordinate > | perimeter |
![]() | |
ShapeType | type |
This property holds the type of this geo shape. | |
bool | isValid |
This property holds the validity of the geo shape. | |
bool | isEmpty |
This property defines whether this geo shape is empty. | |
QGeoCoordinate | center |
![]() | |
size_t | qHash (const QGeoShape &shape, size_t seed) noexcept |
Returns the hash value for the shape, using seed for the calculation. | |
Definition at line 87 of file qgeopolygon_p.h.
QGeoPolygonEager::QGeoPolygonEager | ( | ) |
Definition at line 632 of file qgeopolygon.cpp.
References QGeoShape::d_ptr.
Referenced by QGeoPolygonEager().
QGeoPolygonEager::QGeoPolygonEager | ( | const QList< QGeoCoordinate > & | path | ) |
Definition at line 637 of file qgeopolygon.cpp.
References QGeoShape::d_ptr.
QGeoPolygonEager::QGeoPolygonEager | ( | const QGeoPolygon & | other | ) |
Definition at line 642 of file qgeopolygon.cpp.
References QGeoPolygon::addHole(), QGeoShape::d_ptr, i, other(), and QGeoPolygon::setPerimeter().
QGeoPolygonEager::QGeoPolygonEager | ( | const QGeoShape & | other | ) |
Definition at line 651 of file qgeopolygon.cpp.
References QGeoPolygon::QGeoPolygon(), QGeoPolygonEager(), QGeoShape::d_ptr, other(), and QGeoShape::PolygonType.
QGeoPolygonEager::~QGeoPolygonEager | ( | ) |
Definition at line 659 of file qgeopolygon.cpp.