QtMobility Reference Documentation

QGeoMapGroupObject Class Reference

The QGeoMapGroupObject class is a QGeoMapObject used to manager a group of other map objects. More...

 #include <QGeoMapGroupObject>

Inherits: QGeoMapObject.

This class was introduced in Qt Mobility 1.1.

Public Functions

QGeoMapGroupObject ()
~QGeoMapGroupObject ()
void addChildObject ( QGeoMapObject * childObject )
QList<QGeoMapObject *> childObjects () const
void clearChildObjects ()
void removeChildObject ( QGeoMapObject * childObject )
void setVisible ( bool visible )

Reimplemented Public Functions

virtual QGeoBoundingBox boundingBox () const
virtual bool contains ( const QGeoCoordinate & coordinate ) const
virtual void setMapData ( QGeoMapData * mapData )
virtual QGeoMapObject::Type type () const

Signals

void childAdded ( QGeoMapObject * childObject )
void childRemoved ( QGeoMapObject * childObject )
void childUpdated ( QGeoMapObject * childObject )

Additional Inherited Members

  • 6 properties inherited from QGeoMapObject
  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 4 static public members inherited from QObject
  • 3 protected functions inherited from QGeoMapObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QGeoMapGroupObject class is a QGeoMapObject used to manager a group of other map objects.

The QGeoMapGroupObject class can be used to quickly add and remove groups of objects to a map.

The map objects contained in the group will be ordered relative to one another in the usual manner, such that objects with higher z-values will be drawn over objects with lower z-values and objects with equal z-values will be drawn in insertion order.

This ordering of the objects will be independent of the other objects that are added to the map, since the z-value and insertion order of the QGeoMapGroupObject is used to determine where the group is placed in the scene.

Member Function Documentation

QGeoMapGroupObject::QGeoMapGroupObject ()

Constructs a new group object.

QGeoMapGroupObject::~QGeoMapGroupObject ()

Destroys this group object.

void QGeoMapGroupObject::addChildObject ( QGeoMapObject * childObject )

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

The children objects are drawn in order of the QGeoMapObject::zValue() value. Children objects having the same z value will be drawn in the order they were added.

The map object will take ownership of childObject.

This function was introduced in Qt Mobility 1.1.

QGeoBoundingBox QGeoMapGroupObject::boundingBox () const [virtual]

Reimplemented from QGeoMapObject::boundingBox().

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.

This function was introduced in Qt Mobility 1.1.

void QGeoMapGroupObject::childAdded ( QGeoMapObject * childObject ) [signal]

This signal will be emitted when the map object childObject is added to the group.

This function was introduced in Qt Mobility 1.1.

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

Returns the children of this object.

This function was introduced in Qt Mobility 1.1.

void QGeoMapGroupObject::childRemoved ( QGeoMapObject * childObject ) [signal]

This signal will be emitted when the map object childObject is removed from the group.

This function was introduced in Qt Mobility 1.1.

void QGeoMapGroupObject::childUpdated ( QGeoMapObject * childObject ) [signal]

This signal will be emitted if the map object childObject has changed such that the corresponding QGeoMapObjectInfo class that handles the map-specific behaviours of the object needs to be informed of the change.

The map object childObject must belong to this group.

At the moment this is only emitted when the z-value of the child-objects are changed.

This function was introduced in Qt Mobility 1.2.

void QGeoMapGroupObject::clearChildObjects ()

Clears the children of this object.

The child objects will be deleted.

This function was introduced in Qt Mobility 1.1.

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

Reimplemented from QGeoMapObject::contains().

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.

This function was introduced in Qt Mobility 1.1.

void QGeoMapGroupObject::removeChildObject ( QGeoMapObject * childObject )

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

The map object will release ownership of childObject.

This function was introduced in Qt Mobility 1.1.

void QGeoMapGroupObject::setMapData ( QGeoMapData * mapData ) [virtual]

Reimplemented from QGeoMapObject::setMapData().

This function was introduced in Qt Mobility 1.1.

void QGeoMapGroupObject::setVisible ( bool visible )

Sets whether this group of objects is visible to visible.

This function was introduced in Qt Mobility 1.2.

QGeoMapObject::Type QGeoMapGroupObject::type () const [virtual]

Reimplemented from QGeoMapObject::type().

This function was introduced in Qt Mobility 1.1.

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.