Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QPlaceContentRequest Class Reference

\inmodule QtLocation More...

#include <qplacecontentrequest.h>

+ Collaboration diagram for QPlaceContentRequest:

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.
 
QPlaceContentRequestoperator= (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.
 

Detailed Description

\inmodule QtLocation

Since
5.6

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

See also
QPlaceContentReply

Definition at line 16 of file qplacecontentrequest.h.

Constructor & Destructor Documentation

◆ QPlaceContentRequest() [1/3]

QPlaceContentRequest::QPlaceContentRequest ( )

Constructs a new request object.

Definition at line 48 of file qplacecontentrequest.cpp.

◆ QPlaceContentRequest() [2/3]

QPlaceContentRequest::QPlaceContentRequest ( const QPlaceContentRequest & other)
defaultnoexcept

Constructs a copy of other.

◆ QPlaceContentRequest() [3/3]

QPlaceContentRequest::QPlaceContentRequest ( QPlaceContentRequest && other)
defaultnoexcept

◆ ~QPlaceContentRequest()

QPlaceContentRequest::~QPlaceContentRequest ( )
default

Destroys the request object.

Member Function Documentation

◆ clear()

void QPlaceContentRequest::clear ( )

Clears the content request.

Definition at line 185 of file qplacecontentrequest.cpp.

References d.

Referenced by QDeclarativePlaceContentModel::clearData().

+ Here is the caller graph for this function:

◆ contentContext()

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.

◆ contentType()

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().

+ Here is the caller graph for this function:

◆ limit()

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().

+ Here is the caller graph for this function:

◆ operator=()

QPlaceContentRequest & QPlaceContentRequest::operator= ( const QPlaceContentRequest & other)
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().

+ Here is the call graph for this function:

◆ placeId()

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.

◆ setContentContext()

void QPlaceContentRequest::setContentContext ( const QVariant & context)

Sets the content context to context.

Note
This method is intended to be used by geo service plugins when returning place content results.

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.

References context, and d.

Referenced by parseCollection().

+ Here is the caller graph for this function:

◆ setContentType()

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().

+ Here is the caller graph for this function:

◆ setLimit()

void QPlaceContentRequest::setLimit ( int limit)

Set the maximum number of content items to retrieve to limit.

Definition at line 176 of file qplacecontentrequest.cpp.

References d, and limit().

+ Here is the call graph for this function:

◆ setPlaceId()

void QPlaceContentRequest::setPlaceId ( const QString & identifier)

Sets the identifier of the place to fetch content for to identifier.

Definition at line 122 of file qplacecontentrequest.cpp.

References d.

◆ swap()

void QPlaceContentRequest::swap ( QPlaceContentRequest & other)
inlinenoexcept

Definition at line 27 of file qplacecontentrequest.h.

References other().

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ operator!=

bool QPlaceContentRequest::operator!= ( const QPlaceContentRequest & lhs,
const QPlaceContentRequest & rhs )
friend

Returns true if lhs is not equal to rhs, otherwise returns false.

Definition at line 32 of file qplacecontentrequest.h.

◆ operator==

bool QPlaceContentRequest::operator== ( const QPlaceContentRequest & lhs,
const QPlaceContentRequest & rhs )
friend

Returns true if lhs is equal to rhs, otherwise returns false.

Definition at line 29 of file qplacecontentrequest.h.


The documentation for this class was generated from the following files: