QGeoAddress Class
QGeoAddress 클래스는 QGeoLocation.. . 더보기...
헤더: | #include <QGeoAddress> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Positioning) target_link_libraries(mytarget PRIVATE Qt6::Positioning) |
qmake: | QT += positioning |
공용 함수
QGeoAddress() | |
QGeoAddress(const QGeoAddress &other) | |
(since 6.2) | QGeoAddress(QGeoAddress &&other) |
~QGeoAddress() | |
QString | city() const |
void | clear() |
QString | country() const |
QString | countryCode() const |
QString | county() const |
QString | district() const |
bool | isEmpty() const |
bool | isTextGenerated() const |
QString | postalCode() const |
void | setCity(const QString &city) |
void | setCountry(const QString &country) |
void | setCountryCode(const QString &countryCode) |
void | setCounty(const QString &county) |
void | setDistrict(const QString &district) |
void | setPostalCode(const QString &postalCode) |
void | setState(const QString &state) |
void | setStreet(const QString &street) |
(since 6.2) void | setStreetNumber(const QString &streetNumber) |
void | setText(const QString &text) |
QString | state() const |
QString | street() const |
(since 6.2) QString | streetNumber() const |
(since 6.2) void | swap(QGeoAddress &other) |
QString | text() const |
(since 6.2) QGeoAddress & | operator=(QGeoAddress &other) |
QGeoAddress & | operator=(const QGeoAddress &address) |
관련 비회원
size_t | qHash(const QGeoAddress &address, size_t seed = 0) |
bool | operator!=(const QGeoAddress &lhs, const QGeoAddress &rhs) |
bool | operator==(const QGeoAddress &lhs, const QGeoAddress &rhs) |
상세 설명
주소의 속성은 미국 기능 이름으로 정규화되며 지역 기능 수준에 매핑할 수 있습니다(예: State는 독일에서 "Bundesland"와 일치).
주소에는 주소의 구성 요소에 액세스하기 위한 표시 목적 및 추가 속성을 위한 text()가 포함되어 있습니다:
멤버 함수 문서
QGeoAddress::QGeoAddress()
기본 생성자.
QGeoAddress::QGeoAddress(const QGeoAddress &other)
other 의 복사본을 생성합니다.
[noexcept, since 6.2]
QGeoAddress::QGeoAddress(QGeoAddress &&other)
other 에서 이동하여 지리적 주소 객체를 생성합니다.
참고: QGeoAddress에서 이동한 객체는 소멸하거나 할당할 수만 있습니다. 소멸자나 할당 연산자 중 하나가 아닌 다른 함수를 호출하는 효과는 정의되지 않았습니다.
이 함수는 Qt 6.2에 도입되었습니다.
[noexcept]
QGeoAddress::~QGeoAddress()
이 주소를 삭제합니다.
QString QGeoAddress::city() const
도시를 반환합니다.
setCity()도 참조하세요 .
void QGeoAddress::clear()
주소의 모든 데이터 필드를 지웁니다.
QString QGeoAddress::country() const
국가 이름을 반환합니다.
setCountry()도 참조하세요 .
QString QGeoAddress::countryCode() const
ISO 3166-1 알파 3에 따른 국가 코드를 반환합니다.
setCountryCode()도 참조하세요 .
QString QGeoAddress::county() const
카운티를 반환합니다. 카운티는 국가 아래의 두 번째 하위 구역으로 간주됩니다.
setCounty()도 참조하세요 .
QString QGeoAddress::district() const
선거구를 반환합니다. 구는 도시 아래의 하위 구역으로 간주됩니다.
setDistrict()도 참조하세요 .
bool QGeoAddress::isEmpty() const
이 주소가 비어 있는지 여부를 반환합니다. 주소의 모든 필드가 비어 있으면 주소가 비어 있는 것으로 간주합니다.
bool QGeoAddress::isTextGenerated() const
QGeoAddress::text()가 주소 요소에서 자동으로 생성된 경우 참을 반환하고, 그렇지 않고 text()가 명시적으로 할당된 경우 거짓을 반환합니다.
QString QGeoAddress::postalCode() const
우편번호를 반환합니다.
setPostalCode()도 참조하세요 .
void QGeoAddress::setCity(const QString &city)
city.
city()도 참조하세요 .
void QGeoAddress::setCountry(const QString &country)
country 이름을 설정합니다.
country()도 참조하세요 .
void QGeoAddress::setCountryCode(const QString &countryCode)
ISO 3166-1 알파 3에 따라 countryCode 을 설정합니다.
countryCode()도 참조하세요 .
void QGeoAddress::setCounty(const QString &county)
county.
county()도 참조하세요 .
void QGeoAddress::setDistrict(const QString &district)
district.
district()도 참조하세요 .
void QGeoAddress::setPostalCode(const QString &postalCode)
postalCode.
postalCode()도 참조하세요 .
void QGeoAddress::setState(const QString &state)
state.
state()도 참조하세요 .
void QGeoAddress::setStreet(const QString &street)
도로명을 street 로 설정합니다.
참고: Qt6 이전에는 동호수, 건물 이름 또는 한 주소를 다른 주소와 구별하는 데 사용될 수 있는 다른 모든 것을 포함할 수도 있습니다. 이제 setStreetNumber()를 사용하여 이 데이터를 설정하세요.
street() 및 setStreetNumber()도 참조하세요 .
[since 6.2]
void QGeoAddress::setStreetNumber(const QString &streetNumber)
도로 번호를 streetNumber 로 설정합니다.
여기에는 동호수, 건물 이름 또는 한 주소를 다른 주소와 구별하는 데 사용될 수 있는 기타 모든 것을 포함할 수도 있습니다.
참고: Qt6 이전에는 setStreet() 메서드로 이 정보를 설정했습니다.
이 함수는 Qt 6.2에 도입되었습니다.
streetNumber() 및 setStreet()도 참조하세요 .
void QGeoAddress::setText(const QString &text)
text 가 비어 있지 않으면 text()에서 반환할 문자열로 text 을 명시적으로 할당합니다. isTextGenerated()은 false를 반환합니다.
text 가 비어 있으면 주소 요소에서 text()가 자동으로 생성되어야 함을 나타냅니다. isTextGenerated()는 참을 반환합니다.
text()도 참조하세요 .
QString QGeoAddress::state() const
주를 반환합니다. 시/도는 국가 아래의 첫 번째 하위 구분으로 간주됩니다.
setState()도 참조하세요 .
QString QGeoAddress::street() const
도로명을 반환합니다.
참고: Qt6 이전에는 동호수, 건물 이름 또는 한 주소를 다른 주소와 구별하는 데 사용될 수 있는 다른 모든 것을 포함할 수도 있었습니다. 지금 streetNumber()를 사용하여 이 데이터를 가져옵니다.
setStreet() 및 streetNumber()도 참조하세요 .
[since 6.2]
QString QGeoAddress::streetNumber() const
도로 번호를 반환합니다.
여기에는 동호수, 건물 이름 또는 한 주소를 다른 주소와 구별하는 데 사용될 수 있는 기타 모든 것이 포함될 수도 있습니다.
참고: Qt6 이전에는 street() 메서드로 이 정보를 반환했습니다.
이 함수는 Qt 6.2에 도입되었습니다.
setStreetNumber() 및 street()도 참조하세요 .
[noexcept, since 6.2]
void QGeoAddress::swap(QGeoAddress &other)
이 주소를 other 로 바꿉니다. 이 작업은 매우 빠르며 실패하지 않습니다.
이 기능은 Qt 6.2에 도입되었습니다.
QString QGeoAddress::text() const
주소를 형식이 지정된 단일 문자열로 반환합니다. 사용자에게 주소를 표시하는 데 사용하는 것이 권장되는 문자열입니다. 일반적으로 봉투에 있는 주소 형식을 취하지만 항상 그런 것은 아닙니다.
주소 텍스트는 자동으로 생성되거나 명시적으로 할당됩니다. 이는 isTextGenerated 을 확인하여 확인할 수 있습니다.
setText()에 빈 문자열이 제공되면 isTextGenerated()은 true
로 설정되고 text()는 countryCode()에 따라 주소의 요소(예: 거리, 도시 등)를 기반으로 로컬 형식이 지정된 문자열을 반환합니다. 텍스트 문자열은 주소 요소에서 생성되므로 text(), setStreet(), text()와 같은 호출 시퀀스는 text()를 호출할 때마다 다른 문자열을 반환할 수 있습니다.
비어 있지 않은 문자열이 setText()에 제공되면 isTextGenerated()은 false
로 설정되고 text()는 항상 명시적으로 할당된 문자열을 반환합니다. setStreet (), setCity() 등과 같은 다른 요소를 수정하기 위한 호출은 text()의 결과 문자열에 영향을 미치지 않습니다.
setText()도 참조하세요 .
[default, since 6.2]
QGeoAddress &QGeoAddress::operator=(QGeoAddress &other)
이동 - other 을 이 주소에 할당하고 이 주소에 대한 참조를 반환합니다.
참고: QGeoAddress 에서 이동한 객체는 소멸하거나 할당할 수만 있습니다. 소멸자나 할당 연산자 중 하나가 아닌 다른 함수를 호출하는 효과는 정의되지 않았습니다.
이 함수는 Qt 6.2에 도입되었습니다.
QGeoAddress &QGeoAddress::operator=(const QGeoAddress &address)
주어진 address 주소를 이 주소에 할당하고 이 주소에 대한 참조를 반환합니다.
관련 비회원
[noexcept]
size_t qHash(const QGeoAddress &address, size_t seed = 0)
계산에 seed 을 사용하여 address 에 대한 해시값을 반환합니다.
bool operator!=(const QGeoAddress &lhs, const QGeoAddress &rhs)
lhs 주소가 rhs 과 같지 않으면 true
을 반환하고, 그렇지 않으면 false
을 반환합니다.
bool operator==(const QGeoAddress &lhs, const QGeoAddress &rhs)
lhs 주소가 rhs 과 같으면 true
을 반환하고, 그렇지 않으면 false
을 반환합니다.
© 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.