QPlaceIdReply Class

The QPlaceIdReply class manages operations which return an identifier such as saving and removal operations of places and categories. 更多...

頭: #include <QPlaceIdReply>
qmake: QT += location
Since: Qt 5.6
繼承: QPlaceReply

公共類型

enum OperationType { SavePlace, RemovePlace, SaveCategory, RemoveCategory }

公共函數

QPlaceIdReply (OperationType operationType , QObject * parent = Q_NULLPTR)
virtual ~QPlaceIdReply ()
QString id () const
OperationType operationType () const

重實現公共函數

virtual QPlaceReply::Type type () const

保護函數

void setId (const QString & identifier )

額外繼承成員

詳細描述

The QPlaceIdReply class manages operations which return an identifier such as saving and removal operations of places and categories.

The QPlaceIdReply can be considered a multipurpose reply in that it can be used to save places, save categories, remove places and remove categories. In each case it returns an identifier of the place or category that was added, modified or removed.

Saving a place for an example of how to use an identifier reply.

另請參閱 QPlaceManager .

成員類型文檔編製

enum QPlaceIdReply:: OperationType

Defines the type of operation that was used to generate this reply.

常量 描述
QPlaceIdReply::SavePlace 0 The reply was created for a save place operation
QPlaceIdReply::RemovePlace 2 The reply was created for a remove place operation.
QPlaceIdReply::SaveCategory 1 The reply was created for a save category operation
QPlaceIdReply::RemoveCategory 3 The reply was created for a remove category operation.

成員函數文檔編製

QPlaceIdReply:: QPlaceIdReply ( OperationType operationType , QObject * parent = Q_NULLPTR)

Constructs a reply which contains the identifier of the object operated upon. The reply is for the given operationType 和采用 parent .

[虛擬] QPlaceIdReply:: ~QPlaceIdReply ()

Destroys the reply.

QString QPlaceIdReply:: id () const

Returns the relevant identifier for the operation. For example for a save place operation, the identifier is that of the saved place. For a category removal operation, it is the identifier of the category that was removed.

另請參閱 setId ().

OperationType QPlaceIdReply:: operationType () const

Returns the operation type of the reply. This means whether this identifier reply was for a save place operation, remove category operation and so on.

[protected] void QPlaceIdReply:: setId (const QString & identifier )

設置 identifier of the reply.

另請參閱 id ().

[虛擬] QPlaceReply::Type QPlaceIdReply:: type () const

重實現自 QPlaceReply::type ().

Returns the type of reply.