Qt Mobility Reference Documentation

QGeoMapObjectInfo Class Reference

The QGeoMapObjectInfo class is the base class for QGeoMapData subclass specific implementations of QGeoMapObject subclass behaviours. More...

 #include <QGeoMapObjectInfo>

Public Functions

QGeoMapObjectInfo ( QGeoMapData * mapData, QGeoMapObject * mapObject )
virtual ~QGeoMapObjectInfo ()
virtual void addToParent ()
virtual QGeoBoundingBox boundingBox () const
virtual bool contains ( const QGeoCoordinate & coordinate ) const
virtual void mapUpdated ()
virtual void objectUpdated ()
QGeoMapObjectInfo * parentObjectInfo ()
virtual void removeFromParent ()
virtual void selectedChanged ( bool selected )
virtual void visibleChanged ( bool visible )

Protected Functions

QGeoMapData * mapData ()
QGeoMapObject * mapObject ()

Detailed Description

The QGeoMapObjectInfo class is the base class for QGeoMapData subclass specific implementations of QGeoMapObject subclass behaviours.

Most of the mapping functionality is provided by a QGeoMapData subclass, including the rendering of the map itself.

This means that QGeoMapData subclasses need to be able to render each of the QGeoMapObject instances and instances of the QGeoMapObject subclasses.

Furthermore, the need to be able to create and manipulate map objects independently from the QGeoMapData instance precludes the use of a set of factory methods for creating QGeoMapData specific map objects.

The QGeoMapObjectInfo class is used to provide the QGeoMapData subclass specific behaviours for the map objects in a way which fulfils this need, as the QGeoMapObjectInfo instances are only created at the point when a map object becomes associated with a QGeoMapData subclass - which is most commonly when the object is added to a QGraphicsGeoMap.


Member Function Documentation

QGeoMapObjectInfo::QGeoMapObjectInfo ( QGeoMapData * mapData, QGeoMapObject * mapObject )

Constructs a new object info instance which will provide the behaviours of mapObject which are specific to mapData.

QGeoMapObjectInfo::~QGeoMapObjectInfo () [virtual]

Destroys this info object.

void QGeoMapObjectInfo::addToParent () [virtual]

This function is run when a map object is made a child of another object.

The default implementation does nothing.

QGeoBoundingBox QGeoMapObjectInfo::boundingBox () const [virtual]

Returns a bounding box which contains this map object.

The default implementation returns an invalid bounding box.

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

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

The default implementation returns false.

QGeoMapData * QGeoMapObjectInfo::mapData () [protected]

Returns the QGeoMapData instance associated with this info object.

QGeoMapObject * QGeoMapObjectInfo::mapObject () [protected]

Returns the QGeoMapObject instance associated with this info object.

void QGeoMapObjectInfo::mapUpdated () [virtual]

This function is run when the map is updated in a way that might effect the rendering of an object.

An example of where this is useful is for objects which need to be rendered differently at different zoom levels for performance reasons.

The default implementation does nothing.

void QGeoMapObjectInfo::objectUpdated () [virtual]

This function is run when an attribute of an object changes in a way that might effect the rendering of an object.

An example of where this is useful is for when objects are moved or when the pen or brush used to draw an object are changed.

The default implementation does nothing.

QGeoMapObjectInfo * QGeoMapObjectInfo::parentObjectInfo ()

Returns the QGeoMapObjectInfo instance associated with the parent of this object, or 0 if it has no parent or if there is no QGeoMapObjectInfo instance asssoicated with the parent object.

void QGeoMapObjectInfo::removeFromParent () [virtual]

This function is run when a map object is removed from its parent object.

The default implementation does nothing.

void QGeoMapObjectInfo::selectedChanged ( bool selected ) [virtual]

This function is run when the selected state of the object changes.

The default implementation does nothing.

void QGeoMapObjectInfo::visibleChanged ( bool visible ) [virtual]

This function is run when the visible state of the object changes.

The default implementation does nothing.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.