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
Public Slots
Signals
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.
|
Constant | Value | Description |
QGalleryAbstractRequest::NoResult | 0 | The request is still active and no result is available yet. |
QGalleryAbstractRequest::Succeeded | 1 | The request succeeded sucessfully. |
QGalleryAbstractRequest::Cancelled | 2 | The request was cancelled before it could finish. |
QGalleryAbstractRequest::NoGallery | 3 | The request cannot be executed because no gallery is set. |
QGalleryAbstractRequest::NotSupported | 4 | The request isn't supported by the gallery. |
QGalleryAbstractRequest::ConnectionError | 5 | The request could not be executed due to a problem connecting to the gallery. |
QGalleryAbstractRequest::InvalidItemError | 6 | The request could not be executed due to an invalid item ID. |
QGalleryAbstractRequest::ItemTypeError | 7 | The request could not be executed due to an invalid item type. |
QGalleryAbstractRequest::InvalidPropertyError | 8 | The request could not be executed because a filter referenced an invalid property. |
QGalleryAbstractRequest::PropertyTypeError | 9 | The request could not be executed because a filter compared a property to an invalid variant type. |
QGalleryAbstractRequest::UnsupportedFilterTypeError | 10 | The request could not be executed because a filter is not supported by the gallery. |
QGalleryAbstractRequest::UnsupportedFilterOptionError | 11 | The request could not be executed because an option on a filter is not supported by the gallery. |
QGalleryAbstractRequest::PermissionsError | 12 | The request could not be executed because the user has insufficient permissions. |
QGalleryAbstractRequest::InvalidDestinationError | 13 | The request could not be executed because the given destination ID is invalid. |
QGalleryAbstractRequest::InvalidUrlError | 14 | The request could not be executed due to an invalid URL. |
QGalleryAbstractRequest::RequestError | 100 | A minimum value for request specific error results. |
enum QGalleryAbstractRequest::Scope
Identifies the scope of query.
|
Constant | Value | Description |
QGalleryAbstractRequest::AllDescendants | 0 | The query will return all descendents of the scope item. |
QGalleryAbstractRequest::DirectDescendants | 1 | The query will return only direct descendents of the scope item. |
enum QGalleryAbstractRequest::State
Identifies the state of a gallery request.
|
Constant | Value | Description |
QGalleryAbstractRequest::Inactive | 0 | The request has not been executed, or has finished. |
QGalleryAbstractRequest::Active | 1 | The request is currently executing. |
QGalleryAbstractRequest::Cancelling | 2 | The request was cancelled, but hasn't yet returned to the Inactive state. |
QGalleryAbstractRequest::Idle | 3 | The request has finished, and is monitoring its return values for changes. |
enum QGalleryAbstractRequest::Type
Identifies the type of a request.
Property Documentation
currentProgress : const int
This property holds the current progress of a request.
Access functions:
int | currentProgress () const |
Notifier signal:
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:
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:
Notifier signal:
state : const State
This property holds the state of a request.
Access functions:
Notifier signal:
supported : const bool
This property holds whether a request is supported by its current gallery.
Access functions:
bool | isSupported () const |
Notifier signal:
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.