QGeoLocation Class
QGeoLocation 클래스는 위치에 대한 기본 정보를 나타냅니다. 더 보기...
| 헤더: | #include <QGeoLocation> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Positioning) target_link_libraries(mytarget PRIVATE Qt6::Positioning) |
| qmake: | QT += positioning |
공개 함수
| QGeoLocation() | |
| QGeoLocation(const QGeoLocation &other) | |
(since 6.2) | QGeoLocation(QGeoLocation &&other) |
| ~QGeoLocation() | |
| QGeoAddress | address() const |
(since 6.2) QGeoShape | boundingShape() const |
| QGeoCoordinate | coordinate() const |
| QVariantMap | extendedAttributes() const |
| bool | isEmpty() const |
| void | setAddress(const QGeoAddress &address) |
(since 6.2) void | setBoundingShape(const QGeoShape &boundingShape) |
| void | setCoordinate(const QGeoCoordinate &coordinate) |
| void | setExtendedAttributes(const QVariantMap &data) |
(since 6.2) void | swap(QGeoLocation &other) |
(since 6.2) QGeoLocation & | operator=(QGeoLocation &&other) |
| QGeoLocation & | operator=(const QGeoLocation &other) |
관련 비멤버
| size_t | qHash(const QGeoLocation &location, size_t seed = 0) |
| bool | operator!=(const QGeoLocation &lhs, const QGeoLocation &rhs) |
| bool | operator==(const QGeoLocation &lhs, const QGeoLocation &rhs) |
멤버 함수 문서
QGeoLocation::QGeoLocation()
새로운 위치 객체를 생성합니다.
QGeoLocation::QGeoLocation(const QGeoLocation &other)
의 복사본을 생성합니다. other
[constexpr noexcept default, since 6.2] QGeoLocation::QGeoLocation(QGeoLocation &&other)
other 에서 데이터를 가져와 지리적 위치 객체를 생성합니다.
참고: 이동의 대상이 된 QGeoLocation객체는 소멸시키거나 할당하는 작업만 수행할 수 있습니다. 소멸자나 할당 연산자 중 하나를 제외한 다른 함수를 호출할 경우 그 결과는 정의되지 않습니다.
이 함수는 Qt 6.2에서 도입되었습니다.
[noexcept] QGeoLocation::~QGeoLocation()
위치 객체를 삭제합니다.
QGeoAddress QGeoLocation::address() const
해당 위치의 주소를 반환합니다.
setAddress()도 참조하십시오 .
[since 6.2] QGeoShape QGeoLocation::boundingShape() const
이 위치를 볼 때 표시할 권장 영역을 나타내는 경계 도형을 반환합니다.
예를 들어, 건물의 위치에는 건물을 중심으로 한 영역이 있을 수 있지만, 이 영역은 건물의 바로 주변 지리적 맥락을 보여줄 수 있을 만큼 충분히 넓습니다.
참고: 이 메서드는 boundingBox() 메서드 대신 Qt6에서 도입되었습니다. 이 메서드는 QGeoRectangle 대신 QGeoShape 를 반환합니다. 도형의 경계 QGeoRectangle 를 얻으려면 QGeoShape::boundingGeoRectangle()를 사용하십시오.
이 함수는 Qt 6.2에서 도입되었습니다.
setBoundingShape()도 참조하십시오 .
QGeoCoordinate QGeoLocation::coordinate() const
해당 위치의 좌표를 반환합니다.
setCoordinate()도 참조하십시오 .
QVariantMap QGeoLocation::extendedAttributes() const
이 위치와 관련된 확장 속성을 반환합니다. 확장 속성은 백엔드에 따라 다르며, 위치에 따라 달라질 수도 있습니다.
setExtendedAttributes()도 참조하십시오 .
bool QGeoLocation::isEmpty() const
위치 좌표가 ` invalid`이고 다른 모든 위치 필드가 비어 있는 경우 ` true `을 반환합니다. 그렇지 않은 경우 ` false`을 반환합니다.
void QGeoLocation::setAddress(const QGeoAddress &address)
위치의 address 를 설정합니다.
address()도 참조하십시오 .
[since 6.2] void QGeoLocation::setBoundingShape(const QGeoShape &boundingShape)
위치의 boundingShape 를 설정합니다.
이 함수는 Qt 6.2에서 도입되었습니다.
boundingShape()도 참조하십시오 .
void QGeoLocation::setCoordinate(const QGeoCoordinate &coordinate)
위치의 coordinate 를 설정합니다.
coordinate()도 참조하십시오 .
void QGeoLocation::setExtendedAttributes(const QVariantMap &data)
data 에 지정된 매개변수를 사용하여 해당 위치의 확장 속성을 설정합니다.
extendedAttributes()도 참조하십시오 .
[noexcept, since 6.2] void QGeoLocation::swap(QGeoLocation &other)
이 위치를 other 와 서로 바꿉니다. 이 작업은 매우 빠르며 절대 실패하지 않습니다.
이 함수는 Qt 6.2에서 도입되었습니다.
[noexcept, since 6.2] QGeoLocation &QGeoLocation::operator=(QGeoLocation &&other)
other 을 이 위치로 이동시키고, 이 위치에 대한 참조를 반환합니다.
참고: 이동된 QGeoLocation 객체는 소멸되거나 할당될 수만 있습니다. 소멸자나 할당 연산자 중 하나를 제외한 다른 함수를 호출할 경우의 결과는 정의되지 않습니다.
이 함수는 Qt 6.2에서 도입되었습니다.
QGeoLocation &QGeoLocation::operator=(const QGeoLocation &other)
이 위치에 ` other `를 할당하고, 이 위치에 대한 참조를 반환합니다.
관련 비회원
[noexcept] size_t qHash(const QGeoLocation &location, size_t seed = 0)
seed 를 사용하여 location 의 해시 값을 반환합니다.
참고: 이 해시 계산은 확장 속성을 고려하지 않습니다. 즉, 확장 속성만 다른 두 지리적 위치 객체는 유사한 해시 값을 반환합니다.
bool operator!=(const QGeoLocation &lhs, const QGeoLocation &rhs)
lhs 의 위치가 rhs 과 다를 경우 true 을 반환하고, 그렇지 않은 경우 false 을 반환합니다.
bool operator==(const QGeoLocation &lhs, const QGeoLocation &rhs)
lhs 의 위치가 rhs 과 일치하면 true 을 반환하고, 그렇지 않으면 false 을 반환합니다.
© 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.