このページでは

QGeoRouteSegment Class

QGeoRouteSegment クラスは、ルートの区間を表します。詳細...

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

プロパティ

公開機能

QGeoRouteSegment()
QGeoRouteSegment(const QGeoRouteSegment &other)
QGeoRouteSegment(QGeoRouteSegment &&other)
~QGeoRouteSegment()
qreal distance() const
bool isLegLastSegment() const
bool isValid() const
QGeoManeuver maneuver() const
QGeoRouteSegment nextRouteSegment() const
QList<QGeoCoordinate> path() const
void setNextRouteSegment(const QGeoRouteSegment &routeSegment)
int travelTime() const
QGeoRouteSegment &operator=(const QGeoRouteSegment &other)
bool operator!=(const QGeoRouteSegment &lhs, const QGeoRouteSegment &rhs)
bool operator==(const QGeoRouteSegment &lhs, const QGeoRouteSegment &rhs)

詳細な説明

QGeoRouteSegment インスタンスには、ルートセグメントの物理的なレイアウト、ルートの長さ、ルートセグメントの通過に要する推定時間、およびルートセグメントの開始点に関連付けられたオプションのQGeoManeuver に関する情報が含まれます。

QGeoRouteSegment インスタンスは、ルーティンググラフ上の辺とみなすことができ、QGeoManeuver インスタンスは、グラフの頂点に付けられたオプションのラベルとみなすことができます。

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

[read-only] distance : const qreal

このプロパティには、ルートのこの区間で移動した距離(メートル単位)が格納されます。

アクセス関数:

qreal distance() const

[read-only] maneuver : const QGeoManeuver

このプロパティには、このルート区間のマニューバが格納されます。

このルート区間の起点に情報が紐付けられていない場合、無効なQGeoManeuver が保持されます。

アクセス関数:

QGeoManeuver maneuver() const

[read-only] path : const QList<QGeoCoordinate>

このプロパティには、ルートのこの区間の幾何学的形状が格納されます。

座標は、このルート区間を移動する人が実際に通過する順序で列挙する必要があります。

アクセス関数:

QList<QGeoCoordinate> path() const

[read-only] travelTime : const int

このプロパティには、このセグメントを辿るのにかかる推定時間(秒単位)が格納されます。

アクセス関数:

int travelTime() const

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

QGeoRouteSegment::QGeoRouteSegment()

無効なルートセグメントオブジェクトを作成します。

setNextRouteSegment()、setTravelTime()、setDistance()、setPath()、setManeuver() のいずれかが呼び出されるまで、そのルートセグメントは無効なままとなります。

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

other の内容からルートセグメントオブジェクトを作成します。

[constexpr noexcept default] QGeoRouteSegment::QGeoRouteSegment(QGeoRouteSegment &&other)

QGeoRouteSegment のインスタンスをMoveコンストラクタで生成します。

[noexcept] QGeoRouteSegment::~QGeoRouteSegment()

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

bool QGeoRouteSegment::isLegLastSegment() const

このルートセグメントが、ルート区間の最後のセグメントであるかどうかを返します。

bool QGeoRouteSegment::isValid() const

このルートセグメントが有効かどうかを返します。

ルートの最後のルートセグメントに対してnextRouteSegment()が呼び出された場合、返される値は無効なルートセグメントとなります。

QGeoRouteSegment QGeoRouteSegment::nextRouteSegment() const

ルート内の次のルートセグメントを返します。

これがルート内の最後のルートセグメントである場合、無効なルートセグメントを返します。

setNextRouteSegment()も参照してください 。

void QGeoRouteSegment::setNextRouteSegment(const QGeoRouteSegment &routeSegment)

ルートの次の区間をrouteSegment に設定します。

nextRouteSegment()も参照してください 。

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

このルートセグメントオブジェクトにother を割り当て、その後、このルートセグメントオブジェクトへの参照を返します。

関連する非メンバー

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

ルートセグメント「lhs 」と「rhs 」が等しくないかどうかを返します。

nextRouteSegment() の値は、比較の対象とはみなされません。

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

ルートセグメントlhs とrhs が等しいかどうかを返します。

nextRouteSegment() の値は、比較の対象とはなりません。

© 2026 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.