이 페이지에서

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-construct로 생성합니다.

[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.