QGeoAreaMonitorInfo¶
The
QGeoAreaMonitorInfoclass describes the parameters of an area or region to be monitored for proximity. More…

Synopsis¶
Functions¶
def
__eq__(other)def
__ne__(other)def
area()def
expiration()def
identifier()def
isPersistent()def
isValid()def
name()def
notificationParameters()def
setArea(newShape)def
setExpiration(expiry)def
setName(name)def
setNotificationParameters(parameters)def
setPersistent(isPersistent)
Detailed Description¶
The purpose of area monitoring is to inform a user when he/she comes close to an area of interest. In general such an area is described by a
QGeoCircle. The circle’s center represents the place of interest and the area around it identifies the geographical region within which notifications are sent.A
QGeoAreaMonitorInfoobject is valid if it has a non-empty name and a validarea(). Such objects must be registered with aQGeoAreaMonitorSourceto start and stop the monitoring process. Note that extensive monitoring can be very resource consuming because the positioning engine must remain active and has to match the current position with eachQGeoAreaMonitorInfoinstance.To further reduce the burden on the system there are optional attributes which can set. Each monitored area can have an expiry date which automatically removes the to-be-monitored area from the monitoring source once the expiry date has been reached. Another option is to adjust the persistence of a monitored area. A
QGeoAreaMonitorInfothatisPersistent()will remain active beyond the current applications lifetime. If an area is entered while the monitoring application is not running the application will be started. Note that this feature is not available on all platforms. Its availability can be checked viasupportedAreaMonitorFeatures().See also
- class PySide2.QtPositioning.QGeoAreaMonitorInfo(other)¶
PySide2.QtPositioning.QGeoAreaMonitorInfo([name=””])
- Parameters:
name – str
- PySide2.QtPositioning.QGeoAreaMonitorInfo.area()¶
- Return type:
Returns the boundaries of the to-be-monitored area. This area must not be empty.
See also
- PySide2.QtPositioning.QGeoAreaMonitorInfo.expiration()¶
- Return type:
Returns the expiry date.
After an active
QGeoAreaMonitorInfohas expired the region is no longer monitored and theQGeoAreaMonitorInfoobject is removed from the list ofactive monitors.If the expiry
QDateTimeis invalid theQGeoAreaMonitorInfoobject is treated as not having an expiry date. This implies an indefinite monitoring period if the object is persistent or until the current application closes if the object is non-persistent.See also
- PySide2.QtPositioning.QGeoAreaMonitorInfo.identifier()¶
- Return type:
str
Returns the identifier of the
QGeoAreaMonitorInfoobject. The identifier is automatically generated upon construction of a newQGeoAreaMonitorInfoobject.
- PySide2.QtPositioning.QGeoAreaMonitorInfo.isPersistent()¶
- Return type:
bool
Returns true if the
QGeoAreaMonitorInfois persistent. The default value for this property is false.A non-persistent
QGeoAreaMonitorInfowill be removed by the system once the application owning the monitor object stops. Persistent objects remain active and can be retrieved once the application restarts.If the system triggers an event associated to a persistent
QGeoAreaMonitorInfothe relevant application will be re-started and the appropriate signal emitted.See also
- PySide2.QtPositioning.QGeoAreaMonitorInfo.isValid()¶
- Return type:
bool
Returns true, if the monitor is valid. A valid
QGeoAreaMonitorInfohas a non-emptyname()and the monitored area is notempty(). Otherwise this function returns false.
- PySide2.QtPositioning.QGeoAreaMonitorInfo.name()¶
- Return type:
str
Returns the name of the
QGeoAreaMonitorInfoobject. The name should be used to for user-visibility purposes.See also
- PySide2.QtPositioning.QGeoAreaMonitorInfo.notificationParameters()¶
- Return type:
Returns the set of platform specific paraemters used by this
QGeoAreaMonitorInfo.See also
- PySide2.QtPositioning.QGeoAreaMonitorInfo.__ne__(other)¶
- Parameters:
- Return type:
bool
Returns true if any of this object’s values are not the same as those of
other.
- PySide2.QtPositioning.QGeoAreaMonitorInfo.__eq__(other)¶
- Parameters:
- Return type:
bool
Returns true if all of this object’s values are the same as those of
other.
- PySide2.QtPositioning.QGeoAreaMonitorInfo.setArea(newShape)¶
- Parameters:
newShape –
PySide2.QtPositioning.QGeoShape
Sets the to-be-monitored area to
newShape.See also
- PySide2.QtPositioning.QGeoAreaMonitorInfo.setExpiration(expiry)¶
- Parameters:
expiry –
PySide2.QtCore.QDateTime
Sets the expiry date and time to
expiry.See also
- PySide2.QtPositioning.QGeoAreaMonitorInfo.setName(name)¶
- Parameters:
name – str
Sets the user visibile
name.See also
- PySide2.QtPositioning.QGeoAreaMonitorInfo.setNotificationParameters(parameters)¶
- Parameters:
parameters –
Sets the set of platform specific
parametersused byQGeoAreaMonitorInfo.See also
- PySide2.QtPositioning.QGeoAreaMonitorInfo.setPersistent(isPersistent)¶
- Parameters:
isPersistent – bool
Sets the
QGeoAreaMonitorInfoobjects persistence toisPersistent.Note that setting this flag does not imply that QGeoAreaMonitorInfoSource supports persistent monitoring.
supportedAreaMonitorFeatures()can be used to check for this feature’s availability.See also
© 2022 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.