QGeoAreaMonitorInfo Class
QGeoAreaMonitorInfo 클래스는 근접성을 모니터링할 지역 또는 영역의 매개변수를 설명합니다. 더 보기...
Header: | #include <QGeoAreaMonitorInfo> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS Positioning) target_link_libraries(mytarget PRIVATE Qt6::Positioning) |
qmake: | QT += positioning |
- 상속된 멤버를 포함한 모든 멤버 목록
- QGeoAreaMonitorInfo는 암시적으로 공유되는 클래스의 일부입니다.
공용 함수
QGeoAreaMonitorInfo(const QString &name = QString()) | |
QGeoAreaMonitorInfo(const QGeoAreaMonitorInfo &other) | |
(since 6.2) | QGeoAreaMonitorInfo(QGeoAreaMonitorInfo &&other) |
~QGeoAreaMonitorInfo() | |
QGeoShape | area() const |
QDateTime | expiration() const |
QString | identifier() const |
bool | isPersistent() const |
bool | isValid() const |
QString | name() const |
QVariantMap | notificationParameters() const |
void | setArea(const QGeoShape &newShape) |
void | setExpiration(const QDateTime &expiry) |
void | setName(const QString &name) |
void | setNotificationParameters(const QVariantMap ¶meters) |
void | setPersistent(bool isPersistent) |
(since 6.2) void | swap(QGeoAreaMonitorInfo &other) |
(since 6.2) QGeoAreaMonitorInfo & | operator=(QGeoAreaMonitorInfo &&other) |
QGeoAreaMonitorInfo & | operator=(const QGeoAreaMonitorInfo &other) |
관련 비회원
bool | operator!=(const QGeoAreaMonitorInfo &lhs, const QGeoAreaMonitorInfo &rhs) |
QDataStream & | operator<<(QDataStream &stream, const QGeoAreaMonitorInfo &monitor) |
bool | operator==(const QGeoAreaMonitorInfo &lhs, const QGeoAreaMonitorInfo &rhs) |
QDataStream & | operator>>(QDataStream &stream, QGeoAreaMonitorInfo &monitor) |
상세 설명
영역 모니터링의 목적은 사용자가 관심 영역에 가까워지면 이를 알려주는 것입니다. 일반적으로 이러한 영역은 QGeoCircle 로 표시됩니다. 원의 중심은 관심 장소를 나타내고 그 주변의 영역은 알림이 전송되는 지리적 영역을 식별합니다.
비어 있지 않은 이름과 유효한 area()가 있는 경우 QGeoAreaMonitorInfo 개체가 유효합니다. 이러한 개체는 모니터링 프로세스를 시작하고 중지하려면 QGeoAreaMonitorSource 에 등록해야 합니다. 포지셔닝 엔진이 활성 상태를 유지해야 하고 현재 위치를 각 QGeoAreaMonitorInfo 인스턴스와 일치시켜야 하므로 광범위한 모니터링은 리소스를 매우 많이 소모할 수 있습니다.
시스템의 부담을 더욱 줄이기 위해 설정할 수 있는 선택적 속성이 있습니다. 각 모니터링 영역에는 만료 날짜가 있을 수 있으며, 만료 날짜에 도달하면 모니터링 소스에서 모니터링할 영역을 자동으로 제거합니다. 또 다른 옵션은 모니터링 영역의 지속성을 조정하는 것입니다. isPersistent ()의 QGeoAreaMonitorInfo는 현재 애플리케이션 수명 기간 이후에도 활성 상태로 유지됩니다. 모니터링 애플리케이션이 실행되고 있지 않은 상태에서 영역을 입력하면 애플리케이션이 시작됩니다. 이 기능은 모든 플랫폼에서 사용할 수 있는 것은 아닙니다. 사용 가능 여부는 QGeoAreaMonitorSource::supportedAreaMonitorFeatures()에서 확인할 수 있습니다.
QGeoAreaMonitorSource 를참조하세요 .
멤버 기능 문서
[explicit]
QGeoAreaMonitorInfo::QGeoAreaMonitorInfo(const QString &name = QString())
지정된 name 로 QGeoAreaMonitorInfo 객체를 구축합니다.
name()도 참조하십시오 .
QGeoAreaMonitorInfo::QGeoAreaMonitorInfo(const QGeoAreaMonitorInfo &other)
QGeoAreaMonitorInfo 객체를 other 의 복사본으로 구성합니다.
[noexcept, since 6.2]
QGeoAreaMonitorInfo::QGeoAreaMonitorInfo(QGeoAreaMonitorInfo &&other)
other 에서 이동하여 QGeoAreaMonitorInfo 객체를 생성합니다.
QGeoAreaMonitorInfo에서 이동한 객체는 소멸하거나 할당할 수만 있다는 점에 유의하세요. 소멸자나 할당 연산자 중 하나가 아닌 다른 함수를 호출하는 효과는 정의되지 않았습니다.
이 함수는 Qt 6.2에 도입되었습니다.
[noexcept]
QGeoAreaMonitorInfo::~QGeoAreaMonitorInfo()
파괴자
QGeoShape QGeoAreaMonitorInfo::area() const
모니터링할 영역의 경계를 반환합니다. 이 영역은 비어 있으면 안 됩니다.
setArea()도 참조하세요 .
QDateTime QGeoAreaMonitorInfo::expiration() const
만료 날짜를 반환합니다.
활성 QGeoAreaMonitorInfo 이 만료되면 해당 지역은 더 이상 모니터링되지 않으며 QGeoAreaMonitorInfo 개체는 active monitors 목록에서 제거됩니다.
만료 QDateTime 가 유효하지 않은 경우 QGeoAreaMonitorInfo 개체는 만료 날짜가 없는 것으로 처리됩니다. 이는 객체가 영구적인 경우 무기한 모니터링 기간을 의미하며, 객체가 비영구적인 경우 현재 애플리케이션이 종료될 때까지 모니터링 기간을 의미합니다.
setExpiration() 및 QGeoAreaMonitorSource::activeMonitors()도 참조하세요 .
QString QGeoAreaMonitorInfo::identifier() const
QGeoAreaMonitorInfo 객체의 식별자를 반환합니다. 식별자는 새 QGeoAreaMonitorInfo 객체를 생성할 때 자동으로 생성됩니다.
bool QGeoAreaMonitorInfo::isPersistent() const
QGeoAreaMonitorInfo 가 영구적이면 true를 반환합니다. 이 속성의 기본값은 false입니다.
비영구적 QGeoAreaMonitorInfo 은 모니터 개체를 소유한 애플리케이션이 중지되면 시스템에 의해 제거됩니다. 영구 개체는 활성 상태로 유지되며 애플리케이션이 다시 시작되면 검색할 수 있습니다.
시스템에서 영구 QGeoAreaMonitorInfo 에 연결된 이벤트를 트리거하면 관련 애플리케이션이 다시 시작되고 적절한 신호가 방출됩니다.
setPersistent()도 참조하세요 .
bool QGeoAreaMonitorInfo::isValid() const
모니터가 유효하면 참을 반환합니다. 유효한 QGeoAreaMonitorInfo 에는 비어 있지 않은 name()이 있고 모니터링되는 영역이 empty()이 아닙니다. 그렇지 않으면 이 함수는 false를 반환합니다.
QString QGeoAreaMonitorInfo::name() const
QGeoAreaMonitorInfo 객체의 이름을 반환합니다. 이 이름은 사용자 표시용으로 사용해야 합니다.
setName()도 참조하세요 .
QVariantMap QGeoAreaMonitorInfo::notificationParameters() const
이 QGeoAreaMonitorInfo 에 사용되는 플랫폼별 매개변수 집합을 반환합니다.
setNotificationParameters()도 참조하세요 .
void QGeoAreaMonitorInfo::setArea(const QGeoShape &newShape)
모니터링할 영역을 newShape 으로 설정합니다.
area()도 참조하세요 .
void QGeoAreaMonitorInfo::setExpiration(const QDateTime &expiry)
만료 날짜와 시간을 expiry 로 설정합니다.
expiration()도 참조하세요 .
void QGeoAreaMonitorInfo::setName(const QString &name)
사용자 가시성을 설정합니다 name.
name()도 참조하세요 .
void QGeoAreaMonitorInfo::setNotificationParameters(const QVariantMap ¶meters)
QGeoAreaMonitorInfo 에서 사용하는 플랫폼별 parameters 집합을 설정합니다.
notificationParameters()도 참조하세요 .
void QGeoAreaMonitorInfo::setPersistent(bool isPersistent)
QGeoAreaMonitorInfo 개체의 지속성을 isPersistent 으로 설정합니다.
이 플래그를 설정한다고 해서 QGeoAreaMonitorSource 이 영구 모니터링을 지원한다는 의미는 아닙니다. QGeoAreaMonitorSource::supportedAreaMonitorFeatures()를 사용하여 이 기능의 가용성을 확인할 수 있습니다.
isPersistent()도 참조하세요 .
[noexcept, since 6.2]
void QGeoAreaMonitorInfo::swap(QGeoAreaMonitorInfo &other)
이 QGeoAreaMonitorInfo 객체를 other 로 바꿉니다. 이 작업은 매우 빠르며 실패하지 않습니다.
이 함수는 Qt 6.2에 도입되었습니다.
[noexcept, since 6.2]
QGeoAreaMonitorInfo &QGeoAreaMonitorInfo::operator=(QGeoAreaMonitorInfo &&other)
이동-이 QGeoAreaMonitorInfo 객체에 other 을 할당하고 이 QGeoAreaMonitorInfo 객체에 대한 참조를 반환합니다.
QGeoAreaMonitorInfo 에서 이동한 객체는 소멸하거나 할당할 수만 있다는 점에 유의하세요. 소멸자나 할당 연산자 중 하나가 아닌 다른 함수를 호출하는 효과는 정의되지 않았습니다.
이 함수는 Qt 6.2에 도입되었습니다.
QGeoAreaMonitorInfo &QGeoAreaMonitorInfo::operator=(const QGeoAreaMonitorInfo &other)
이 QGeoAreaMonitorInfo 객체에 other 을 할당하고 이 QGeoAreaMonitorInfo 객체에 대한 참조를 반환합니다.
관련 비회원
bool operator!=(const QGeoAreaMonitorInfo &lhs, const QGeoAreaMonitorInfo &rhs)
lhs 객체의 값이 rhs 객체의 값과 같지 않으면 true
을 반환합니다. 그렇지 않으면 false
을 반환합니다.
QDataStream &operator<<(QDataStream &stream, const QGeoAreaMonitorInfo &monitor)
주어진 monitor 을 지정된 stream 에 씁니다.
Qt 데이터 형 직렬화도참조하십시오 .
bool operator==(const QGeoAreaMonitorInfo &lhs, const QGeoAreaMonitorInfo &rhs)
lhs 객체의 모든 값이 rhs 객체의 값과 같으면 true
을 반환합니다. 그렇지 않으면 false
를 반환합니다.
QDataStream &operator>>(QDataStream &stream, QGeoAreaMonitorInfo &monitor)
지정된 stream 에서 주어진 monitor 으로 영역 모니터링 데이터를 읽습니다.
Qt 데이터 유형 직렬화도참조하십시오 .
© 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.