Qt Mobility Reference Documentation

QGalleryAbstractResponse Class Reference

The QGalleryAbstractResponse class provides a base class for responses to gallery requests. More...

 #include <QGalleryAbstractResponse>

Inherited by QGalleryResultSet.


Public Functions

QGalleryAbstractResponse ( int error, const QString & errorString = QString(), QObject * parent = 0 )
~QGalleryAbstractResponse ()
virtual void cancel ()
int error () const
QString errorString () const
bool isActive () const
bool isIdle () const
virtual bool waitForFinished ( int msecs )

Signals

void cancelled ()
void finished ()
void progressChanged ( int current, int maximum )
void resumed ()

Protected Functions

QGalleryAbstractResponse ( QObject * parent = 0 )
void error ( int error, const QString & errorString = QString() )
void finish ( bool idle = false )
void resume ()

Detailed Description

The QGalleryAbstractResponse class provides a base class for responses to gallery requests.


Member Function Documentation

QGalleryAbstractResponse::QGalleryAbstractResponse ( int error, const QString & errorString = QString(), QObject * parent = 0 )

Constructs a new gallery response, for a request that has finished with an error. The optional errorString will describe the error in greater detail.

The parent is passed to QObject.

QGalleryAbstractResponse::QGalleryAbstractResponse ( QObject * parent = 0 ) [protected]

Constructs a new gallery response.

The parent is passed to QObject.

QGalleryAbstractResponse::~QGalleryAbstractResponse ()

Destroys a gallery response.

void QGalleryAbstractResponse::cancel () [virtual]

Cancels an active or idle gallery response.

The default implementation finishes the an active response with the QGalleryAbstractRequest::Cancelled result. If the reponse is idle the finished() signal will be re-emitted with idle

void QGalleryAbstractResponse::cancelled () [signal]

Signals that a response was cancelled.

int QGalleryAbstractResponse::error () const

Returns an identifier describing an error condition encountered by a response.

In the case of no error this will return QGalleryAbstractRequest::NoError.

See also QGalleryAbstractRequest::Error and QDocumentGallery::Error.

void QGalleryAbstractResponse::error ( int error, const QString & errorString = QString() ) [protected]

Finalizes a response in response to an error condition.

The error, and errorString are communicated to issuing request.

QString QGalleryAbstractResponse::errorString () const

Returns a string describing the cause of an error() in more detail.

void QGalleryAbstractResponse::finish ( bool idle = false ) [protected]

Finalizes a gallery response.

If idle is true the items returned by a response will be monitored for changes and updated as appropriate.

void QGalleryAbstractResponse::finished () [signal]

Signals that a response has finished.

bool QGalleryAbstractResponse::isActive () const

Identifies if a response is an an active state.

Returns true if a response is active, and false otherwise.

bool QGalleryAbstractResponse::isIdle () const

Identifies if the items returned by a response are being monitored for changes.

Returns true if a response is in an idle state, and false otherwise.

void QGalleryAbstractResponse::progressChanged ( int current, int maximum ) [signal]

Signals that the current or maximum progress of a request has changed.

void QGalleryAbstractResponse::resume () [protected]

Returns a response to an active state.

An idle response can call this to indicate it has begun refreshing its contents.

void QGalleryAbstractResponse::resumed () [signal]

Signals that an idle() response has resumed communications.

bool QGalleryAbstractResponse::waitForFinished ( int msecs ) [virtual]

Waits for msecs for the a response to finish.

Returns true if the response has finished on return, and returns false if the wait time expires or the request is inactive or idle.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.