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.
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 ) |
virtual QGeoMapObject::Type | type () const |
void | detailLevelChanged ( quint32 detailLevel ) |
void | penChanged ( const QPen & pen ) |
void | routeChanged ( const QGeoRoute & route ) |
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.
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 ) |
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 ) |
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 ) |
Constructs a new route object.
Constructs a new route object for the route route.
Destroys this route object
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.
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.
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.
Reimplemented from QGeoMapObject::type().
This function was introduced in Qt Mobility 1.1.