The QGeoCircle class defines a circular geographic area. 更多...
头: | #include <QGeoCircle> |
qmake: | QT += positioning |
Since: | Qt 5.2 |
继承: | QGeoShape |
该类在 Qt 5.2 引入。
QGeoCircle (const QGeoShape & other ) | |
QGeoCircle (const QGeoCircle & other ) | |
QGeoCircle (const QGeoCoordinate & center , qreal radius = -1.0) | |
QGeoCircle () | |
QGeoCircle & | operator= (const QGeoCircle & other ) |
~QGeoCircle () | |
QGeoCoordinate | center () const |
void | extendCircle (const QGeoCoordinate & coordinate ) |
qreal | radius () const |
void | setCenter (const QGeoCoordinate & center ) |
void | setRadius (qreal radius ) |
QString | toString () const |
void | translate (double degreesLatitude , double degreesLongitude ) |
QGeoCircle | translated (double degreesLatitude , double degreesLongitude ) const |
bool | operator!= (const QGeoCircle & other ) const |
bool | operator== (const QGeoCircle & other ) const |
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 .
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.
该特性在 Qt 5.5 引入。
访问函数:
QGeoCoordinate | center () const |
void | setCenter (const QGeoCoordinate & center ) |
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.
该特性在 Qt 5.5 引入。
访问函数:
qreal | radius () const |
void | setRadius (qreal radius ) |
Constructs a new geo circle from the contents of other .
Constructs a new geo circle from the contents of other .
Constructs a new geo circle centered at center and with a radius of radius meters.
Constructs a new, invalid geo circle.
赋值 other to this geo circle and returns a reference to this geo circle.
Destroys this geo circle.
Returns the center coordinate of this geo circle. Equivalent to QGeoShape::center ().
注意: getter 函数对于特性 center .
另请参阅 setCenter ().
Extends the geo circle to also cover the coordinate coordinate
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
该函数在 Qt 5.9 引入。
Returns the radius in meters of this geo circle.
注意: getter 函数对于特性 radius .
另请参阅 setRadius ().
Sets the center coordinate of this geo circle to center .
注意: setter 函数对于特性 center .
另请参阅 center ().
Sets the radius in meters of this geo circle to radius .
注意: setter 函数对于特性 radius .
另请参阅 radius ().
Returns the geo circle properties as a string.
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
该函数在 Qt 5.5 引入。
Translates this geo circle by degreesLatitude northwards and degreesLongitude eastwards.
Negative values of degreesLatitude and degreesLongitude correspond to southward and westward translation respectively.
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
Returns a copy of this geo circle translated by degreesLatitude northwards and degreesLongitude eastwards.
Negative values of degreesLatitude and degreesLongitude correspond to southward and westward translation respectively.
注意: 此函数可以被援引,通过元对象系统和从 QML。见 Q_INVOKABLE .
另请参阅 translate ().
Returns whether this geo circle is not equal to other .
Returns whether this geo circle is equal to other .