QGeoCircle Class
The QGeoCircle class defines a circular geographic area. More...
| Header: | #include <QGeoCircle> |
| qmake: | QT += positioning |
| Since: | Qt 5.2 |
| Inherits: | QGeoShape |
This class was introduced in Qt 5.2.
Properties
Public Functions
| QGeoCoordinate | center() const |
| qreal | radius() const |
| void | setCenter(const QGeoCoordinate ¢er) |
| void | setRadius(qreal radius) |
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.
Property Documentation
center : QGeoCoordinate
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 invalid QGeoCoordinate as center.
While this property is introduced in Qt 5.5, the related accessor functions exist since the first version of this class.
This property was introduced in Qt 5.5.
Access functions:
| QGeoCoordinate | center() const |
| void | setCenter(const QGeoCoordinate ¢er) |
radius : qreal
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.
This property was introduced in Qt 5.5.
Access functions:
| qreal | radius() const |
| void | setRadius(qreal radius) |