![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtLocation More...
#include <qplacecontentrequest.h>
Public Member Functions | |
QPlaceContentRequest () | |
Constructs a new request object. | |
QPlaceContentRequest (const QPlaceContentRequest &other) noexcept | |
Constructs a copy of other. | |
QPlaceContentRequest (QPlaceContentRequest &&other) noexcept=default | |
~QPlaceContentRequest () | |
Destroys the request object. | |
QPlaceContentRequest & | operator= (const QPlaceContentRequest &other) noexcept |
Assigns other to this content request and returns a reference to this content request. | |
void | swap (QPlaceContentRequest &other) noexcept |
QPlaceContent::Type | contentType () const |
Returns the type of content to be requested, for example reviews or images. | |
void | setContentType (QPlaceContent::Type type) |
Sets the type of content to be requested. | |
QString | placeId () const |
Returns the identifier of the place content is to be fetched for. | |
void | setPlaceId (const QString &identifier) |
Sets the identifier of the place to fetch content for to identifier. | |
QVariant | contentContext () const |
Returns backend specific additional content context associated with this place content request. | |
void | setContentContext (const QVariant &context) |
Sets the content context to context. | |
int | limit () const |
Returns the maximum number of content items to retrieve. | |
void | setLimit (int limit) |
Set the maximum number of content items to retrieve to limit. | |
void | clear () |
Clears the content request. | |
Friends | |
bool | operator== (const QPlaceContentRequest &lhs, const QPlaceContentRequest &rhs) noexcept |
Returns true if lhs is equal to rhs, otherwise returns false. | |
bool | operator!= (const QPlaceContentRequest &lhs, const QPlaceContentRequest &rhs) noexcept |
Returns true if lhs is not equal to rhs, otherwise returns false. | |
\inmodule QtLocation
The QPlaceContentRequest class represents the parameters of a content request.
The QPlaceContentRequest class is used in conjunction with a QPlaceManager to retrieve rich content like images and reviews in a paginated fashion. The following code would request a set of 5 images from the 10th index:
\dots \dots
Definition at line 16 of file qplacecontentrequest.h.
QPlaceContentRequest::QPlaceContentRequest | ( | ) |
Constructs a new request object.
Definition at line 48 of file qplacecontentrequest.cpp.
|
defaultnoexcept |
Constructs a copy of other.
|
defaultnoexcept |
|
default |
Destroys the request object.
void QPlaceContentRequest::clear | ( | ) |
Clears the content request.
Definition at line 185 of file qplacecontentrequest.cpp.
References d.
Referenced by QDeclarativePlaceContentModel::clearData().
QVariant QPlaceContentRequest::contentContext | ( | ) | const |
Returns backend specific additional content context associated with this place content request.
Definition at line 131 of file qplacecontentrequest.cpp.
References d.
QPlaceContent::Type QPlaceContentRequest::contentType | ( | ) | const |
Returns the type of content to be requested, for example reviews or images.
Definition at line 95 of file qplacecontentrequest.cpp.
References d.
Referenced by RequestHandler::contentHandler(), and RequestHandler::handleImagesReply().
int QPlaceContentRequest::limit | ( | ) | const |
Returns the maximum number of content items to retrieve.
A negative value for limit means that it is undefined. It is left up to the backend provider to choose an appropriate number of items to return.
The default limit is -1.
Definition at line 166 of file qplacecontentrequest.cpp.
References d.
Referenced by setLimit().
|
noexcept |
Assigns other to this content request and returns a reference to this content request.
Definition at line 67 of file qplacecontentrequest.cpp.
References other().
QString QPlaceContentRequest::placeId | ( | ) | const |
Returns the identifier of the place content is to be fetched for.
Definition at line 113 of file qplacecontentrequest.cpp.
References d.
Sets the content context to context.
The content context is used by backends to store additional content context related to the content request. Other relevant fields should also be filled in. For example, if the content request is for image content the content type should also be set with \l setContentType(). The content context allows additional context to be kept which is not directly accessible via the Qt Location API.
The content context can be of any type storable in a QVariant. The value of the content context is not intended to be used directly by applications.
Definition at line 152 of file qplacecontentrequest.cpp.
Referenced by parseCollection().
void QPlaceContentRequest::setContentType | ( | QPlaceContent::Type | type | ) |
Sets the type of content to be requested.
Definition at line 104 of file qplacecontentrequest.cpp.
References d.
Referenced by parseCollection().
void QPlaceContentRequest::setLimit | ( | int | limit | ) |
Set the maximum number of content items to retrieve to limit.
Definition at line 176 of file qplacecontentrequest.cpp.
Sets the identifier of the place to fetch content for to identifier.
Definition at line 122 of file qplacecontentrequest.cpp.
References d.
|
inlinenoexcept |
Definition at line 27 of file qplacecontentrequest.h.
References other().
|
friend |
Returns true if lhs is not equal to rhs, otherwise returns false.
Definition at line 32 of file qplacecontentrequest.h.
|
friend |
Returns true if lhs is equal to rhs, otherwise returns false.
Definition at line 29 of file qplacecontentrequest.h.