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.
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.
void QGeoMapGroupObject::childAdded ( QGeoMapObject * childObject ) [signal]
This signal will be emitted when the map object childObject is added to the group.
QList<QGeoMapObject *> QGeoMapGroupObject::childObjects () const
Returns the children of this object.
void QGeoMapGroupObject::childRemoved ( QGeoMapObject * childObject ) [signal]
This signal will be emitted when the map object childObject is removed from the group.
void QGeoMapGroupObject::clearChildObjects ()
Clears the children of this object.
The child objects will be deleted.
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.
void QGeoMapGroupObject::removeChildObject ( QGeoMapObject * childObject )
Removes childObject from the list of children of this map object.
The map object will release ownership of childObject.
void QGeoMapGroupObject::setMapData ( QGeoMapData * mapData ) [virtual]
Reimplemented from QGeoMapObject::setMapData().
QGeoMapObject::Type QGeoMapGroupObject::type () const [virtual]
Reimplemented from QGeoMapObject::type().