Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QPlaceContentRequest Class

The QPlaceContentRequest class represents the parameters of a content request. More...

 #include <QPlaceContentRequest>

This class was introduced in Qt Location 5.0.

Public Functions

QPlaceContentRequest()
QPlaceContentRequest(const QPlaceContentRequest & other)
~QPlaceContentRequest()
void clear()
QPlaceContent::Type contentType() const
int limit() const
int offset() const
void setContentType(QPlaceContent::Type type)
void setLimit(int limit)
void setOffset(int offset)
bool operator!=(const QPlaceContentRequest & other) const
QPlaceContentRequest & operator=(const QPlaceContentRequest & other)
bool operator==(const QPlaceContentRequest & other) const

Detailed Description

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:

 QPlaceContentRequest request;
 request.setContentType(QPlaceContent::ImageType);
 request.setOffset(9);
 request.setLimit(5);

 QPlaceContentReply *contentReply = manager->getPlaceContent(place.placeId(), request);
 //..connect signals..//
     ...
     ...
 void contentHandler() {
     if (contentReply->error() == QPlaceReply::NoError)  {
         place.insertContent(contentReply->request().contentType(),
                             contentReply->content());
     }
 }

See also QPlaceContentReply.

Member Function Documentation

QPlaceContentRequest::QPlaceContentRequest()

Constructs a new request object.

QPlaceContentRequest::QPlaceContentRequest(const QPlaceContentRequest & other)

Constructs a copy of other.

QPlaceContentRequest::~QPlaceContentRequest()

Destroys the request object

void QPlaceContentRequest::clear()

Clears the content request.

QPlaceContent::Type QPlaceContentRequest::contentType() const

Returns the type of content to be requested, for example reviews or images

See also setContentType().

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.

See also setLimit().

int QPlaceContentRequest::offset() const

Returns the offset index of the first item that is to be retrieved.

The default offset is 0.

See also setOffset().

void QPlaceContentRequest::setContentType(QPlaceContent::Type type)

Sets the type of content to be requested.

See also contentType().

void QPlaceContentRequest::setLimit(int limit)

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

See also limit().

void QPlaceContentRequest::setOffset(int offset)

Sets the starting index of the first item to be retrieved to offset.

See also offset().

bool QPlaceContentRequest::operator!=(const QPlaceContentRequest & other) const

Returns true if other is not equal to this content request, otherwise returns false.

QPlaceContentRequest & QPlaceContentRequest::operator=(const QPlaceContentRequest & other)

Assigns other to this content request and returns a reference to this content request.

bool QPlaceContentRequest::operator==(const QPlaceContentRequest & other) const

Returns true if other is equal to this content request, otherwise returns false.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web