Qt Mobility Reference Documentation

QGeoMapObject Class Reference

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

 #include <QGeoMapObject>

Inherits QObject.

Inherited by QGeoMapCircleObject, QGeoMapGroupObject, QGeoMapPixmapObject, QGeoMapPolygonObject, QGeoMapPolylineObject, QGeoMapRectangleObject, QGeoMapRouteObject, and QGeoMapTextObject.

Public Types

enum Type { NullType, GroupType, RectangleType, CircleType, ..., RouteType }

Properties

  • 1 property inherited from QObject

Public Functions

QGeoMapObject ( QGeoMapData * mapData = 0 )
virtual ~QGeoMapObject ()
virtual QGeoBoundingBox boundingBox () const
virtual bool contains ( const QGeoCoordinate & coordinate ) const
QGeoMapObjectInfo * info () const
bool isSelected () const
bool isVisible () const
virtual QGeoMapData * mapData () const
virtual void setMapData ( QGeoMapData * mapData )
void setSelected ( bool selected )
void setVisible ( bool visible )
void setZValue ( int zValue )
virtual Type type () const
int zValue () const
  • 29 public functions inherited from QObject

Signals

void selectedChanged ( bool selected )
void visibleChanged ( bool visible )
void zValueChanged ( int zValue )

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 4 static public members inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

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.

Member Type Documentation

enum QGeoMapObject::Type

Describes the type of a map object.

ConstantValueDescription
QGeoMapObject::NullType0An empty QGeoMapObject.
QGeoMapObject::GroupType1A QGeoMapObject used to organize other map objects into groups.
QGeoMapObject::RectangleType2A QGeoMapObject used to display a rectangular region.
QGeoMapObject::CircleType3A QGeoMapObject used to display a circular region.
QGeoMapObject::PolylineType4A QGeoMapObject used to display a multi-segment line.
QGeoMapObject::PolygonType5A QGeoMapObject used to display a polygonal region.
QGeoMapObject::PixmapType6A QGeoMapObject used to display a pixmap on a map.
QGeoMapObject::TextType7A QGeoMapObject used to display text on a map
QGeoMapObject::RouteType8A QGeoMapObject used to display a route.

Property Documentation

selected : bool

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 )

visible : bool

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 )

zValue : int

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 )

Member Function Documentation

QGeoMapObject::QGeoMapObject ( QGeoMapData * mapData = 0 )

Constructs a new map object associated with mapData.

QGeoMapObject::~QGeoMapObject () [virtual]

Destroys this map object.

QGeoBoundingBox QGeoMapObject::boundingBox () const [virtual]

Returns a bounding box which contains this map object.

The default implementation requires the object to be added to a map before this function returns a valid bounding box.

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

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

In the default implementation, if this object has not been added to a map yet, contains will always return false.

QGeoMapObjectInfo * QGeoMapObject::info () const

Returns the QGeoMapObjectInfo instance which implements the QGeoMapData specific behaviours of this map object.

This will mostly be useful when implementing custom QGeoMapData subclasses.

QGeoMapData * QGeoMapObject::mapData () const [virtual]

Returns the QGeoMapData instance associated with this object.

Will return 0 if not QGeoMapData instance has been set.

See also setMapData().

void QGeoMapObject::selectedChanged ( bool selected ) [signal]

This signal is emitted when the selected state of the map object has changed.

The new vlaue is selected.

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

Associates the QGeoMapData instance mapData with this map object.

This will create an appropriate QGeoMapObjectInfo instance for this QGeoMapObject and will connect the appropriate signals to it so that it can be kept up to date.

See also mapData().

Type QGeoMapObject::type () const [virtual]

Returns the type of this map object.

void QGeoMapObject::visibleChanged ( bool visible ) [signal]

This signal is emitted when the visible state of the map object has changed.

The new value is visible.

void QGeoMapObject::zValueChanged ( int zValue ) [signal]

This signal is emitted when the z value of the map object has changed.

The new value is zValue.

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.