![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtLocation More...
#include <qplacematchrequest.h>
Public Member Functions | |
QPlaceMatchRequest () | |
Default constructor. | |
QPlaceMatchRequest (const QPlaceMatchRequest &other) noexcept | |
Constructs a copy of other. | |
QPlaceMatchRequest (QPlaceMatchRequest &&other) noexcept=default | |
~QPlaceMatchRequest () | |
Destroys the request object. | |
QPlaceMatchRequest & | operator= (const QPlaceMatchRequest &other) noexcept |
Assigns other to this search request and returns a reference to this match request. | |
void | swap (QPlaceMatchRequest &other) noexcept |
QList< QPlace > | places () const |
Returns a list of places which are to be matched. | |
void | setPlaces (const QList< QPlace > &places) |
Sets a list of places which are to be matched. | |
void | setResults (const QList< QPlaceSearchResult > &results) |
Convenience function which uses a set of search results to set the places which should be matched. | |
QVariantMap | parameters () const |
Returns the parameters for matching places. | |
void | setParameters (const QVariantMap ¶meters) |
Sets the parameters for matching places. | |
void | clear () |
Clears the match request. | |
Static Public Attributes | |
static const QString | AlternativeId |
\variable QPlaceMatchRequest::AlternativeId The key to specify that matching is to be accomplished via an alternative place identifier. | |
Friends | |
bool | operator== (const QPlaceMatchRequest &lhs, const QPlaceMatchRequest &rhs) noexcept |
Returns true if lhs is equal to rhs, otherwise returns false. | |
bool | operator!= (const QPlaceMatchRequest &lhs, const QPlaceMatchRequest &rhs) noexcept |
Returns true if lhs is not equal to rhs, otherwise returns false. | |
\inmodule QtLocation
The QPlaceMatchRequest class is used to find places from one manager that match those from another. It represents a set of request parameters.
Places from another manager that may have corresponding/matching places in the current manager are assigned using setPlaces() or setResults(). A set of further parameters are specified which determines the criteria for matching.
The typical key for matching is the QPlaceMatchRequest::AlternativeId, the value is an alternative identifier attribute type of the format x_id_<provider name> for example x_id_here. The provider name is name supplied to the QGeoServiceProvider instance.
See \l {Matching places between managers} for an example on how to use a match request.
Definition at line 17 of file qplacematchrequest.h.
QPlaceMatchRequest::QPlaceMatchRequest | ( | ) |
Default constructor.
Constructs a new request object.
Definition at line 68 of file qplacematchrequest.cpp.
|
defaultnoexcept |
Constructs a copy of other.
|
defaultnoexcept |
|
default |
Destroys the request object.
void QPlaceMatchRequest::clear | ( | ) |
|
noexcept |
Assigns other to this search request and returns a reference to this match request.
Definition at line 87 of file qplacematchrequest.cpp.
References other().
QVariantMap QPlaceMatchRequest::parameters | ( | ) | const |
Returns the parameters for matching places.
Definition at line 158 of file qplacematchrequest.cpp.
References d.
Referenced by setParameters().
Returns a list of places which are to be matched.
Definition at line 118 of file qplacematchrequest.cpp.
References d.
Referenced by setPlaces(), and setResults().
void QPlaceMatchRequest::setParameters | ( | const QVariantMap & | parameters | ) |
Sets the parameters for matching places.
Definition at line 167 of file qplacematchrequest.cpp.
References d, and parameters().
Sets a list of places which are to be matched.
Definition at line 129 of file qplacematchrequest.cpp.
void QPlaceMatchRequest::setResults | ( | const QList< QPlaceSearchResult > & | results | ) |
Convenience function which uses a set of search results to set the places which should be matched.
Definition at line 141 of file qplacematchrequest.cpp.
References QList< T >::append(), d, QPlaceResult::place(), QPlaceSearchResult::PlaceResult, places(), and results.
|
inlinenoexcept |
Definition at line 30 of file qplacematchrequest.h.
References other().
|
friend |
Returns true if lhs is not equal to rhs, otherwise returns false.
Definition at line 34 of file qplacematchrequest.h.
|
friend |
Returns true if lhs is equal to rhs, otherwise returns false.
Definition at line 32 of file qplacematchrequest.h.
|
static |
\variable QPlaceMatchRequest::AlternativeId The key to specify that matching is to be accomplished via an alternative place identifier.
Definition at line 20 of file qplacematchrequest.h.
Referenced by RequestHandler::matchPlaces(), and QDeclarativeSearchResultModel::queryFinished().