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
[noexcept, 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
이 위치를 볼 때 표시할 권장 영역을 나타내는 경계 도형을 반환합니다.
예를 들어, 건물의 위치에는 건물을 중심으로 한 영역이 있을 수 있지만 이 영역이 충분히 커서 바로 주변의 지리적 컨텍스트를 표시할 수 있습니다.
참고: 이 메서드는 Qt6에서 boundingBox() 메서드 대신 도입되었습니다. QGeoRectangle 대신 QGeoShape 를 반환합니다. QGeoShape::boundingGeoRectangle()를 사용하여 도형의 경계 QGeoRectangle 를 구할 수 있습니다.
이 함수는 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)
Move-assings 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
을 반환합니다.
© 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.