QPlaceMatchRequest Class
QPlaceMatchRequest 类用于从一个管理器中查找与另一个管理器相匹配的位置。它表示一组请求参数。更多
Header: | #include <QPlaceMatchRequest> |
qmake: | QT += location |
公共函数
QPlaceMatchRequest() | |
QPlaceMatchRequest(const QPlaceMatchRequest &other) | |
~QPlaceMatchRequest() | |
void | clear() |
QVariantMap | parameters() const |
QList<QPlace> | places() const |
void | setParameters(const QVariantMap ¶meters) |
void | setPlaces(const QList<QPlace> &places) |
void | setResults(const QList<QPlaceSearchResult> &results) |
QPlaceMatchRequest & | operator=(const QPlaceMatchRequest &other) |
静态公共成员
const QString | AlternativeId |
相关非成员
bool | operator!=(const QPlaceMatchRequest &lhs, const QPlaceMatchRequest &rhs) |
bool | operator==(const QPlaceMatchRequest &lhs, const QPlaceMatchRequest &rhs) |
详细说明
使用setPlaces() 或setResults() 分配当前管理器中可能有对应/匹配位置的其他管理器中的位置。还指定了一组参数,用于确定匹配的标准。
典型的匹配键是QPlaceMatchRequest::AlternativeId ,值是格式为 x_id_<provider name> 的替代标识符属性类型,例如 x_id_here。提供者名称是提供给QGeoServiceProvider 实例的名称。
另请参阅 QPlaceMatchReply 和QPlaceManager 。
成员函数文档
QPlaceMatchRequest::QPlaceMatchRequest()
默认构造函数。构造一个新的请求对象。
[noexcept]
QPlaceMatchRequest::QPlaceMatchRequest(const QPlaceMatchRequest &other)
构造other 的副本。
[noexcept]
QPlaceMatchRequest::~QPlaceMatchRequest()
销毁请求对象。
void QPlaceMatchRequest::clear()
清除匹配请求。
QVariantMap QPlaceMatchRequest::parameters() const
返回匹配位置的参数。
另请参见 setParameters()。
QList<QPlace> QPlaceMatchRequest::places() const
返回要匹配的地点列表。
另请参阅 setPlaces()。
void QPlaceMatchRequest::setParameters(const QVariantMap ¶meters)
设置匹配位置的parameters 。
另请参见 parameters()。
void QPlaceMatchRequest::setPlaces(const QList<QPlace> &places)
设置要匹配的places 列表。
另请参阅 places() 和setResults()。
void QPlaceMatchRequest::setResults(const QList<QPlaceSearchResult> &results)
方便函数,使用一组搜索results 来设置应匹配的位置。
另请参见 setPlaces()。
[noexcept]
QPlaceMatchRequest &QPlaceMatchRequest::operator=(const QPlaceMatchRequest &other)
为该搜索请求指定other ,并返回对该匹配请求的引用。
相关非成员
[noexcept]
bool operator!=(const QPlaceMatchRequest &lhs, const QPlaceMatchRequest &rhs)
如果lhs 不等于rhs ,则返回 true,否则返回 false。
[noexcept]
bool operator==(const QPlaceMatchRequest &lhs, const QPlaceMatchRequest &rhs)
如果lhs 等于rhs ,则返回 true,否则返回 false。
© 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.