Qt Mobility Reference Documentation

QGalleryAbstractRequest Class Reference

The QGalleryAbstractRequest class provides a base class for gallery requests. More...

 #include <QGalleryAbstractRequest>

Inherited by QGalleryCountRequest, QGalleryItemRequest, QGalleryQueryRequest, QGalleryRemoveRequest, and QGalleryUrlRequest.


Public Types

enum Result { NoResult, Succeeded, Cancelled, NoGallery, ..., RequestError }
enum Scope { AllDescendants, DirectDescendants }
enum State { Inactive, Active, Cancelling, Idle }
enum Type { Item, Url, Query, Count, Remove }

Properties


Public Functions

QGalleryAbstractRequest ( Type type, QObject * parent = 0 )
QGalleryAbstractRequest ( QAbstractGallery * gallery, Type type, QObject * parent = 0 )
~QGalleryAbstractRequest ()
int currentProgress () const
QAbstractGallery * gallery () const
bool isSupported () const
int maximumProgress () const
int result () const
void setGallery ( QAbstractGallery * gallery )
State state () const
Type type () const
bool waitForFinished ( int msecs )

Public Slots

void cancel ()
void clear ()
void execute ()

Signals

void cancelled ()
void failed ( int result )
void finished ( int result )
void progressChanged ( int current, int maximum )
void resultChanged ()
void stateChanged ( QGalleryAbstractRequest::State state )
void succeeded ()
void supportedChanged ()

Protected Functions

virtual void setResponse ( QGalleryAbstractResponse * response ) = 0

Detailed Description

The QGalleryAbstractRequest class provides a base class for gallery requests.


Member Type Documentation

enum QGalleryAbstractRequest::Result

Identifies the result of a gallery request.

ConstantValueDescription
QGalleryAbstractRequest::NoResult0The request is still active and no result is available yet.
QGalleryAbstractRequest::Succeeded1The request succeeded sucessfully.
QGalleryAbstractRequest::Cancelled2The request was cancelled before it could finish.
QGalleryAbstractRequest::NoGallery3The request cannot be executed because no gallery is set.
QGalleryAbstractRequest::NotSupported4The request isn't supported by the gallery.
QGalleryAbstractRequest::ConnectionError5The request could not be executed due to a problem connecting to the gallery.
QGalleryAbstractRequest::InvalidItemError6The request could not be executed due to an invalid item ID.
QGalleryAbstractRequest::ItemTypeError7The request could not be executed due to an invalid item type.
QGalleryAbstractRequest::InvalidPropertyError8The request could not be executed because a filter referenced an invalid property.
QGalleryAbstractRequest::PropertyTypeError9The request could not be executed because a filter compared a property to an invalid variant type.
QGalleryAbstractRequest::UnsupportedFilterTypeError10The request could not be executed because a filter is not supported by the gallery.
QGalleryAbstractRequest::UnsupportedFilterOptionError11The request could not be executed because an option on a filter is not supported by the gallery.
QGalleryAbstractRequest::PermissionsError12The request could not be executed because the user has insufficient permissions.
QGalleryAbstractRequest::InvalidDestinationError13The request could not be executed because the given destination ID is invalid.
QGalleryAbstractRequest::InvalidUrlError14The request could not be executed due to an invalid URL.
QGalleryAbstractRequest::RequestError100A minimum value for request specific error results.

enum QGalleryAbstractRequest::Scope

Identifies the scope of query.

ConstantValueDescription
QGalleryAbstractRequest::AllDescendants0The query will return all descendents of the scope item.
QGalleryAbstractRequest::DirectDescendants1The query will return only direct descendents of the scope item.

enum QGalleryAbstractRequest::State

Identifies the state of a gallery request.

ConstantValueDescription
QGalleryAbstractRequest::Inactive0The request has not been executed, or has finished.
QGalleryAbstractRequest::Active1The request is currently executing.
QGalleryAbstractRequest::Cancelling2The request was cancelled, but hasn't yet returned to the Inactive state.
QGalleryAbstractRequest::Idle3The request has finished, and is monitoring its return values for changes.

enum QGalleryAbstractRequest::Type

Identifies the type of a request.

ConstantValueDescription
QGalleryAbstractRequest::Item0The request is a QGalleryItemRequest.
QGalleryAbstractRequest::Url1The request is a QGalleryUrlRequest.
QGalleryAbstractRequest::Query2The request is a QGalleryQueryRequest.
QGalleryAbstractRequest::Count3The request is a QGalleryCountRequest.
QGalleryAbstractRequest::Remove4The request is a QGalleryRemoveRequest.

Property Documentation

currentProgress : const int

This property holds the current progress of a request.

Access functions:

int currentProgress () const

Notifier signal:

void progressChanged ( int current, int maximum )

gallery : QAbstractGallery *

This property holds the gallery service a request acts on.

Access functions:

QAbstractGallery * gallery () const
void setGallery ( QAbstractGallery * gallery )

maximumProgress : const int

This property holds the maximum value of currentProgress.

Access functions:

int maximumProgress () const

Notifier signal:

void progressChanged ( int current, int maximum )

result : const int

This property holds the result of a request.

This will be a value of Result, or a request specific error value.

Access functions:

int result () const

Notifier signal:

void resultChanged ()

state : const State

This property holds the state of a request.

Access functions:

State state () const

Notifier signal:

void stateChanged ( QGalleryAbstractRequest::State state )

supported : const bool

This property holds whether a request is supported by its current gallery.

Access functions:

bool isSupported () const

Notifier signal:

void supportedChanged ()

Member Function Documentation

QGalleryAbstractRequest::QGalleryAbstractRequest ( Type type, QObject * parent = 0 )

Constructs a new gallery type request.

The parent is passed to QObject.

QGalleryAbstractRequest::QGalleryAbstractRequest ( QAbstractGallery * gallery, Type type, QObject * parent = 0 )

Constructs a new type request for the given gallery.

The parent is passed to QObject.

QGalleryAbstractRequest::~QGalleryAbstractRequest ()

Destroys a gallery request.

void QGalleryAbstractRequest::cancel () [slot]

Cancels the execution of a request. If the request is idle this will stop any future updates.

void QGalleryAbstractRequest::cancelled () [signal]

Signals that a request was cancelled before it could finish.

void QGalleryAbstractRequest::clear () [slot]

Clears the results of a request.

If the request is active or idle it will be cancelled.

void QGalleryAbstractRequest::execute () [slot]

Executes a request.

Note: A valid gallery must be set before a request can be executed.

void QGalleryAbstractRequest::failed ( int result ) [signal]

Signals that a request failed with the given result.

void QGalleryAbstractRequest::finished ( int result ) [signal]

Signals that a request has finished with the given result.

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

Signals that the current or maximum progress value has changed.

void QGalleryAbstractRequest::resultChanged () [signal]

Signals that the result of a request has changed.

void QGalleryAbstractRequest::setResponse ( QGalleryAbstractResponse * response ) [pure virtual protected]

Sets the response to an executed request.

void QGalleryAbstractRequest::stateChanged ( QGalleryAbstractRequest::State state ) [signal]

Signals that the state of a request has changed.

void QGalleryAbstractRequest::succeeded () [signal]

Signals that a request has completed successfully.

void QGalleryAbstractRequest::supportedChanged () [signal]

Signals the supported property has changed.

Type QGalleryAbstractRequest::type () const

Returns the type of a request.

bool QGalleryAbstractRequest::waitForFinished ( int msecs )

Waits for msecs for the a request to finish.

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


Copyright © 2009-2010 Nokia Corporation and/or its subsidiary(-ies) Trademarks
Qt Mobility Project 1.1.0