이 페이지에서

QGeoRoute Class

QGeoRoute 클래스는 두 지점 사이의 경로를 나타냅니다. 더 보기...

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

속성

공개 함수

QGeoRoute()
QGeoRoute(const QGeoRoute &other)
QGeoRoute(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 의 내용을 바탕으로 경로 객체를 생성합니다.

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

QGeoRoute 의 인스턴스를 생성합니다.

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

lhs 및 rhs 경로가 서로 다른지 여부를 반환합니다.

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

lhs 및 rhs 경로가 동일한지 여부를 반환합니다.

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