Qt Mobility Reference Documentation

QGeoPlace Class Reference

The QGeoPlace class represents basic information about a place. More...

 #include <QGeoPlace>

Inherited by QLandmark.


Public Types

enum PlaceType { GeoPlaceType, LandmarkType }

Public Functions

QGeoPlace ()
QGeoPlace ( const QGeoPlace & other )
virtual ~QGeoPlace ()
QGeoAddress address () const
QGeoBoundingBox boundingBox () const
QGeoCoordinate coordinate () const
void setAddress ( const QGeoAddress & address )
void setBoundingBox ( const QGeoBoundingBox & boundingBox )
void setCoordinate ( const QGeoCoordinate & coordinate )
PlaceType type () const
bool operator!= ( const QGeoPlace & other ) const
QGeoPlace & operator= ( const QGeoPlace & other )
bool operator== ( const QGeoPlace & other ) const

Protected Functions

QGeoPlace ( QGeoPlacePrivate * dd )

Detailed Description

The QGeoPlace class represents basic information about a place.

A QGeoPlace contains a coordinate and the corresponding address, along with an optional bounding box describing the minimum viewport necessary to display the entirety of the place.

The subclasses of QGeoPlace can provide further place information. It is possible to convert instance of QGeoPlace subclasses to and from QGeoPlace instances.

DESIGN NOTE

The type() method and PlaceType enum could be made protected, and a public bool isLandmark() method could be provided in their place, in order to simplify the conversion from QGeoPlace to QLandmark for the user.

See also type().


Member Type Documentation

enum QGeoPlace::PlaceType

ConstantValue
QGeoPlace::GeoPlaceType0
QGeoPlace::LandmarkType1

Member Function Documentation

QGeoPlace::QGeoPlace ()

Constructs an empty place object.

QGeoPlace::QGeoPlace ( const QGeoPlace & other )

Constructs a copy of other.

QGeoPlace::QGeoPlace ( QGeoPlacePrivate * dd ) [protected]

QGeoPlace::~QGeoPlace () [virtual]

Destroys this place.

QGeoAddress QGeoPlace::address () const

Returns the address of this place.

See also setAddress().

QGeoBoundingBox QGeoPlace::boundingBox () const

Returns a bounding box that completely encloses this place.

See also setBoundingBox().

QGeoCoordinate QGeoPlace::coordinate () const

Returns the coordinate that this place is located at.

See also setCoordinate().

void QGeoPlace::setAddress ( const QGeoAddress & address )

Sets the address of this place.

See also address().

void QGeoPlace::setBoundingBox ( const QGeoBoundingBox & boundingBox )

Sets the boundingBox of this place.

The boundingBox should completely enclose this place.

See also boundingBox().

void QGeoPlace::setCoordinate ( const QGeoCoordinate & coordinate )

Sets the coordinate that this place is located at.

See also coordinate().

PlaceType QGeoPlace::type () const

Returns type information about this place instance.

An instance of a subclass of QGeoPlace can be converted to a QGeoPlace instance and back without losing any data. The QGeoPlace::PlaceType enum is used to indicate which subclass initially created this QGeoPlace instance.

If the type corresponds to a subclass of QGeoPlace then this place object can be converted back by using the subclass constructor which takes a QGeoPlace object as an argument. If the type is QGeoPlace::GeoPlaceType then using this place in the same subclass constructor will only initialize the coordinate, address and bounding box of the subclass.

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

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

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

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

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

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


Copyright © 2009-2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.1.0