- class QGeoCircle#
The
QGeoCircle
class defines a circular geographic area. More…Synopsis#
Properties#
Methods#
def
__init__()
def
extendCircle()
def
radius()
def
setCenter()
def
setRadius()
def
translate()
def
translated()
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#
The circle is defined in terms of a
QGeoCoordinate
which specifies the center of the circle and a qreal which specifies the radius of the circle in meters.The circle is considered invalid if the center coordinate is invalid or if the radius is less than zero.
This class is a Q_GADGET since Qt 5.5. It can be directly used from C++ and QML .
Note
Properties can be used directly when
from __feature__ import true_property
is used or via accessor functions otherwise.- property centerᅟ: QGeoCoordinate#
This property holds This property holds the center coordinate for the geo circle..
The circle is considered invalid if this property contains an invalid coordinate.
A default constructed
QGeoCircle
uses an invalidQGeoCoordinate
as center.While this property is introduced in Qt 5.5, the related accessor functions exist since the first version of this class.
- Access functions:
- property radiusᅟ: float#
This property holds This property holds the circle radius in meters..
The circle is considered invalid if this property is negative.
By default, the radius is initialized with
-1
.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 circle.
- __init__(other)
- Parameters:
other –
QGeoCircle
Constructs a new geo circle from the contents of
other
.- __init__(center[, radius=-1.0])
- Parameters:
center –
QGeoCoordinate
radius – float
Constructs a new geo circle centered at
center
and with a radius ofradius
meters.- __init__(other)
- Parameters:
other –
QGeoShape
Constructs a new geo circle from the contents of
other
.- extendCircle(coordinate)#
- Parameters:
coordinate –
QGeoCoordinate
Extends the geo circle to also cover the coordinate
coordinate
- radius()#
- Return type:
float
Returns the radius in meters of this geo circle.
See also
Getter of property
radiusᅟ
.- setCenter(center)#
- Parameters:
center –
QGeoCoordinate
Sets the center coordinate of this geo circle to
center
.See also
center()
Setter of property
centerᅟ
.- setRadius(radius)#
- Parameters:
radius – float
Sets the radius in meters of this geo circle to
radius
.See also
Setter of property
radiusᅟ
.- translate(degreesLatitude, degreesLongitude)#
- Parameters:
degreesLatitude – float
degreesLongitude – float
Translates this geo circle by
degreesLatitude
northwards anddegreesLongitude
eastwards.Negative values of
degreesLatitude
anddegreesLongitude
correspond to southward and westward translation respectively.- translated(degreesLatitude, degreesLongitude)#
- Parameters:
degreesLatitude – float
degreesLongitude – float
- Return type:
Returns a copy of this geo circle translated by
degreesLatitude
northwards anddegreesLongitude
eastwards.Negative values of
degreesLatitude
anddegreesLongitude
correspond to southward and westward translation respectively.See also