QGeoRouteLeg Class

The QGeoRouteLeg class represents a leg of a route, that is the portion of a route between one waypoint and the next. This is a subclass of QGeoRoute , exposing route leg specific API. 更多...

頭: #include <QGeoRouteLeg>
qmake: QT += location
Since: Qt 5.12
繼承: QGeoRoute

公共函數

QGeoRouteLeg ()
QGeoRouteLeg (const QGeoRouteLeg & other )
~QGeoRouteLeg ()
int legIndex () const
QGeoRoute overallRoute () const
void setLegIndex (int idx )
void setOverallRoute (const QGeoRoute & route )

保護函數

QGeoRouteLeg (const QExplicitlySharedDataPointer<QGeoRoutePrivate> & dd )

詳細描述

The QGeoRouteLeg class represents a leg of a route, that is the portion of a route between one waypoint and the next. This is a subclass of QGeoRoute , exposing route leg specific API.

注意: QGeoRoute::routeLegs will return an empty list if called on a route leg.

另請參閱 QGeoRoute .

成員函數文檔編製

QGeoRouteLeg:: QGeoRouteLeg ()

Constructs a route leg object.

QGeoRouteLeg:: QGeoRouteLeg (const QGeoRouteLeg & other )

Constructs a route leg object from the contents of other .

[protected] QGeoRouteLeg:: QGeoRouteLeg (const QExplicitlySharedDataPointer < QGeoRoutePrivate > & dd )

Default constructs an instance of QGeoRouteLeg.

QGeoRouteLeg:: ~QGeoRouteLeg ()

Destroys this route object.

int QGeoRouteLeg:: legIndex () const

Returns the index of this route leg inside the containing QGeoRoute::routeLegs list. Can be used to find the next legs.

另請參閱 setLegIndex ().

QGeoRoute QGeoRouteLeg:: overallRoute () const

返迴 route that contains this route leg.

另請參閱 setOverallRoute ().

void QGeoRouteLeg:: setLegIndex ( int idx )

Sets the route leg index to idx .

另請參閱 legIndex ().

void QGeoRouteLeg:: setOverallRoute (const QGeoRoute & route )

設置 route that contains this route leg.

另請參閱 overallRoute ().