PySide6.QtPositioning.QGeoShape

class QGeoShape

The QGeoShape class defines a geographic area. More

Inherited by: QGeoRectangle, QGeoPolygon, QGeoPath, QGeoCircle

Synopsis

Properties

  • centerᅟ

  • isEmptyᅟ - This property defines whether this geo shape is empty

  • isValidᅟ - This property holds the validity of the geo shape

  • typeᅟ - This property holds the type of this geo shape

Methods

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

This class is the base class for classes which specify a geographic area.

For the sake of consistency, subclasses should describe the specific details of the associated areas in terms of QGeoCoordinate instances and distances in meters.

This class is a Q_GADGET since Qt 5.5. It can be directly used from C++ and QML .

class ShapeType

Describes the type of the shape.

Constant

Description

QGeoShape.UnknownType

A shape of unknown type

QGeoShape.RectangleType

A rectangular shape

QGeoShape.CircleType

A circular shape

QGeoShape.PathType

A path type

QGeoShape.PolygonType

A polygon type

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property centerᅟ: QGeoCoordinate
Access functions:
property isEmptyᅟ: bool

This property holds This property defines whether this geo shape is empty..

An empty geo shape is a region which has a geometrical area of 0.

While this property is introduced in Qt 5.5, the related accessor functions exist since the first version of this class.

Access functions:
property isValidᅟ: bool

This property holds This property holds the validity of the geo shape..

A geo shape is considered to be invalid if some of the data that is required to unambiguously describe the geo shape has not been set or has been set to an unsuitable value depending on the subclass of this object. The default constructed objects of this type are invalid.

While this property is introduced in Qt 5.5, the related accessor functions exist since the first version of this class.

Access functions:
property typeᅟ: QGeoShape.ShapeType

This property holds This property holds the type of this geo shape..

While this property is introduced in Qt 5.5, the related accessor functions exist since the first version of this class.

Access functions:
__init__()

Constructs a new invalid geo shape of UnknownType .

__init__(other)
Parameters:

otherQGeoShape

Constructs a new geo shape which is a copy of other.

boundingGeoRectangle()
Return type:

QGeoRectangle

Returns a QGeoRectangle representing the geographical bounding rectangle of the geo shape, that defines the latitudinal/longitudinal bounds of the geo shape.

center()
Return type:

QGeoCoordinate

Returns the coordinate located at the geometric center of the geo shape.

Getter of property centerᅟ .

contains(coordinate)
Parameters:

coordinateQGeoCoordinate

Return type:

bool

Returns whether the coordinate coordinate is contained within this geo shape.

isEmpty()
Return type:

bool

Returns whether this geo shape is empty.

An empty geo shape is a region which has a geometrical area of 0.

Getter of property isEmptyᅟ .

isValid()
Return type:

bool

Returns whether this geo shape is valid.

Getter of property isValidᅟ .

__ne__(rhs)
Parameters:

rhsQGeoShape

Return type:

bool

Returns true if the lhs geo shape is not equivalent to the rhs geo shape, otherwise returns false.

__eq__(rhs)
Parameters:

rhsQGeoShape

Return type:

bool

Returns true if the lhs geo shape is equivalent to the rhs geo shape, otherwise returns false.

toString()
Return type:

str

Returns a string representation of this geo shape.

type()
Return type:

ShapeType

Returns the type of this geo shape.

Getter of property typeᅟ .