QGeoRoute Class

QGeoRoute クラスは 2 点間のルートを表します。詳細...

Header: #include <QGeoRoute>
qmake: QT += location

プロパティ

公的機能

QGeoRoute()
QGeoRoute(const QGeoRoute &other)
~QGeoRoute()
QGeoRectangle bounds() const
qreal distance() const
QVariantMap extendedAttributes() const
QGeoRouteSegment firstRouteSegment() const
int legIndex() const
QGeoRoute overallRoute() const
QList<QGeoCoordinate> path() const
QString routeId() const
QList<QGeoRoute> routeLegs() const
QList<QGeoRouteSegment> segments() const
qsizetype segmentsCount() const
void setFirstRouteSegment(const QGeoRouteSegment &routeSegment)
void setPath(const QList<QGeoCoordinate> &path)
void setTravelMode(QGeoRouteRequest::TravelMode mode)
QGeoRouteRequest::TravelMode travelMode() const
int travelTime() const
QGeoRoute &operator=(const QGeoRoute &other)

保護された機能

QExplicitlySharedDataPointer<QGeoRoutePrivate> &d()
bool operator!=(const QGeoRoute &lhs, const QGeoRoute &rhs)
bool operator==(const QGeoRoute &lhs, const QGeoRoute &rhs)

詳細説明

QGeoRoute オブジェクトには、ルートの長さ、ルートの推定所要時間、地図上にルートの基本的なイメージを表示するのに十分な情報など、ルートに関する高レベルの情報が含まれています。

QGeoRoute オブジェクトは、ルートのサブセクションをより詳細に記述するQGeoRouteSegment オブジェクトのリストも含んでいます。

ルート情報は通常、QGeoRoutingManager::calculateRoute() を使って要求され、QGeoRouteReply インスタンスを返す。操作が正常に完了すると、QGeoRouteReply::routes() を使ってルーティング情報にアクセスすることができます。

QGeoRoutingManagerも参照してください

プロパティのドキュメント

[read-only] bounds : const QGeoRectangle

このプロパティは、ルート全体を包含するバウンディングボックスを保持します。

アクセス関数です:

QGeoRectangle bounds() const

[read-only] distance : const qreal

このプロパティは、このルートがカバーする距離をメートル単位で保持する。

アクセス関数:

qreal distance() const

[read-only] extendedAttributes : const QVariantMap

このプロパティは、このルートに関連する拡張属性を保持する。

アクセス関数です:

QVariantMap extendedAttributes() const

[read-only] legIndex : const int

このプロパティは、このルートのレッグインデックスを保持します。

QGeoRoute::routeLegs リスト内のレッグのインデックスは、次のレッグを見つけるために使用できます。

アクセス関数です:

int legIndex() const

[read-only] overallRoute : const QGeoRoute

このプロパティは、このルートレッグを含むルートを保持します。

このルートがルート全体のレグでない場合、このプロパティは空のルートを保持します。

アクセス関数です:

QGeoRoute overallRoute() const

path : QList<QGeoCoordinate>

このプロパティはルートの幾何学的形状を保持する。

座標は、ルートのこの区間を旅行する人が通過する順序でリストされなければならない。

アクセス関数:

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

[read-only] routeId : const QString

このプロパティは、このルートの識別子を保持する。

ルートの更新をサポートするサービスプロバイダは、一般的にルートに識別子を割り当てます。このルートがそのようなサービスプロバイダから来たものである場合、識別子を変更するとおそらくルートの更新が機能しなくなるでしょう。

アクセス関数です:

QString routeId() const

[read-only] routeLegs : const QList<QGeoRoute>

このプロパティは、多地点ルートのルートlegs を保持する。

アクセス関数です:

QList<QGeoRoute> routeLegs() const

[read-only] segments : const QList<QGeoRouteSegment>

このプロパティは、このルートのQGeoRouteSegment オブジェクトのリストを保持する。

アクセス関数です:

QList<QGeoRouteSegment> segments() const

[read-only] segmentsCount : const qsizetype

このプロパティは、ルートのセグメント数を保持します。

アクセス関数です:

qsizetype segmentsCount() const

[read-only] travelTime : const int

このプロパティは、このルートを通過するのにかかる推定時間を秒単位で保持する。

アクセス関数

int travelTime() const

メンバー関数ドキュメント

QGeoRoute::QGeoRoute()

ルートオブジェクトを構築します。

[noexcept] QGeoRoute::QGeoRoute(const QGeoRoute &other)

other の内容からルートオブジェクトを構築する。

[noexcept] QGeoRoute::~QGeoRoute()

このルートオブジェクトを破棄します。

[protected] QExplicitlySharedDataPointer<QGeoRoutePrivate> &QGeoRoute::d()

プライベートな実装を返します。

QGeoRouteSegment QGeoRoute::firstRouteSegment() const

ルートの最初のルートセグメントを返します。

ルートに関連付けられているルートセグメントがない場合は、無効なルートセグメントを返します。

残りのルートセグメントには、QGeoRouteSegment::nextRouteSegment で順次アクセスできます。

setFirstRouteSegment()も参照ください

void QGeoRoute::setFirstRouteSegment(const QGeoRouteSegment &routeSegment)

ルートの最初のルートセグメントをrouteSegment に設定する。

firstRouteSegment()も参照

void QGeoRoute::setTravelMode(QGeoRouteRequest::TravelMode mode)

このルートのトラベルモードをmode に設定する。

これは、request().travelModes() が返すトラベルモードのいずれかでなければなりません。

travelMode()も参照してください

QGeoRouteRequest::TravelMode QGeoRoute::travelMode() const

このルートのトラベルモードを返します。

これは request().travelModes() が返すトラベルモードのいずれかでなければなりません。

setTravelMode()も参照してください

[noexcept] QGeoRoute &QGeoRoute::operator=(const QGeoRoute &other)

other の内容をこのルートに割り当て、このルートへの参照を返します。

関連する非会員

[noexcept] bool operator!=(const QGeoRoute &lhs, const QGeoRoute &rhs)

lhsrhs のルートが等しくないかどうかを返す。

[noexcept] bool operator==(const QGeoRoute &lhs, const QGeoRoute &rhs)

lhsrhs のルートが等しいかどうかを返す。

© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.