Qt Mobility Reference Documentation

QGeoRouteSegment Class Reference

The QGeoRouteSegment class represents a segment of a route. More...

 #include <QGeoRouteSegment>

Public Functions

QGeoRouteSegment ()
QGeoRouteSegment ( const QGeoRouteSegment & other )
~QGeoRouteSegment ()
qreal distance () const
QGeoNavigationInstruction instruction () const
QList<QGeoCoordinate> path () const
void setDistance ( qreal distance )
void setInstruction ( const QGeoNavigationInstruction & instruction )
void setPath ( const QList<QGeoCoordinate> & path )
void setTravelTime ( int secs )
int travelTime () const
QGeoRouteSegment & operator= ( const QGeoRouteSegment & other )

Detailed Description

The QGeoRouteSegment class represents a segment of a route.

A QGeoRouteSegment instance has information about the physcial layout of the route segment, the length of the route and the estimated time and navigation instructions required to traverse the route segment.


Member Function Documentation

QGeoRouteSegment::QGeoRouteSegment ()

Constructs a route segment object.

QGeoRouteSegment::QGeoRouteSegment ( const QGeoRouteSegment & other )

Constructs a route segment object from the contents of other.

QGeoRouteSegment::~QGeoRouteSegment ()

Destroys this route segment object.

qreal QGeoRouteSegment::distance () const

Returns the distance covered by this segment of the route, in metres.

See also setDistance().

QGeoNavigationInstruction QGeoRouteSegment::instruction () const

Returns the instruction for this route segment.

See also setInstruction().

QList<QGeoCoordinate> QGeoRouteSegment::path () const

Returns the geometric shape of this route segment of the route.

The coordinates should be listed in the order in which they would be traversed by someone travelling along this segment of the route.

See also setPath().

void QGeoRouteSegment::setDistance ( qreal distance )

Sets the distance covered by this segment of the route, in metres, to distance.

See also distance().

void QGeoRouteSegment::setInstruction ( const QGeoNavigationInstruction & instruction )

Sets the instruction for this route segement to instruction.

See also instruction().

void QGeoRouteSegment::setPath ( const QList<QGeoCoordinate> & path )

Sets the geometric shape of this segment of the route to path.

The coordinates in path should be listed in the order in which they would be traversed by someone travelling along this segment of the route.

See also path().

void QGeoRouteSegment::setTravelTime ( int secs )

Sets the estimated amount of time it will take to traverse this segment of the route, in seconds, to secs.

See also travelTime().

int QGeoRouteSegment::travelTime () const

Returns the estimated amount of time it will take to traverse this segment of the route, in seconds.

See also setTravelTime().

QGeoRouteSegment & QGeoRouteSegment::operator= ( const QGeoRouteSegment & other )

Assigns other to this route segment object and then returns a reference to this route segment object.


Copyright © 2009-2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.1.0