Qt Mobility Reference Documentation

QGeoInstruction Class Reference

The QGeoInstruction class represents a navigation instruction. More...

 #include <QGeoInstruction>

Public Types

enum InstructionDirection { NoDirection, DirectionForward, DirectionBearRight, DirectionLightRight, ..., DirectionBearLeft }

Public Functions

QGeoInstruction ()
QGeoInstruction ( const QGeoInstruction & other )
~QGeoInstruction ()
InstructionDirection direction () const
qreal distanceToNextInstruction () const
QString instructionText () const
QGeoCoordinate position () const
void setDirection ( InstructionDirection direction )
void setDistanceToNextInstruction ( qreal distance )
void setInstructionText ( const QString & instructionText )
void setPosition ( const QGeoCoordinate & position )
void setTimeToNextInstruction ( int secs )
int timeToNextInstruction () const
bool operator!= ( const QGeoInstruction & other ) const
QGeoInstruction & operator= ( const QGeoInstruction & other )
bool operator== ( const QGeoInstruction & other ) const

Detailed Description

The QGeoInstruction class represents a navigation instruction.

A QGeoInstruction instance has a position at which the instruction applies and a textual instruction to provide at that position.


Member Type Documentation

enum QGeoInstruction::InstructionDirection

Describes the change in direction associated with an instruction.

ConstantValueDescription
QGeoInstruction::NoDirection0There is no direction associated with the instruction.
QGeoInstruction::DirectionForward1The instruction indicates that the direction of travel does not need to change.
QGeoInstruction::DirectionBearRight2The instruction indicates that the direction of travel should bear to the right.
QGeoInstruction::DirectionLightRight3The instruction indicates that a light turn to the right is required.
QGeoInstruction::DirectionRight4The instruction indicates that a turn to the right is required.
QGeoInstruction::DirectionHardRight5The instruction indicates that a hard turn to the right is required.
QGeoInstruction::DirectionUTurnRight6The instruction indicates that a u-turn to the right is required.
QGeoInstruction::DirectionUTurnLeft7The instruction indicates that a u-turn to the left is required.
QGeoInstruction::DirectionHardLeft8The instruction indicates that a hard turn to the left is required.
QGeoInstruction::DirectionLeft9The instruction indicates that a turn to the left is required.
QGeoInstruction::DirectionLightLeft10The instruction indicates that a light turn to the left is required.
QGeoInstruction::DirectionBearLeft11The instruction indicates that the direction of travel should bear to the left.

Member Function Documentation

QGeoInstruction::QGeoInstruction ()

Constructs a navigation instruction object.

QGeoInstruction::QGeoInstruction ( const QGeoInstruction & other )

Constructs a navigation instruction object from the contents of other.

QGeoInstruction::~QGeoInstruction ()

Destroys this navigation instruction object.

InstructionDirection QGeoInstruction::direction () const

Returns the direction associated with this instruction.

See also setDirection().

qreal QGeoInstruction::distanceToNextInstruction () const

Returns the distance, in metres, between the point at which this instruction was issued and the point that the next instruction should be issued.

See also setDistanceToNextInstruction().

QString QGeoInstruction::instructionText () const

Returns the textual navigation instructions.

See also setInstructionText().

QGeoCoordinate QGeoInstruction::position () const

Returns the position where the instructions should be provided.

See also setPosition().

void QGeoInstruction::setDirection ( InstructionDirection direction )

Sets the direction associated with this instruction to direction.

See also direction().

void QGeoInstruction::setDistanceToNextInstruction ( qreal distance )

Sets the distance, in metres, between the point at which this instruction was issued and the point that the next instruction should be issued to distance.

See also distanceToNextInstruction().

void QGeoInstruction::setInstructionText ( const QString & instructionText )

Sets the textual navigation instructions to instructionText.

See also instructionText().

void QGeoInstruction::setPosition ( const QGeoCoordinate & position )

Sets the position where the instructions should be provided to position.

See also position().

void QGeoInstruction::setTimeToNextInstruction ( int secs )

Sets the estimated time it will take to travel from the point at which this instruction was issued and the point that the next instruction should be issued, in seconds, to secs.

See also timeToNextInstruction().

int QGeoInstruction::timeToNextInstruction () const

Returns the estimated time it will take to travel from the point at which this instruction was issued and the point that the next instruction should be issued, in seconds.

See also setTimeToNextInstruction().

bool QGeoInstruction::operator!= ( const QGeoInstruction & other ) const

Returns whether this navigation instruction is not equal to other.

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

Assigns other to this navigation instruction object and then returns a reference to this navigation instruction object.

bool QGeoInstruction::operator== ( const QGeoInstruction & other ) const

Returns whether this navigation instruction is equal to other.

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.