IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QGeoLocation Class

The QGeoLocation class represents basic information about a location.

This class was introduced in Qt 5.2.

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QGeoLocation Class

  • Header: QGeoLocation

  • Since: Qt 5.2

  • qmake: QT += positioning

  • Group: QGeoLocation is part of QtPositioning-positioning, QtLocation-places, QtLocation-places-data

Detailed Description

A QGeoLocation consists of a coordinate and corresponding address, along with an optional bounding box which is the recommended region to be displayed when viewing the location.

Member Function Documentation

 

QGeoLocation::QGeoLocation()

Constructs an new location object.

QGeoLocation::QGeoLocation(const QGeoLocation &other)

Constructs a copy of other

QGeoLocation::~QGeoLocation()

Destroys the location object.

QGeoAddress QGeoLocation::address() const

Returns the address of the location.

See Also

See also setAddress()

QGeoRectangle QGeoLocation::boundingBox() const

Returns a bounding box which represents the recommended region to display when viewing this location.

For example, a building's location may have a region centered around the building, but the region is large enough to show it's immediate surrounding geographical context.

See Also

See also setBoundingBox()

QGeoCoordinate QGeoLocation::coordinate() const

Returns the coordinate of the location.

See Also

See also setCoordinate()

bool QGeoLocation::isEmpty() const

Returns true if all fields of the location are 0; otherwise returns false.

void QGeoLocation::setAddress(const QGeoAddress &address)

Sets the address of the location.

See Also

See also address()

void QGeoLocation::setBoundingBox(const QGeoRectangle &boundingBox)

Sets the boundingBox of the location.

See Also

See also boundingBox()

void QGeoLocation::setCoordinate(const QGeoCoordinate &coordinate)

Sets the coordinate of the location.

See Also

See also coordinate()

bool QGeoLocation::operator!=(const QGeoLocation &other) const

Returns true if this location is not equal to other, otherwise returns false.

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

Assigns other to this location and returns a reference to this location.

bool QGeoLocation::operator==(const QGeoLocation &other) const

Returns true if this location is equal to other, otherwise returns false.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+