QPlaceIdReply Class
QPlaceIdReply 类管理返回标识符的操作,如保存和删除地点和类别的操作。更多
Header: | #include <QPlaceIdReply> |
qmake: | QT += location |
Inherits: | QPlaceReply |
公共类型
enum | OperationType { SavePlace, RemovePlace, SaveCategory, RemoveCategory } |
公共函数
QPlaceIdReply(QPlaceIdReply::OperationType operationType, QObject *parent = nullptr) | |
virtual | ~QPlaceIdReply() |
QString | id() const |
QPlaceIdReply::OperationType | operationType() const |
重新实现的公共函数
virtual QPlaceReply::Type | type() const override |
受保护函数
void | setId(const QString &identifier) |
详细说明
QPlaceIdReply 可被视为多用途回复,因为它可用于保存地点、保存类别、移除地点和移除类别。在每种情况下,它都会返回已添加、修改或删除的地点或类别的标识符。
有关如何使用标识符回复的示例,请参阅保存地点。
另请参阅 QPlaceManager 。
成员类型文档
enum QPlaceIdReply::OperationType
定义生成此回复的操作类型。
常数 | 值 | 说明 |
---|---|---|
QPlaceIdReply::SavePlace | 0 | 该回复是为保存位置操作创建的 |
QPlaceIdReply::RemovePlace | 2 | 该回复是为移除位置操作创建的。 |
QPlaceIdReply::SaveCategory | 1 | 为保存类别操作创建了回复 |
QPlaceIdReply::RemoveCategory | 3 | 回复是为移除类别操作创建的。 |
成员函数文档
[explicit]
QPlaceIdReply::QPlaceIdReply(QPlaceIdReply::OperationType operationType, QObject *parent = nullptr)
构造一个回复,其中包含所操作对象的标识符。回复是针对给定的operationType 和parent 。
[virtual noexcept]
QPlaceIdReply::~QPlaceIdReply()
销毁回复。
QString QPlaceIdReply::id() const
返回操作的相关标识符。例如,对于保存位置操作,标识符是保存位置的标识符。对于移除类别操作,则是被移除类别的标识符。
另请参阅 setId()。
QPlaceIdReply::OperationType QPlaceIdReply::operationType() const
返回回复的操作类型。这意味着该标识符回复是否用于保存位置操作、删除类别操作等。
[protected]
void QPlaceIdReply::setId(const QString &identifier)
设置回复的identifier 。
另请参阅 id().
[override virtual]
QPlaceReply::Type QPlaceIdReply::type() const
重实现:QPlaceReply::type() 常量。
返回回复的类型。
© 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.