MeeGo 1.2 Harmattan Developer Documentation Develop for the Nokia N9

QGeoMapRouteObject Class Reference

The QGeoMapRouteObject class is a QGeoMapObject used to draw a route on a map. More...

 #include <QGeoMapRouteObject>

Inherits: QGeoMapObject.

This class was introduced in Qt Mobility 1.1.

Properties

Public Functions

QGeoMapRouteObject ()
QGeoMapRouteObject ( const QGeoRoute & route )
~QGeoMapRouteObject ()
quint32 detailLevel () const
QPen pen () const
QGeoRoute route () const
void setDetailLevel ( quint32 detailLevel )
void setPen ( const QPen & pen )
void setRoute ( const QGeoRoute & route )

Reimplemented Public Functions

virtual QGeoMapObject::Type type () const

Signals

void detailLevelChanged ( quint32 detailLevel )
void penChanged ( const QPen & pen )
void routeChanged ( const QGeoRoute & route )

Additional Inherited Members

  • 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 QGeoMapRouteObject class is a QGeoMapObject used to draw a route on a map.

The route is specified by a QGeoRoute object.

The route might be quite detailed, and so to improve performance the detail level can be set with QGeoMapRouteObject::detailLevel.

The route object draws the route as a series of lines with a minimum on-screen harmattan length equal to the detail level. This is done so that the small changes in direction of a road will be visible at high zoom levels but will not slow down the rendering at the lower zoom levels.

Property Documentation

detailLevel : quint32

This property holds the level of detail used to draw this object.

A QGeoRoute instance can contain a large amount of information about the path taken by the route. This property is used as a hint to help reduce the amount of information that needs to be drawn on the map.

The path taken by the route is represented as a list of QGeoCoordinate instances. This route object will draw lines between these coordinates, but will skip members of the list until the manhattan distance between the start point and the end point of the line is at least detailLevel.

The default value of this property is 6.

This property was introduced in Qt Mobility 1.1.

Access functions:

quint32 detailLevel () const
void setDetailLevel ( quint32 detailLevel )

Notifier signal:

void detailLevelChanged ( quint32 detailLevel )

pen : QPen

This property holds the pen that will be used to draw this object.

The pen is used to draw the route.

The pen will be treated like a cosmetic pen, which means that the width of the pen will be independent of the zoom level of the map.

This property was introduced in Qt Mobility 1.1.

Access functions:

QPen pen () const
void setPen ( const QPen & pen )

Notifier signal:

void penChanged ( const QPen & pen )

route : QGeoRoute

This property holds the which will be displayed.

The default value of this property is an empty route.

If QGeoRoute::path() returns a list of less than 2 valid QGeoCoordinates then the route object will not be displayed.

This property was introduced in Qt Mobility 1.1.

Access functions:

QGeoRoute route () const
void setRoute ( const QGeoRoute & route )

Notifier signal:

void routeChanged ( const QGeoRoute & route )

Member Function Documentation

QGeoMapRouteObject::QGeoMapRouteObject ()

Constructs a new route object.

QGeoMapRouteObject::QGeoMapRouteObject ( const QGeoRoute & route )

Constructs a new route object for the route route.

QGeoMapRouteObject::~QGeoMapRouteObject ()

Destroys this route object

void QGeoMapRouteObject::detailLevelChanged ( quint32 detailLevel ) [signal]

This signal is emitted when the level of detail used to draw this route object has changed.

The new value is detailLevel.

This function was introduced in Qt Mobility 1.1.

void QGeoMapRouteObject::penChanged ( const QPen & pen ) [signal]

This signal is emitted when the pen used to draw this route object has changed.

The new value is pen.

This function was introduced in Qt Mobility 1.1.

void QGeoMapRouteObject::routeChanged ( const QGeoRoute & route ) [signal]

This signal is emitted when the route drawn by this route object has changed.

The new value is route.

This function was introduced in Qt Mobility 1.1.

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

Reimplemented from QGeoMapObject::type().

This function was introduced in Qt Mobility 1.1.