RouteSegment Class Reference
Container for a single route segment data.
More...
#include <routesegment.h>
List of all members.
Public Member Functions |
|
| RouteSegment () |
| | Constructor.
|
| qreal | azimuth () const |
| | Getter for azimuth.
|
| const QString & | earthDirection () const |
| | Getter for earth direction code of the start of the segment.
|
| const QString & | instruction () const |
| | Getter for text instruction.
|
| qreal | length () const |
| | Getter for segment length.
|
| const QString & | lengthCaption () const |
| | Getter for length caption text.
|
| int | positionIndex () const |
| | Getter for the route geometry position index of the segment.
|
| void | setAzimuth (qreal azimuth) |
| | Set azimuth.
|
| void | setEarthDirection (const QString &direction) |
| | Set earth direction code of the start of the segment.
|
| void | setInstruction (const QString &instruction) |
| | Set instruction text.
|
| void | setLength (qreal meters) |
| | Set length.
|
| void | setLengthCaption (const QString &length) |
| | Set length caption text.
|
| void | setPositionIndex (int index) |
| | Set position index.
|
| void | setTime (int seconds) |
| | Set estimated travel time of the segment.
|
| void | setTurnAngle (qreal degrees) |
| | Set turn angle.
|
| void | setTurnType (const QString &type) |
| | Set turn type code.
|
| QString | street () const |
| | Get street name/number parsed from the text instruction.
|
| int | time () const |
| | Getter for estimated travel time of the segment.
|
| qreal | turnAngle () const |
| | Getter for turn angle.
|
| const QString & | turnType () const |
| | Getter for turn type code.
|
Private Attributes |
|
int | m_timeSeconds |
| | estimated time required to travel the segment in seconds
|
|
int | m_positionIndex |
| | index of the first point of the segment in route geometry
|
|
qreal | m_azimuth |
| | azimuth
|
|
qreal | m_length |
| | length of the segment in meters
|
|
qreal | m_turnAngle |
| | angle in degress of the turn between two segments, 0 for straight
|
|
QString | m_earthDirection |
| | direction: N, NE, E, SE, S, SW, W, NW
|
|
QString | m_instruction |
| | text instruction, e.g. Turn left at Oxford Street
|
|
QString | m_lengthCaption |
| | length of the segment e.g. 22m, 23.4 km, 14.4 miles
|
|
QString | m_turnType |
| | code of the turn type, optional, absent for the first segment
|
Detailed Description
Container for a single route segment data.
Contains all data for a single route segment.
- Author:
- Sami Rämö - sami.ramo@ixonos.com
Member Function Documentation
| qreal RouteSegment::azimuth |
( |
|
) |
const |
Getter for azimuth.
- Returns:
- Azimuth (in degrees)
| const QString & RouteSegment::earthDirection |
( |
|
) |
const |
Getter for earth direction code of the start of the segment.
- Returns:
- Earth direction (N, NE, E, SE, S, SW, W, NW)
| const QString & RouteSegment::instruction |
( |
|
) |
const |
Getter for text instruction.
e.g. Turn left at Oxford Street
- Returns:
- Instruction text
| qreal RouteSegment::length |
( |
|
) |
const |
Getter for segment length.
- Returns:
- Length of the segment in meters
| const QString & RouteSegment::lengthCaption |
( |
|
) |
const |
Getter for length caption text.
e.g. 22m, 23.4 km, 14.4 miles
- Returns:
- Length of the segment text
| int RouteSegment::positionIndex |
( |
|
) |
const |
Getter for the route geometry position index of the segment.
- Returns:
- Index of the first point of the segment in route geometry
| void RouteSegment::setAzimuth |
( |
qreal |
azimuth |
) |
|
Set azimuth.
- Parameters:
-
| azimuth | Azimuth (in degrees) |
| void RouteSegment::setEarthDirection |
( |
const QString & |
direction |
) |
|
Set earth direction code of the start of the segment.
- Parameters:
-
| void RouteSegment::setInstruction |
( |
const QString & |
instruction |
) |
|
Set instruction text.
- Parameters:
-
| instruction | Instructon text |
| void RouteSegment::setLength |
( |
qreal |
meters |
) |
|
| void RouteSegment::setLengthCaption |
( |
const QString & |
length |
) |
|
Set length caption text.
- Parameters:
-
| length | Length caption text |
| void RouteSegment::setPositionIndex |
( |
int |
index |
) |
|
Set position index.
- Parameters:
-
| void RouteSegment::setTime |
( |
int |
seconds |
) |
|
Set estimated travel time of the segment.
- Parameters:
-
| seconds | Estimated travel time in seconds |
| void RouteSegment::setTurnAngle |
( |
qreal |
degrees |
) |
|
Set turn angle.
- Parameters:
-
| degrees | Turn angle in degrees |
| void RouteSegment::setTurnType |
( |
const QString & |
type |
) |
|
Set turn type code.
- Parameters:
-
| QString RouteSegment::street |
( |
|
) |
const |
Get street name/number parsed from the text instruction.
- Returns:
- Street name/number, or empty QString if value is missing
| int RouteSegment::time |
( |
|
) |
const |
Getter for estimated travel time of the segment.
- Returns:
- Estimated travel time of the segment in seconds
| qreal RouteSegment::turnAngle |
( |
|
) |
const |
Getter for turn angle.
- Returns:
- Turn angle in degrees
| const QString & RouteSegment::turnType |
( |
|
) |
const |
Getter for turn type code.
e.g. C continue (go straight) TL turn left TSLL turn slight left TSHL turn sharp left TR turn right TSLR turn slight right TSHR turn sharp right TU U-turn
- Returns:
- Turn type code
The documentation for this class was generated from the following files: