QGeoShape¶
Inherited by: QGeoCircle, QGeoPath, QGeoPolygon, QGeoRectangle
Synopsis¶
Functions¶
def
__eq__
(other)def
__ne__
(other)def
boundingGeoRectangle
()def
center
()def
contains
(coordinate)def
extendShape
(coordinate)def
isEmpty
()def
isValid
()def
toString
()def
type
()
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 PySide2.QtPositioning.QGeoShape¶
PySide2.QtPositioning.QGeoShape(other)
- param other:
Constructs a new invalid geo shape of
UnknownType
.Constructs a new geo shape which is a copy of
other
.
- PySide2.QtPositioning.QGeoShape.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
- PySide2.QtPositioning.QGeoShape.boundingGeoRectangle()¶
- Return type:
Returns a
QGeoRectangle
representing the geographical bounding rectangle of the geo shape, that defines the latitudinal/longitudinal bounds of the geo shape.
- PySide2.QtPositioning.QGeoShape.center()¶
- Return type:
Returns the coordinate located at the geometric center of the geo shape.
- PySide2.QtPositioning.QGeoShape.contains(coordinate)¶
- Parameters:
coordinate –
PySide2.QtPositioning.QGeoCoordinate
- Return type:
bool
Returns whether the coordinate
coordinate
is contained within this geo shape.
- PySide2.QtPositioning.QGeoShape.extendShape(coordinate)¶
- Parameters:
coordinate –
PySide2.QtPositioning.QGeoCoordinate
This method used to extend the geo shape to also cover the coordinate
coordinate
.It currently only works for
QGeoCircle
andQGeoRectangle
, on which the functionality remains, now also accessible throughextendCircle
andextendRectangle
.This method should therefore not be called on a generic
QGeoShape
any longer, as the behavior for other shape types is undefined.See also
- PySide2.QtPositioning.QGeoShape.isEmpty()¶
- Return type:
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.
- PySide2.QtPositioning.QGeoShape.isValid()¶
- Return type:
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.
- PySide2.QtPositioning.QGeoShape.__ne__(other)¶
- Parameters:
other –
PySide2.QtPositioning.QGeoShape
- Return type:
bool
Returns true if the
other
geo shape is not equivalent to this geo shape, otherwise returns false.
- PySide2.QtPositioning.QGeoShape.__eq__(other)¶
- Parameters:
other –
PySide2.QtPositioning.QGeoShape
- Return type:
bool
Returns true if the
other
geo shape is equivalent to this geo shape, otherwise returns false.
- PySide2.QtPositioning.QGeoShape.toString()¶
- Return type:
str
Returns a string representation of this geo shape.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.