Qt Mobility Reference Documentation

QGeoMapObject Class Reference

The QGeoMapObject class is graphical item for display in QGeoMapWidget instancse, that is specified in terms of coordinates and distances. More...

 #include <QGeoMapObject>

Inherited by QGeoMapCircleObject.


Public Types

enum Type { ContainerType, RectangleType, CircleType, PolylineType, PolygonType, MarkerType }

Public Functions

QGeoMapObject ( QGeoMapObject * parent = 0 )
virtual ~QGeoMapObject ()
void addChildObject ( QGeoMapObject * childObject )
virtual QGeoBoundingBox boundingBox () const
QList<QGeoMapObject *> childObjects () const
virtual bool contains ( const QGeoCoordinate & coordinate ) const
bool isVisible () const
QGeoMapObject * parentObject () const
void removeChildObject ( QGeoMapObject * childObject )
void setVisible ( bool visible )
void setZValue ( int zValue )
Type type () const
int zValue () const

Signals

void childObjectAdded ( QGeoMapObject * childObject )
void childObjectRemoved ( QGeoMapObject * childObject )
void zValueChanged ( int newZValue, int oldZValue )

Detailed Description

The QGeoMapObject class is graphical item for display in QGeoMapWidget instancse, that is specified in terms of coordinates and distances.

QGeoMapObject instances can also be grouped into heirarchies in order to simplify the process of creating compound objects and managing groups of objects.


Member Type Documentation

enum QGeoMapObject::Type

Describes the type of a map object.

ConstantValueDescription
QGeoMapObject::ContainerType0A basic QGeoMapObject.
QGeoMapObject::RectangleType1A QGeoMapObject used to display a rectangular region.
QGeoMapObject::CircleType2A QGeoMapObject used to display a circular region.
QGeoMapObject::PolylineType3A QGeoMapObject used to display a multi-segment line.
QGeoMapObject::PolygonType4A QGeoMapObject used to display a polygonal region.
QGeoMapObject::MarkerType5A QGeoMapObject used to display a map marker.

Member Function Documentation

QGeoMapObject::QGeoMapObject ( QGeoMapObject * parent = 0 )

Constructs a new map object with the specified parent.

QGeoMapObject::~QGeoMapObject () [virtual]

Destroys this map object.

void QGeoMapObject::addChildObject ( QGeoMapObject * childObject )

Adds childObject to the list of children of this map object.

If childObject is 0 it will not be added.

The map object will take ownership of childObject.

QGeoBoundingBox QGeoMapObject::boundingBox () const [virtual]

Returns a bounding box which contains this map object.

If this map object has children, the bounding box will be large enough to contain both this map object and all of its children.

void QGeoMapObject::childObjectAdded ( QGeoMapObject * childObject ) [signal]

void QGeoMapObject::childObjectRemoved ( QGeoMapObject * childObject ) [signal]

QList<QGeoMapObject *> QGeoMapObject::childObjects () const

Returns the children of this map object. The children are ordered ascendingly on their zValues.

bool QGeoMapObject::contains ( const QGeoCoordinate & coordinate ) const [virtual]

Returns whether coordinate is contained with the boundary of this map object.

If this map object has children, this function will return whether coordinate is contained within the boundary of this map object or within the boundary of any of its children.

bool QGeoMapObject::isVisible () const

Returns whether this map object is visible.

If this map object is not visible then none of the childObjects() will be displayed either.

QGeoMapObject * QGeoMapObject::parentObject () const

Returns the parent of this map object.

Returns 0 if this map object has no parent.

void QGeoMapObject::removeChildObject ( QGeoMapObject * childObject )

Removes childObject from the list of children of this map object.

This method does nothing if childObject is not contained in this map objects list of children.

The map object will release ownership of childObject.

void QGeoMapObject::setVisible ( bool visible )

Sets whether this map object is visible.

If this map object is not visible then none of the childObjects() will be displayed either.

See also isVisible().

void QGeoMapObject::setZValue ( int zValue )

Sets the z-value of this map object to zValue.

The z-value determines the order in which the objects are drawn on the screen. Objects with the same value will be drawn in the order that they were added to the map or map object.

This is the same behaviour as QGraphicsItem.

See also zValue().

Type QGeoMapObject::type () const

Returns the type of this map object.

int QGeoMapObject::zValue () const

Returns the z-value of this map object.

The z-value determines the order in which the objects are drawn on the screen. Objects with the same value will be drawn in the order that they were added to the map or map object.

This is the same behaviour as QGraphicsItem.

See also setZValue().

void QGeoMapObject::zValueChanged ( int newZValue, int oldZValue ) [signal]


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