QGeoPolygon Class
QGeoPolygon 클래스는 지리적 다각형을 정의합니다. 더 보기...
| 헤더: | #include <QGeoPolygon> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS Positioning) target_link_libraries(mytarget PRIVATE Qt6::Positioning) |
| qmake: | QT += positioning |
| 상속: | QGeoShape |
속성
- perimeter : QList<QGeoCoordinate>
공개 함수
| QGeoPolygon() | |
| QGeoPolygon(const QGeoShape &other) | |
| QGeoPolygon(const QList<QGeoCoordinate> &path) | |
| QGeoPolygon(const QGeoPolygon &other) | |
| ~QGeoPolygon() | |
| void | addCoordinate(const QGeoCoordinate &coordinate) |
| void | addHole(const QList<QGeoCoordinate> &holePath) |
| void | addHole(const QVariant &holePath) |
| bool | containsCoordinate(const QGeoCoordinate &coordinate) const |
| QGeoCoordinate | coordinateAt(qsizetype index) const |
| const QVariantList | hole(qsizetype index) const |
| const QList<QGeoCoordinate> | holePath(qsizetype index) const |
| qsizetype | holesCount() const |
| void | insertCoordinate(qsizetype index, const QGeoCoordinate &coordinate) |
| double | length(qsizetype indexFrom = 0, qsizetype indexTo = -1) const |
(since QtPositioning 5.12) const QList<QGeoCoordinate> & | perimeter() const |
| void | removeCoordinate(const QGeoCoordinate &coordinate) |
| void | removeCoordinate(qsizetype index) |
| void | removeHole(qsizetype index) |
| void | replaceCoordinate(qsizetype index, const QGeoCoordinate &coordinate) |
(since QtPositioning 5.12) void | setPerimeter(const QList<QGeoCoordinate> &path) |
| qsizetype | size() const |
| QString | toString() const |
| void | translate(double degreesLatitude, double degreesLongitude) |
| QGeoPolygon | translated(double degreesLatitude, double degreesLongitude) const |
| QGeoPolygon & | operator=(const QGeoPolygon &other) |
상세 설명
다각형은 그 둘레를 나타내는 ` QGeoCoordinate ` 객체들의 순서 지정된 목록으로 정의됩니다.
이 목록에서 인접한 두 요소는 두 요소를 모두 통과하는 일정한 방위의 최단 선분으로 서로 연결되도록 되어 있습니다. 이러한 유형의 연결은 경도 방향으로 날짜 변경선을 가로지를 수 있지만, 극점을 가로지르지는 않습니다.
이는 이 도형에 대해 QGeoShape::boundingGeoRectangle()이 반환하는 바운딩 박스의 계산과 관련이 있는데, 이 바운딩 박스의 왼쪽 상단 모서리의 위도는 경로 점 집합에서 가장 높은 위도로 설정됩니다. 마찬가지로, 오른쪽 하단 모서리의 위도는 경로 점 집합에서 가장 낮은 위도가 됩니다.
이 클래스는 QML에서도 geoPolygon 로 사용할 수 있습니다.
속성 문서
perimeter : QList<QGeoCoordinate>
이 속성은 다각형의 둘레 좌표를 저장합니다.
액세스 함수:
| const QList<QGeoCoordinate> & | perimeter() const |
| void | setPerimeter(const QList<QGeoCoordinate> &path) |
멤버 함수 문서
QGeoPolygon::QGeoPolygon()
새롭고 빈 지오폴리곤을 생성합니다.
QGeoPolygon::QGeoPolygon(const QGeoShape &other)
other 의 내용을 바탕으로 새로운 지오폴리곤을 생성합니다.
QGeoPolygon::QGeoPolygon(const QList<QGeoCoordinate> &path)
path 에 지정된 좌표를 기반으로 새로운 지리적 다각형을 생성합니다.
QGeoPolygon::QGeoPolygon(const QGeoPolygon &other)
other 의 내용을 바탕으로 새로운 지리적 다각형을 생성합니다.
[noexcept] QGeoPolygon::~QGeoPolygon()
이 다각형을 삭제합니다.
[invokable] void QGeoPolygon::addCoordinate(const QGeoCoordinate &coordinate)
다각형에 ‘ coordinate ’을 추가합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
void QGeoPolygon::addHole(const QList<QGeoCoordinate> &holePath)
오버로드된 메서드입니다. 다각형 내부의 구멍에 대한 holePath 를 설정합니다. 구멍은 QList<QGeoCoordinate>입니다.
[invokable] void QGeoPolygon::addHole(const QVariant &holePath)
다각형 내부의 구멍에 대한 holePath 를 설정합니다. 이 구멍은 QList<QGeoCoordinate>를 포함하는 QVariant 입니다.
참고: 이 함수는 메타 객체 시스템 및 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하십시오.
[invokable] bool QGeoPolygon::containsCoordinate(const QGeoCoordinate &coordinate) const
다각형의 둘레에 coordinate 가 요소 중 하나로 포함되어 있으면 true를 반환합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[invokable] QGeoCoordinate QGeoPolygon::coordinateAt(qsizetype index) const
index 에 해당하는 좌표를 반환합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[invokable] const QVariantList QGeoPolygon::hole(qsizetype index) const
index 에 있는 구멍을 나타내는 QList<QGeoCoordinate>를 포함하는 QVariant 를 반환합니다.
참고: 이 함수는 메타 객체 시스템 및 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하십시오.
const QList<QGeoCoordinate> QGeoPolygon::holePath(qsizetype index) const
index 에 있는 구멍을 나타내는 QList<QGeoCoordinate>를 반환합니다.
[invokable] qsizetype QGeoPolygon::holesCount() const
구멍의 개수를 반환합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[invokable] void QGeoPolygon::insertCoordinate(qsizetype index, const QGeoCoordinate &coordinate)
지정된 index 위치에 coordinate 를 삽입합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[invokable] double QGeoPolygon::length(qsizetype indexFrom = 0, qsizetype indexTo = -1) const
indexFrom 요소에서 indexTo 요소까지의 다각형 둘레 길이를 미터 단위로 반환합니다. 이 길이는 인접한 점 쌍마다의 최단 거리의 합으로 정의됩니다.
참고: 이 함수는 메타 객체 시스템 및 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[since QtPositioning 5.12] const QList<QGeoCoordinate> &QGeoPolygon::perimeter() const
다각형의 둘레를 구성하는 모든 요소를 반환합니다.
참고: perimeter 속성에 대한게터 함수입니다.
이 함수는 QtPositioning 5.12에서 도입되었습니다.
setPerimeter()도 참조하십시오 .
[invokable] void QGeoPolygon::removeCoordinate(const QGeoCoordinate &coordinate)
다각형에서 ` coordinate `가 마지막으로 나타나는 부분을 제거합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[invokable] void QGeoPolygon::removeCoordinate(qsizetype index)
index 위치에 있는 요소를 다각형에서 제거합니다.
참고: 이 함수는 메타 객체 시스템 및 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[invokable] void QGeoPolygon::removeHole(qsizetype index)
index 위치에 있는 요소를 구멍 목록에서 제거합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하십시오.
[invokable] void QGeoPolygon::replaceCoordinate(qsizetype index, const QGeoCoordinate &coordinate)
지정된 index 에 있는 path 요소를 coordinate 로 대체합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[since QtPositioning 5.12] void QGeoPolygon::setPerimeter(const QList<QGeoCoordinate> &path)
path 의 좌표 목록을 기반으로 다각형의 둘레를 설정합니다.
참고: perimeter 속성에 대한세터 함수입니다.
이 함수는 QtPositioning 5.12에서 도입되었습니다.
perimeter()도 참조하십시오 .
[invokable] qsizetype QGeoPolygon::size() const
다각형에 포함된 요소의 개수를 반환합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 을 참조하십시오.
[invokable] QString QGeoPolygon::toString() const
지오 폴리곤 속성을 문자열로 반환합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[invokable] void QGeoPolygon::translate(double degreesLatitude, double degreesLongitude)
이 지오폴리곤을 degreesLatitude 만큼 북쪽으로, degreesLongitude 만큼 동쪽으로 이동시킵니다.
degreesLatitude 와 degreesLongitude 의 음수 값은 각각 남쪽 방향 및 서쪽 방향으로의 변환을 의미합니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
[invokable] QGeoPolygon QGeoPolygon::translated(double degreesLatitude, double degreesLongitude) const
이 지오폴리곤을 degreesLatitude 만큼 북쪽으로, degreesLongitude 만큼 동쪽으로 이동시킨 사본을 반환합니다.
degreesLatitude 와 degreesLongitude 의 음수 값은 각각 남쪽 방향 및 서쪽 방향으로의 변환을 나타냅니다.
참고: 이 함수는 메타 객체 시스템과 QML을 통해 호출할 수 있습니다. Q_INVOKABLE 를 참조하십시오.
translate()도 참조하십시오 .
QGeoPolygon &QGeoPolygon::operator=(const QGeoPolygon &other)
other 를 이 지오폴리곤에 할당하고, 이 지오폴리곤에 대한 참조를 반환합니다.
© 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.