QGeoCircle Class

The QGeoCircle class defines a circular geographic area. More...

Header: #include <QGeoCircle>
qmake: QT += positioning
Since: Qt 5.2
Inherits: QGeoShape.

Public Functions

QGeoCircle()
QGeoCircle(const QGeoCoordinate & center, qreal radius = -1.0)
QGeoCircle(const QGeoCircle & other)
QGeoCircle(const QGeoShape & other)
~QGeoCircle()
QGeoCoordinate center() const
qreal radius() const
void setCenter(const QGeoCoordinate & center)
void setRadius(qreal radius)
void translate(double degreesLatitude, double degreesLongitude)
QGeoCircle translated(double degreesLatitude, double degreesLongitude) const
operator!=;booloperator!=(const QGeoCircle & other) const
QGeoCircle & operator=(const QGeoCircle & other)
operator==;booloperator==(const QGeoCircle & other) const
  • 8 public functions inherited from QGeoShape

Detailed Description

The QGeoCircle class defines a circular geographic area.

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.

Member Function Documentation

QGeoCircle::QGeoCircle()

Constructs a new, invalid geo circle.

QGeoCircle::QGeoCircle(const QGeoCoordinate & center, qreal radius = -1.0)

Constructs a new geo circle centered at center and with a radius of radius meters.

QGeoCircle::QGeoCircle(const QGeoCircle & other)

Constructs a new geo circle from the contents of other.

QGeoCircle::QGeoCircle(const QGeoShape & other)

Constructs a new geo circle from the contents of other.

QGeoCircle::~QGeoCircle()

Destroys this geo circle.

QGeoCoordinate QGeoCircle::center() const

Returns the center coordinate of this geo circle.

See also setCenter().

qreal QGeoCircle::radius() const

Returns the radius in meters of this geo circle.

See also setRadius().

void QGeoCircle::setCenter(const QGeoCoordinate & center)

Sets the center coordinate of this geo circle to center.

See also center().

void QGeoCircle::setRadius(qreal radius)

Sets the radius in meters of this geo circle to radius.

See also radius().

void QGeoCircle::translate(double degreesLatitude, double degreesLongitude)

Translates this geo circle by degreesLatitude northwards and degreesLongitude eastwards.

Negative values of degreesLatitude and degreesLongitude correspond to southward and westward translation respectively.

QGeoCircle QGeoCircle::translated(double degreesLatitude, double degreesLongitude) const

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.

See also translate().

QGeoCircle::operator!=;booloperator!=(const QGeoCircle & other) const

QGeoCircle & QGeoCircle::operator=(const QGeoCircle & other)

Assigns other to this geo circle and returns a reference to this geo circle.

QGeoCircle::operator==;booloperator==(const QGeoCircle & other) const