QGeoCodeReply Class
QGeoCodeReply 클래스는 QGeoCodingManager 의 인스턴스에 의해 시작된 작업을 관리합니다.. ..
Header: | #include <QGeoCodeReply> |
qmake: | QT += location |
Inherits: | QObject |
공용 유형
enum | Error { NoError, EngineNotSetError, CommunicationError, ParseError, UnsupportedOptionError, …, UnknownError } |
공용 함수
QGeoCodeReply(QGeoCodeReply::Error error, const QString &errorString, QObject *parent = nullptr) | |
virtual | ~QGeoCodeReply() |
virtual void | abort() |
QGeoCodeReply::Error | error() const |
QString | errorString() const |
bool | isFinished() const |
qsizetype | limit() const |
QList<QGeoLocation> | locations() const |
qsizetype | offset() const |
QGeoShape | viewport() const |
Signals
void | aborted() |
void | errorOccurred(QGeoCodeReply::Error error, const QString &errorString = QString()) |
void | finished() |
보호된 함수
QGeoCodeReply(QObject *parent = nullptr) | |
void | addLocation(const QGeoLocation &location) |
void | setError(QGeoCodeReply::Error error, const QString &errorString) |
void | setFinished(bool finished) |
void | setLimit(qsizetype limit) |
void | setLocations(const QList<QGeoLocation> &locations) |
void | setOffset(qsizetype offset) |
void | setViewport(const QGeoShape &viewport) |
상세 설명
QGeoCodeReply의 인스턴스는 이러한 작업의 상태와 결과를 관리합니다.
isFinished(), error() 및 errorString() 메서드는 작업이 완료되었는지 여부와 성공적으로 완료되었는지에 대한 정보를 제공합니다.
finished() 및 errorOccurred(QGeoCodeReply::Error,QString) 신호는 작업의 진행 상황을 모니터링하는 데 사용할 수 있습니다.
일반적으로 오류가 발생했기 때문에 새로 생성된 QGeoCodeReply가 완료된 상태일 수 있습니다. 이러한 인스턴스는 finished() 또는 errorOccurred(QGeoCodeReply::Error,QString) 신호를 전송하지 않으므로 신호에 연결하기 전에 isFinished()의 결과를 확인하는 것이 중요합니다. QGeoCodingManager 문서에서 이 작업을 수행하는 방법을 확인할 수 있습니다.
작업이 성공적으로 완료되면 locations()로 결과에 액세스할 수 있습니다.
멤버 유형 문서
enum QGeoCodeReply::Error
작업을 완료하지 못한 오류를 설명합니다.
Constant | 값 | 설명 |
---|---|---|
QGeoCodeReply::NoError | 0 | 오류가 발생하지 않았습니다. |
QGeoCodeReply::EngineNotSetError | 1 | 사용된 지오코딩 관리자에 QGeoCodingManagerEngine 인스턴스가 연결되어 있지 않습니다. |
QGeoCodeReply::CommunicationError | 2 | 서비스 제공업체와 통신하는 동안 오류가 발생했습니다. |
QGeoCodeReply::ParseError | 3 | 서비스 제공업체의 응답이 인식할 수 없는 형식입니다. |
QGeoCodeReply::UnsupportedOptionError | 4 | 요청된 작업 또는 작업 옵션 중 하나가 서비스 공급업체에서 지원되지 않습니다. |
QGeoCodeReply::CombinationError | 5 | 여러 소스에서 결과를 결합하는 동안 오류가 발생했습니다. |
QGeoCodeReply::UnknownError | 6 | 다른 범주에 속하지 않는 오류가 발생했습니다. |
멤버 함수 문서
[explicit protected]
QGeoCodeReply::QGeoCodeReply(QObject *parent = nullptr)
지정된 parent 으로 지오코드 답장을 작성합니다.
[explicit]
QGeoCodeReply::QGeoCodeReply(QGeoCodeReply::Error error, const QString &errorString, QObject *parent = nullptr)
주어진 error 및 errorString 과 지정된 parent 로 지오코드 답장을 작성합니다.
[virtual noexcept]
QGeoCodeReply::~QGeoCodeReply()
이 응답 객체를 삭제합니다.
[virtual]
void QGeoCodeReply::abort()
작업을 즉시 취소합니다.
응답이 완료되면 아무 작업도 수행하지 않습니다.
aborted()도 참조하세요 .
[signal]
void QGeoCodeReply::aborted()
이 신호는 작업이 취소되었을 때 방출됩니다.
abort()도 참조하세요 .
[protected]
void QGeoCodeReply::addLocation(const QGeoLocation &location)
이 답글의 위치 목록에 location 을 추가합니다.
QGeoCodeReply::Error QGeoCodeReply::error() const
이 답글의 오류 상태를 반환합니다.
결과가 QGeoCodeReply::NoError 이면 오류가 발생하지 않은 것입니다.
setError()도 참조하세요 .
[signal]
void QGeoCodeReply::errorOccurred(QGeoCodeReply::Error error, const QString &errorString = QString())
이 신호는 이 회신 처리 과정에서 오류가 감지되었을 때 전송됩니다. finished () 신호가 뒤따를 수 있습니다.
오류는 오류 코드 error 로 설명됩니다. errorString 이 비어 있지 않으면 오류에 대한 텍스트 설명이 포함됩니다.
이 신호와 QGeoCodingManager::errorOccurred() 신호가 동시에 전송됩니다.
참고: 이 신호에 연결된 슬롯에서 이 회신 개체를 삭제하지 마세요. 대신 deleteLater()를 사용하세요.
QString QGeoCodeReply::errorString() const
이 응답의 오류 상태를 텍스트로 표현한 내용을 반환합니다.
오류가 발생하지 않은 경우 빈 문자열을 반환합니다. 관련 텍스트 표현이 없는 오류가 발생했을 수도 있으며, 이 경우에도 빈 문자열이 반환됩니다.
오류가 발생했는지 확인하려면 QGeoCodeReply::error()가 QGeoCodeReply::NoError 과 같은지 확인하세요.
[signal]
void QGeoCodeReply::finished()
이 신호는 응답 처리가 완료되면 전송됩니다.
error()가 QGeoCodeReply::NoError 과 같으면 처리가 성공적으로 완료된 것입니다.
이 신호와 QGeoCodingManager::finished()가 동시에 전송됩니다.
참고: 이 신호에 연결된 슬롯에서 이 회신 개체를 삭제하지 마세요. 대신 deleteLater()를 사용하세요.
setFinished()도 참조하세요 .
bool QGeoCodeReply::isFinished() const
작업이 성공적으로 완료되었거나 오류가 발생하여 작업이 중단된 경우 true를 반환합니다.
qsizetype QGeoCodeReply::limit() const
각 데이터 소스의 응답 수에 대한 제한을 반환합니다.
제한이 설정되지 않은 경우 이 함수는 -1을 반환합니다.
응답 수가 요청된 수보다 적은 경우 locations().length()보다 클 수 있습니다.
setLimit()도 참조하세요 .
QList<QGeoLocation> QGeoCodeReply::locations() const
위치 목록을 반환합니다.
위치는 이 답글을 만든 QGeoCodingManager 함수에 해당하는 작업의 결과입니다.
setLocations()도 참조하세요 .
qsizetype QGeoCodeReply::offset() const
결과 가져오기를 시작할 전체 결과 집합의 오프셋을 반환합니다.
setOffset()도 참조하세요 .
[protected]
void QGeoCodeReply::setError(QGeoCodeReply::Error error, const QString &errorString)
이 응답의 오류 상태를 error 로, 오류의 텍스트 표현을 errorString 으로 설정합니다.
이렇게 하면 errorOccurred() 및 finished() 신호도 순서대로 전송됩니다.
error()도 참조하세요 .
[protected]
void QGeoCodeReply::setFinished(bool finished)
이 응답이 완료되었는지 여부를 finished 으로 설정합니다.
finished 이 참이면 finished() 신호가 전송됩니다.
작업이 성공적으로 완료되면 이 함수 전에 QGeoCodeReply::setLocations()를 호출해야 합니다. 오류가 발생하면 QGeoCodeReply::setError()를 대신 사용해야 합니다.
finished()도 참조하세요 .
[protected]
void QGeoCodeReply::setLimit(qsizetype limit)
각 데이터 소스의 응답 수에 대한 제한을 limit 으로 설정합니다.
limit 이 -1이면 사용 가능한 모든 응답이 반환됩니다.
limit()도 참조하세요 .
[protected]
void QGeoCodeReply::setLocations(const QList<QGeoLocation> &locations)
답장에 locations 목록을 설정합니다.
locations()도 참조하세요 .
[protected]
void QGeoCodeReply::setOffset(qsizetype offset)
결과 가져오기를 시작할 전체 결과 집합의 오프셋을 offset 으로 설정합니다.
offset()도 참조하세요 .
[protected]
void QGeoCodeReply::setViewport(const QGeoShape &viewport)
결과가 포함된 뷰포트를 viewport 로 설정합니다.
viewport()도 참조하세요 .
QGeoShape QGeoCodeReply::viewport() const
결과가 포함된 뷰포트를 반환합니다.
이 함수는 이 회신을 생성한 QGeoCodingManager 함수에 뷰포트 바이어스가 지정되지 않은 경우 nullptr
을 반환합니다.
setViewport()도 참조하세요 .
© 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.