이 페이지에서

QGeoShape Class

QGeoShape 클래스는 지리적 영역을 정의합니다. 더 보기...

헤더: #include <QGeoShape>
CMake: find_package(Qt6 REQUIRED COMPONENTS Positioning)
target_link_libraries(mytarget PRIVATE Qt6::Positioning)
qmake: QT += positioning
상속된 항목:

QGeoCircle, QGeoPath, QGeoPolygon 및 QGeoRectangle

공개 유형

enum ShapeType { UnknownType, RectangleType, CircleType, PathType, PolygonType }

속성

공개 기능

QGeoShape()
QGeoShape(const QGeoShape &other)
~QGeoShape()
QGeoRectangle boundingGeoRectangle() const
QGeoCoordinate center() const
bool contains(const QGeoCoordinate &coordinate) const
bool isEmpty() const
bool isValid() const
QString toString() const
QGeoShape::ShapeType type() const
QGeoShape &operator=(const QGeoShape &other)
size_t qHash(const QGeoShape &shape, size_t seed = 0)
bool operator!=(const QGeoShape &lhs, const QGeoShape &rhs)
bool operator==(const QGeoShape &lhs, const QGeoShape &rhs)

상세 설명

이 클래스는 지리적 영역을 지정하는 클래스의 기본 클래스입니다.

일관성을 위해, 하위 클래스는 ` QGeoCoordinate ` 인스턴스와 미터 단위의 거리를 사용하여 관련 영역의 구체적인 세부 사항을 기술해야 합니다.

이 클래스는 QML에서도 geoShape 로 접근할 수 있습니다.

멤버 유형 문서

enum QGeoShape::ShapeType

도형의 유형을 설명합니다.

상수값설명
QGeoShape::UnknownType0유형이 알려지지 않은 도형
QGeoShape::RectangleType1직사각형 도형
QGeoShape::CircleType2원형 도형
QGeoShape::PathType3경로 유형
QGeoShape::PolygonType4다각형 유형

속성 문서

[read-only] center : QGeoCoordinate

이 속성은 도형의 기하학적 중심에 해당하는 좌표를 저장합니다.

액세스 함수:

QGeoCoordinate center() const

[read-only] isEmpty : bool

이 속성은 해당 지오 셰이프가 비어 있는지 여부를 정의합니다.

빈 지오 셰이프란 기하학적 면적이 0인 영역을 말합니다.

이 속성은 Qt 5.5에서 도입되었지만, 관련 액세서 함수는 이 클래스의 첫 번째 버전부터 존재해 왔습니다.

액세스 함수:

bool isEmpty() const

[read-only] isValid : bool

이 속성은 지리적 형상의 유효성을 나타냅니다.

지오 셰이프를 명확하게 설명하는 데 필요한 데이터 중 일부가 설정되지 않았거나, 이 객체의 하위 클래스에 따라 부적절한 값으로 설정된 경우, 해당 지오 셰이프는 유효하지 않은 것으로 간주됩니다. 이 유형의 기본 생성된 객체는 유효하지 않습니다.

이 속성은 Qt 5.5에서 도입되었으나, 관련 액세서 함수는 이 클래스의 첫 번째 버전부터 존재해 왔습니다.

액세스 함수:

bool isValid() const

[read-only] type : ShapeType

이 속성은 이 지오 셰이프의 유형을 나타냅니다.

이 속성은 Qt 5.5에서 도입되었지만, 관련 액세서 함수는 이 클래스의 첫 번째 버전부터 존재해 왔습니다.

액세스 함수:

QGeoShape::ShapeType type() const

멤버 함수 문서

QGeoShape::QGeoShape()

UnknownType 의 새로운 유효하지 않은 지리적 도형을 생성합니다.

[invokable] QGeoShape::QGeoShape(const QGeoShape &other)

other 의 복사본인 새로운 지오 도형을 생성합니다.

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.

[noexcept] QGeoShape::~QGeoShape()

이 지오메트릭 도형을 삭제합니다.

[invokable] QGeoRectangle QGeoShape::boundingGeoRectangle() const

지오 셰이프의 지리적 경계 사각형을 나타내는 ` QGeoRectangle ` 객체를 반환하며, 이 사각형은 지오 셰이프의 위도/경도 경계를 정의합니다.

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.

QGeoCoordinate QGeoShape::center() const

geo 도형의 기하학적 중심에 위치한 좌표를 반환합니다.

참고: center 속성에 대한게터 함수입니다.

[invokable] bool QGeoShape::contains(const QGeoCoordinate &coordinate) const

좌표 coordinate 가 이 지오 셰이프 내에 포함되는지 여부를 반환합니다.

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.

bool QGeoShape::isEmpty() const

이 지오 셰이프가 비어 있는지 여부를 반환합니다.

빈 지오 셰이프란 기하학적 면적이 0인 영역을 말합니다.

참고: isEmpty 속성에 대한게터 함수입니다.

bool QGeoShape::isValid() const

이 지오 셰이프가 유효한지 여부를 반환합니다.

참고: isValid 속성에 대한게터 함수입니다.

[invokable] QString QGeoShape::toString() const

이 지오 셰이프를 문자열로 변환하여 반환합니다.

참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.

QGeoShape::ShapeType QGeoShape::type() const

이 지리적 도형의 유형을 반환합니다.

참고: 속성 type에 대한게터 함수입니다.

QGeoShape &QGeoShape::operator=(const QGeoShape &other)

이 지오 셰이프에 ‘ other ’를 할당하고, 이 지오 셰이프에 대한 참조를 반환합니다.

관련 비회원

[noexcept] size_t qHash(const QGeoShape &shape, size_t seed = 0)

seed 를 사용하여 shape 의 해시 값을 반환합니다.

bool operator!=(const QGeoShape &lhs, const QGeoShape &rhs)

lhs 지오 셰이프가 rhs 지오 셰이프와 동일하지 않은 경우 true 를 반환하고, 그렇지 않은 경우 false 를 반환합니다.

bool operator==(const QGeoShape &lhs, const QGeoShape &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.