本页内容

QPlaceContentReply Class

QPlaceContentReply 类负责管理由QPlaceManager 的实例启动的内容检索操作。更多内容...

Header: #include <QPlaceContentReply>
qmake: QT += location
Inherits: QPlaceReply

公共函数

QPlaceContentReply(QObject *parent = nullptr)
virtual ~QPlaceContentReply()
QPlaceContent::Collection content() const
QPlaceContentRequest nextPageRequest() const
QPlaceContentRequest previousPageRequest() const
QPlaceContentRequest request() const
int totalCount() const

重新实现的公共函数

virtual QPlaceReply::Type type() const override

受保护函数

void setContent(const QPlaceContent::Collection &content)
void setNextPageRequest(const QPlaceContentRequest &next)
void setPreviousPageRequest(const QPlaceContentRequest &previous)
void setRequest(const QPlaceContentRequest &request)
void setTotalCount(int total)

详细说明

有关如何使用内容回复的示例,请参阅“获取富内容”。

另请参阅 QPlaceContentRequest 和QPlaceManager 。

成员函数文档

[explicit] QPlaceContentReply::QPlaceContentReply(QObject *parent = nullptr)

根据给定的parent 构建内容回复。

[virtual noexcept] QPlaceContentReply::~QPlaceContentReply()

销毁该回复。

QPlaceContent::Collection QPlaceContentReply::content() const

返回检索到的内容集合。

另请参阅 setContent()。

QPlaceContentRequest QPlaceContentReply::nextPageRequest() const

返回一个位置内容请求,可用于请求下一批位置内容结果。

另请参阅 setNextPageRequest()。

QPlaceContentRequest QPlaceContentReply::previousPageRequest() const

返回一个位置内容请求,可用于请求上一批位置内容结果。

另请参阅 setPreviousPageRequest()。

QPlaceContentRequest QPlaceContentReply::request() const

返回用于生成此响应的内容请求。

另请参阅 setRequest()。

[protected] void QPlaceContentReply::setContent(const QPlaceContent::Collection &content)

设置响应的content 。

另请参阅 content()。

[protected] void QPlaceContentReply::setNextPageRequest(const QPlaceContentRequest &next)

将用于向next 请求下一批地点内容结果的地点内容请求设置为。

另请参阅 nextPageRequest()。

[protected] void QPlaceContentReply::setPreviousPageRequest(const QPlaceContentRequest &previous)

将用于向previous 请求上一批地点内容结果的地点内容请求设置为。

另请参阅 previousPageRequest()。

[protected] void QPlaceContentReply::setRequest(const QPlaceContentRequest &request)

设置用于生成此回复的request 内容。

另请参阅 request()。

[protected] void QPlaceContentReply::setTotalCount(int total)

设置某个位置的内容对象数量(total )。

另请参阅 totalCount()。

int QPlaceContentReply::totalCount() const

返回某个位置的内容对象总数。如果无法统计内容对象的总数,则返回 -1。该计数仅指单一内容类型的总数,即在通过QPlaceManager 请求内容时所指定的内容类型。

另请参阅 setTotalCount()。

[override virtual] QPlaceReply::Type QPlaceContentReply::type() const

重新实现了:QPlaceReply::type() const。

返回回复的类型。

© 2026 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.