The QGeoMapObject class is graphical item for display in QGraphicsGeoMap instancse, that is specified in terms of coordinates and distances. More...
#include <QGeoMapObject>
Inherited by QGeoMapCircleObject, QGeoMapPixmapObject, QGeoMapPolygonObject, QGeoMapPolylineObject, QGeoMapRectangleObject, QGeoMapRouteObject, and QGeoMapTextObject.
enum | Type { ContainerType, RectangleType, CircleType, PolylineType, ..., RouteType } |
QGeoMapObject ( QGeoMapObject * parent = 0 ) | |
virtual | ~QGeoMapObject () |
void | addChildObject ( QGeoMapObject * childObject ) |
QGeoBoundingBox | boundingBox () const |
QList<QGeoMapObject *> | childObjects () const |
void | clearChildObjects () |
bool | contains ( const QGeoCoordinate & coordinate ) const |
bool | isSelected () const |
bool | isVisible () const |
QGeoMapObject * | parentObject () const |
void | removeChildObject ( QGeoMapObject * childObject ) |
void | setSelected ( bool selected ) |
void | setVisible ( bool visible ) |
void | setZValue ( int zValue ) |
Type | type () const |
int | zValue () const |
void | selectedChanged ( bool selected ) |
void | visibleChanged ( bool visible ) |
void | zValueChanged ( int zValue ) |
The QGeoMapObject class is graphical item for display in QGraphicsGeoMap 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.
Describes the type of a map object.
Constant | Value | Description |
---|---|---|
QGeoMapObject::ContainerType | 0 | A basic QGeoMapObject. |
QGeoMapObject::RectangleType | 1 | A QGeoMapObject used to display a rectangular region. |
QGeoMapObject::CircleType | 2 | A QGeoMapObject used to display a circular region. |
QGeoMapObject::PolylineType | 3 | A QGeoMapObject used to display a multi-segment line. |
QGeoMapObject::PolygonType | 4 | A QGeoMapObject used to display a polygonal region. |
QGeoMapObject::PixmapType | 5 | A QGeoMapObject used to display a pixmap on a map. |
QGeoMapObject::TextType | 6 | A QGeoMapObject used to display text on a map |
QGeoMapObject::RouteType | 7 | A QGeoMapObject used to display a route. |
This property holds this property holds whether the map object is selected.
Access functions:
bool | isSelected () const |
void | setSelected ( bool selected ) |
Notifier signal:
void | selectedChanged ( bool selected ) |
This property holds this property holds whether the map object is visible.
If this map object is not visible then none of the childObjects() will be displayed either.
Access functions:
bool | isVisible () const |
void | setVisible ( bool visible ) |
Notifier signal:
void | visibleChanged ( bool visible ) |
This property holds this property holds the z-value of the 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.
Access functions:
int | zValue () const |
void | setZValue ( int zValue ) |
Notifier signal:
void | zValueChanged ( int zValue ) |
Constructs a new map object with the specified parent.
Destroys this map object.
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.
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.
Returns the children of this object.
Clears the children of this object.
The child objects will be deleted.
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.
Returns the parent of this map object.
Returns 0 if this map object has no parent.
Removes childObject from the list of children of this map object.
The map object will release ownership of childObject.
Returns the type of this map object.