![]() |
Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
\inmodule QtPositioning More...
#include <qgeoareamonitorinfo.h>
Public Member Functions | |
QGeoAreaMonitorInfo (const QString &name=QString()) | |
Constructs a QGeoAreaMonitorInfo object with the specified name. | |
QGeoAreaMonitorInfo (const QGeoAreaMonitorInfo &other) | |
Constructs a QGeoAreaMonitorInfo object as a copy of other. | |
QGeoAreaMonitorInfo (QGeoAreaMonitorInfo &&other) noexcept=default | |
~QGeoAreaMonitorInfo () | |
Destructor. | |
QGeoAreaMonitorInfo & | operator= (const QGeoAreaMonitorInfo &other) |
Assigns other to this QGeoAreaMonitorInfo object and returns a reference to this QGeoAreaMonitorInfo object. | |
void | swap (QGeoAreaMonitorInfo &other) noexcept |
QString | name () const |
Returns the name of the QGeoAreaMonitorInfo object. | |
void | setName (const QString &name) |
Sets the user visibile name. | |
QString | identifier () const |
Returns the identifier of the QGeoAreaMonitorInfo object. | |
bool | isValid () const |
Returns true, if the monitor is valid. | |
QGeoShape | area () const |
Returns the boundaries of the to-be-monitored area. | |
void | setArea (const QGeoShape &newShape) |
Sets the to-be-monitored area to newShape. | |
QDateTime | expiration () const |
Returns the expiry date. | |
void | setExpiration (const QDateTime &expiry) |
Sets the expiry date and time to expiry. | |
bool | isPersistent () const |
Returns true if the QGeoAreaMonitorInfo is persistent. | |
void | setPersistent (bool isPersistent) |
Sets the QGeoAreaMonitorInfo object's persistence to isPersistent. | |
QVariantMap | notificationParameters () const |
Returns the set of platform specific parameters used by this QGeoAreaMonitorInfo. | |
void | setNotificationParameters (const QVariantMap ¶meters) |
Sets the set of platform specific parameters used by QGeoAreaMonitorInfo. | |
void | detach () |
Friends | |
class | QGeoAreaMonitorInfoPrivate |
bool | operator== (const QGeoAreaMonitorInfo &lhs, const QGeoAreaMonitorInfo &rhs) |
Returns true if all of the lhs object's values are the same as those of rhs object. | |
bool | operator!= (const QGeoAreaMonitorInfo &lhs, const QGeoAreaMonitorInfo &rhs) |
Returns true if any of the lhs object's values are not the same as those of rhs object. | |
QDataStream & | operator<< (QDataStream &ds, const QGeoAreaMonitorInfo &monitor) |
Writes the given monitor to the specified stream. | |
QDataStream & | operator>> (QDataStream &ds, QGeoAreaMonitorInfo &monitor) |
Reads a area monitoring data from the specified stream into the given monitor. | |
Q_POSITIONING_EXPORT size_t | qHash (const QGeoAreaMonitorInfo &key, size_t seed=0) |
Q_POSITIONING_EXPORT char * | QTest::toString (const QGeoAreaMonitorInfo &info) |
QDebug | operator<< (QDebug dbg, const QGeoAreaMonitorInfo &monitor) |
\inmodule QtPositioning
The QGeoAreaMonitorInfo class describes the parameters of an area or region to be monitored for proximity.
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 \l 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 QGeoAreaMonitorInfo object is valid if it has a non-empty name and a valid \l area(). Such objects must be registered with a \l QGeoAreaMonitorSource to 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 each QGeoAreaMonitorInfo instance.
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 QGeoAreaMonitorInfo that \l isPersistent() 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 via \l QGeoAreaMonitorSource::supportedAreaMonitorFeatures().
Definition at line 27 of file qgeoareamonitorinfo.h.
Constructs a QGeoAreaMonitorInfo object with the specified name.
Definition at line 82 of file qgeoareamonitorinfo.cpp.
QGeoAreaMonitorInfo::QGeoAreaMonitorInfo | ( | const QGeoAreaMonitorInfo & | other | ) |
Constructs a QGeoAreaMonitorInfo object as a copy of other.
Definition at line 92 of file qgeoareamonitorinfo.cpp.
|
defaultnoexcept |
Constructs a QGeoAreaMonitorInfo object by moving from other.
Note that a moved-from QGeoAreaMonitorInfo can only be destroyed or assigned to. The effect of calling other functions than the destructor or one of the assignment operators is undefined.
QGeoAreaMonitorInfo::~QGeoAreaMonitorInfo | ( | ) |
Destructor.
Definition at line 111 of file qgeoareamonitorinfo.cpp.
QGeoShape QGeoAreaMonitorInfo::area | ( | ) | const |
Returns the boundaries of the to-be-monitored area.
This area must not be empty.
Definition at line 205 of file qgeoareamonitorinfo.cpp.
void QGeoAreaMonitorInfo::detach | ( | ) |
Definition at line 308 of file qgeoareamonitorinfo.cpp.
QDateTime QGeoAreaMonitorInfo::expiration | ( | ) | const |
Returns the expiry date.
After an active QGeoAreaMonitorInfo has expired the region is no longer monitored and the QGeoAreaMonitorInfo object is removed from the list of \l {QGeoAreaMonitorSource::activeMonitors()}{active monitors}.
If the expiry \l QDateTime is invalid the QGeoAreaMonitorInfo object 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.
Definition at line 234 of file qgeoareamonitorinfo.cpp.
QString QGeoAreaMonitorInfo::identifier | ( | ) | const |
Returns the identifier of the QGeoAreaMonitorInfo object.
The identifier is automatically generated upon construction of a new QGeoAreaMonitorInfo object.
Definition at line 185 of file qgeoareamonitorinfo.cpp.
bool QGeoAreaMonitorInfo::isPersistent | ( | ) | const |
Returns true if the QGeoAreaMonitorInfo is persistent.
The default value for this property is false.
A non-persistent QGeoAreaMonitorInfo will 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 QGeoAreaMonitorInfo the relevant application will be re-started and the appropriate signal emitted.
Definition at line 261 of file qgeoareamonitorinfo.cpp.
bool QGeoAreaMonitorInfo::isValid | ( | ) | const |
Returns true, if the monitor is valid.
A valid QGeoAreaMonitorInfo has a non-empty name() and the monitored area is not \l {QGeoShape::isEmpty()}{empty()}. Otherwise this function returns false.
Definition at line 195 of file qgeoareamonitorinfo.cpp.
QString QGeoAreaMonitorInfo::name | ( | ) | const |
Returns the name of the QGeoAreaMonitorInfo object.
The name should be used for user-visibility purposes.
Definition at line 163 of file qgeoareamonitorinfo.cpp.
QVariantMap QGeoAreaMonitorInfo::notificationParameters | ( | ) | const |
Returns the set of platform specific parameters used by this QGeoAreaMonitorInfo.
Definition at line 289 of file qgeoareamonitorinfo.cpp.
QGeoAreaMonitorInfo & QGeoAreaMonitorInfo::operator= | ( | const QGeoAreaMonitorInfo & | other | ) |
Assigns other to this QGeoAreaMonitorInfo object and returns a reference to this QGeoAreaMonitorInfo object.
Move-assigns other to this QGeoAreaMonitorInfo object and returns a reference to this QGeoAreaMonitorInfo object.
Note that a moved-from QGeoAreaMonitorInfo can only be destroyed or assigned to. The effect of calling other functions than the destructor or one of the assignment operators is undefined.
Definition at line 121 of file qgeoareamonitorinfo.cpp.
Sets the to-be-monitored area to newShape.
Definition at line 215 of file qgeoareamonitorinfo.cpp.
Sets the expiry date and time to expiry.
Definition at line 242 of file qgeoareamonitorinfo.cpp.
Sets the user visibile name.
Definition at line 171 of file qgeoareamonitorinfo.cpp.
void QGeoAreaMonitorInfo::setNotificationParameters | ( | const QVariantMap & | parameters | ) |
Sets the set of platform specific parameters used by QGeoAreaMonitorInfo.
Definition at line 299 of file qgeoareamonitorinfo.cpp.
void QGeoAreaMonitorInfo::setPersistent | ( | bool | isPersistent | ) |
Sets the QGeoAreaMonitorInfo object's persistence to isPersistent.
Note that setting this flag does not imply that \l QGeoAreaMonitorSource supports persistent monitoring. \l QGeoAreaMonitorSource::supportedAreaMonitorFeatures() can be used to check for this feature's availability.
Definition at line 276 of file qgeoareamonitorinfo.cpp.
|
inlinenoexcept |
Definition at line 38 of file qgeoareamonitorinfo.h.
|
friend |
Returns true
if any of the lhs object's values are not the same as those of rhs object.
Otherwise returns false
.
Definition at line 44 of file qgeoareamonitorinfo.h.
|
friend |
Writes the given monitor to the specified stream.
Definition at line 75 of file qgeoareamonitorinfo.h.
|
friend |
Definition at line 89 of file qgeoareamonitorinfo.h.
|
friend |
Returns true
if all of the lhs object's values are the same as those of rhs object.
Otherwise returns false
.
Definition at line 40 of file qgeoareamonitorinfo.h.
|
friend |
Reads a area monitoring data from the specified stream into the given monitor.
Definition at line 79 of file qgeoareamonitorinfo.h.
|
friend |
Definition at line 72 of file qgeoareamonitorinfo.h.
|
friend |
Definition at line 394 of file qgeoareamonitorinfo.cpp.
|
friend |