QGeoRouteReply Class

QGeoRouteReply 클래스는 QGeoRoutingManager 의 인스턴스에 의해 시작된 작업을 관리합니다.. ..

Header: #include <QGeoRouteReply>
qmake: QT += location
Inherits: QObject

공용 유형

enum Error { NoError, EngineNotSetError, CommunicationError, ParseError, UnsupportedOptionError, UnknownError }

공용 함수

QGeoRouteReply(QGeoRouteReply::Error error, const QString &errorString, QObject *parent = nullptr)
virtual ~QGeoRouteReply()
virtual void abort()
QGeoRouteReply::Error error() const
QString errorString() const
bool isFinished() const
QGeoRouteRequest request() const
QList<QGeoRoute> routes() const

Signals

void aborted()
void errorOccurred(QGeoRouteReply::Error error, const QString &errorString = QString())
void finished()

보호된 함수

QGeoRouteReply(const QGeoRouteRequest &request, QObject *parent = nullptr)
void addRoutes(const QList<QGeoRoute> &routes)
void setError(QGeoRouteReply::Error error, const QString &errorString)
void setFinished(bool finished)
void setRoutes(const QList<QGeoRoute> &routes)

상세 설명

QGeoRouteReply의 인스턴스는 이러한 작업의 상태와 결과를 관리합니다.

isFinished(), error() 및 errorString() 메서드는 작업이 완료되었는지 여부와 성공적으로 완료되었는지에 대한 정보를 제공합니다.

finished() 및 errorOccurred(QGeoRouteReply::Error,QString) 시그널은 작업 진행 상황을 모니터링하는 데 사용할 수 있습니다.

새로 생성된 QGeoRouteReply가 완료된 상태일 수 있으며, 대부분 오류가 발생했기 때문일 수 있습니다. 이러한 인스턴스는 finished() 또는 errorOccurred(QGeoRouteReply::Error,QString) 신호를 전송하지 않으므로 신호에 연결하기 전에 isFinished()의 결과를 확인하는 것이 중요합니다. QGeoRoutingManager 문서에서 이 작업을 수행하는 방법을 확인할 수 있습니다.

작업이 성공적으로 완료되면 routes()로 결과에 액세스할 수 있습니다.

멤버 유형 문서

enum QGeoRouteReply::Error

작업을 완료하지 못한 오류를 설명합니다.

Constant설명
QGeoRouteReply::NoError0오류가 발생하지 않았습니다.
QGeoRouteReply::EngineNotSetError1사용된 라우팅 관리자에 연결된 QGeoRoutingManagerEngine 인스턴스가 없습니다.
QGeoRouteReply::CommunicationError2서비스 제공업체와 통신하는 동안 오류가 발생했습니다.
QGeoRouteReply::ParseError3서비스 제공업체의 응답이 인식할 수 없는 형식입니다.
QGeoRouteReply::UnsupportedOptionError4요청된 작업 또는 작업 옵션 중 하나가 서비스 공급업체에서 지원되지 않습니다.
QGeoRouteReply::UnknownError5다른 범주에 속하지 않는 오류가 발생했습니다.

멤버 함수 문서

[explicit protected] QGeoRouteReply::QGeoRouteReply(const QGeoRouteRequest &request, QObject *parent = nullptr)

지정된 parent 을 사용하여 request 을 기반으로 경로 응답 객체를 구성합니다.

[explicit] QGeoRouteReply::QGeoRouteReply(QGeoRouteReply::Error error, const QString &errorString, QObject *parent = nullptr)

주어진 errorerrorString 그리고 지정된 parent 로 경로 응답을 구성합니다.

[virtual noexcept] QGeoRouteReply::~QGeoRouteReply()

이 경로 응답 개체를 삭제합니다.

[virtual] void QGeoRouteReply::abort()

작업을 즉시 취소합니다.

응답이 완료되면 아무 작업도 수행되지 않습니다.

[signal] void QGeoRouteReply::aborted()

이 신호는 작업이 취소되었을 때 방출됩니다.

abort()도 참조하세요 .

[protected] void QGeoRouteReply::addRoutes(const QList<QGeoRoute> &routes)

기존 목록에 routes 목록을 추가합니다.

QGeoRouteReply::Error QGeoRouteReply::error() const

이 답글의 오류 상태를 반환합니다.

결과가 QGeoRouteReply::NoError 이면 오류가 발생하지 않은 것입니다.

setError()도 참조하세요 .

[signal] void QGeoRouteReply::errorOccurred(QGeoRouteReply::Error error, const QString &errorString = QString())

이 신호는 이 회신 처리 과정에서 오류가 감지되었을 때 전송됩니다. finished () 신호가 뒤따를 수 있습니다.

오류는 오류 코드 error 로 설명됩니다. errorString 이 비어 있지 않으면 오류에 대한 텍스트 설명이 포함됩니다.

이 신호와 QGeoRoutingManager::errorOccurred() 신호가 동시에 전송됩니다.

참고: 이 신호에 연결된 슬롯에서 이 회신 개체를 삭제하지 마세요. 대신 deleteLater()를 사용하세요.

QString QGeoRouteReply::errorString() const

이 응답의 오류 상태를 텍스트로 표현한 내용을 반환합니다.

오류가 발생하지 않은 경우 빈 문자열을 반환합니다. 관련 텍스트 표현이 없는 오류가 발생했을 수도 있으며, 이 경우에도 빈 문자열이 반환됩니다.

오류가 발생했는지 확인하려면 QGeoRouteReply::error()가 QGeoRouteReply::NoError 과 같은지 확인하세요.

[signal] void QGeoRouteReply::finished()

이 신호는 응답 처리가 완료되면 전송됩니다.

error()가 QGeoRouteReply::NoError 과 같으면 처리가 성공적으로 완료된 것입니다.

이 신호와 QGeoRoutingManager::finished()가 동시에 전송됩니다.

참고: 이 신호에 연결된 슬롯에서 이 회신 개체를 삭제하지 마세요. 대신 deleteLater()를 사용하세요.

setFinished()도 참조하세요 .

bool QGeoRouteReply::isFinished() const

작업이 성공적으로 완료되었거나 오류가 발생하여 작업이 중단된 경우 true를 반환합니다.

QGeoRouteRequest QGeoRouteReply::request() const

경로를 지정한 경로 요청을 반환합니다.

QList<QGeoRoute> QGeoRouteReply::routes() const

요청된 경로 목록을 반환합니다.

setRoutes()도 참조하세요 .

[protected] void QGeoRouteReply::setError(QGeoRouteReply::Error error, const QString &errorString)

이 응답의 오류 상태를 error 로, 오류의 텍스트 표현을 errorString 으로 설정합니다.

이렇게 하면 errorOccurred() 및 finished() 신호도 순서대로 전송됩니다.

error()도 참조하세요 .

[protected] void QGeoRouteReply::setFinished(bool finished)

이 응답이 완료되었는지 여부를 finished 으로 설정합니다.

finished 이 참이면 finished() 신호가 전송됩니다.

작업이 성공적으로 완료되면 이 함수 전에 QGeoRouteReply::setRoutes()를 호출해야 합니다. 오류가 발생하면 QGeoRouteReply::setError()를 대신 사용해야 합니다.

finished()도 참조하세요 .

[protected] void QGeoRouteReply::setRoutes(const QList<QGeoRoute> &routes)

답장의 경로 목록을 routes 로 설정합니다.

routes()도 참조하세요 .

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