QGeoBoundingCircle

Since: 1.1

#include <QtLocationSubset/QGeoBoundingCircle>

The QGeoBoundingCircle 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 metres.

The circle is considered invalid if the center coordinate is invalid or if the radius is less than zero.


Overview

Inheritance

QtMobilitySubset::QGeoBoundingArea
QtMobilitySubset::QGeoBoundingCircle

Public Types Index

Only has inherited public types

enum AreaType

BoxType, CircleType

Public Functions Index

QGeoBoundingCircle ()
QGeoBoundingCircle (const QGeoCoordinate &center, qreal radius)
QGeoBoundingCircle (const QGeoBoundingCircle &other)
~QGeoBoundingCircle ()
QGeoCoordinatecenter () const
virtual boolcontains (const QGeoCoordinate &coordinate) const
virtual boolisEmpty () const
virtual boolisValid () const
booloperator!= (const QGeoBoundingCircle &other) const
QGeoBoundingCircle &operator= (const QGeoBoundingCircle &other)
booloperator== (const QGeoBoundingCircle &other) const
qrealradius () const
voidsetCenter (const QGeoCoordinate &center)
voidsetRadius (qreal radius)
voidtranslate (double degreesLatitude, double degreesLongitude)
QGeoBoundingCircletranslated (double degreesLatitude, double degreesLongitude) const
virtual QGeoBoundingArea::AreaTypetype () const

Public Types

(Only has inherited public types)

AreaType Inherited

Describes the type of a bounding area.

BoxType A box shaped bounding area.

CircleType A circular bounding area.

BoxType
CircleType

Public Functions

QGeoBoundingCircle ()

Constructs a new, invalid bounding circle.

QGeoBoundingCircle (

Constructs a new bounding circle centered at center and with a radius of radius metres.

QGeoBoundingCircle (

Constructs a new bounding circle from the contents of other.

~QGeoBoundingCircle ()

Destructor.

QGeoCoordinate center ()

Returns the center coordinate of this bounding circle.

virtual bool contains (

Returns whether the coordinate coordinate is contained within this bounding circle.

virtual bool isEmpty ()

Returns whether this bounding circle has a geometrical area of zero.

Returns true if this bounding circle is invalid.

virtual bool isValid ()

Returns whether this bounding circle is valid.

A valid bounding circle has a valid center coordinate and a radius greater than or equal to zero.

bool operator!= (

Returns whether this bounding circle is not equal to other.

QGeoBoundingCircle & operator= (

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

bool operator== (

Returns whether this bounding circle is equal to other.

qreal radius ()

Returns the radius in meters of this bounding circle.

void setCenter (

Sets the center coordinate of this bounding circle to center.

void setRadius (
  • qrealradius)

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

void translate (
  • doubledegreesLatitude,
  • doubledegreesLongitude )

Translates this bounding circle by degreesLatitude northwards and degreesLongitude eastwards.

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

QGeoBoundingCircle translated (
  • doubledegreesLatitude,
  • doubledegreesLongitude )

Returns a copy of this bounding circle translated by degreesLatitude northwards and degreesLongitude eastwards.

See also:

translate()

virtualQGeoBoundingArea::AreaType type ()

Returns QGeoBoundingArea::CircleType to identify this as a QGeoBoundingCircle instance.

This function is provided to help find the specific type of aQGeoBoundingArea instance.

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus