The QGalleryQueryRequest class provides a request for a set of items from a gallery. More...
#include <QGalleryQueryRequest>
Inherits QGalleryAbstractRequest.
enum | Scope { AllDescendants, DirectDescendants } |
|
|
QGalleryQueryRequest ( QObject * parent = 0 ) | |
QGalleryQueryRequest ( QAbstractGallery * gallery, QObject * parent = 0 ) | |
~QGalleryQueryRequest () | |
bool | autoUpdate () const |
int | currentIndex () const |
QGalleryFilter | filter () const |
bool | first () |
bool | isValid () const |
int | itemCount () const |
QVariant | itemId () const |
QString | itemType () const |
QUrl | itemUrl () const |
bool | last () |
int | limit () const |
QVariant | metaData ( int key ) const |
QVariant | metaData ( const QString & property ) const |
bool | next () |
int | offset () const |
bool | previous () |
QGalleryProperty::Attributes | propertyAttributes ( int key ) const |
int | propertyKey ( const QString & property ) const |
QStringList | propertyNames () const |
QVariant::Type | propertyType ( int key ) const |
QList<QGalleryResource> | resources () const |
QGalleryResultSet * | resultSet () const |
QVariant | rootItem () const |
QString | rootType () const |
QGalleryQueryRequest::Scope | scope () const |
bool | seek ( int index, bool relative = false ) |
void | setAutoUpdate ( bool enabled ) |
void | setFilter ( const QGalleryFilter & filter ) |
void | setLimit ( int limit ) |
bool | setMetaData ( int key, const QVariant & value ) |
bool | setMetaData ( const QString & property, const QVariant & value ) |
void | setOffset ( int offset ) |
void | setPropertyNames ( const QStringList & names ) |
void | setRootItem ( const QVariant & itemId ) |
void | setRootType ( const QString & itemType ) |
void | setScope ( QGalleryQueryRequest::Scope scope ) |
void | setSortPropertyNames ( const QStringList & names ) |
QStringList | sortPropertyNames () const |
void | currentItemChanged () |
void | resultSetChanged ( QGalleryResultSet * resultSet ) |
virtual void | setResponse ( QGalleryAbstractResponse * response ) |
The QGalleryQueryRequest class provides a request for a set of items from a gallery.
Identifies the scope of query.
Constant | Value | Description |
---|---|---|
QGalleryQueryRequest::AllDescendants | 0 | The query will return all descendents of the scope item. |
QGalleryQueryRequest::DirectDescendants | 1 | The query will return only direct descendents of the scope item. |
This property holds whether a the results of a request should be updated after a request has finished.
If this is true the request will go into the Idle state when the request has finished rather than returning to Inactive.
Access functions:
bool | autoUpdate () const |
void | setAutoUpdate ( bool enabled ) |
This property holds the index of current item.
Access functions:
int | currentIndex () const |
bool | seek ( int index, bool relative = false ) |
Notifier signal:
void | currentItemChanged () |
This property holds a filter identifying the items a request should return.
If no filter is set the results of the request will be determined by the rootType and rootItem properties.
Access functions:
QGalleryFilter | filter () const |
void | setFilter ( const QGalleryFilter & filter ) |
This property holds the ID of the current item.
Access functions:
QVariant | itemId () const |
Notifier signal:
void | currentItemChanged () |
This property holds he type of the current item.
Access functions:
QString | itemType () const |
Notifier signal:
void | currentItemChanged () |
This property holds the URL of the current item.
Access functions:
QUrl | itemUrl () const |
Notifier signal:
void | currentItemChanged () |
This property holds the maximimum number of items a query should return.
Access functions:
int | limit () const |
void | setLimit ( int limit ) |
This property holds the offset of the first item a query should return.
Access functions:
int | offset () const |
void | setOffset ( int offset ) |
This property holds a list of names of meta-data properties a request should return values for.
Access functions:
QStringList | propertyNames () const |
void | setPropertyNames ( const QStringList & names ) |
This property holds the resources of the current item.
Access functions:
QList<QGalleryResource> | resources () const |
Notifier signal:
void | currentItemChanged () |
This property holds the ID of an item the query should return the descendents of.
Access functions:
QVariant | rootItem () const |
void | setRootItem ( const QVariant & itemId ) |
This property holds the root item type the results of a query should be restricted to.
Access functions:
QString | rootType () const |
void | setRootType ( const QString & itemType ) |
This property holds whether all descendants of the rootItem should be returned by a request or just the direct descendants.
Access functions:
QGalleryQueryRequest::Scope | scope () const |
void | setScope ( QGalleryQueryRequest::Scope scope ) |
This property holds a list of names of meta-data properties a request should sort its results on.
Prefixing a property name with the '+' character indicates it should be sorted in ascending order, and a '-' character prefix indicates a descending order. If there is no prefix ascending order is assumed.
Access functions:
QStringList | sortPropertyNames () const |
void | setSortPropertyNames ( const QStringList & names ) |
This property holds whether the result set is currently positioned on a valid item.
Access functions:
bool | isValid () const |
Notifier signal:
void | currentItemChanged () |
Constructs a new gallery query request.
The parent is passed to QObject.
Contructs a new query request for the given gallery.
The parent is passed to QObject.
Destroys a gallery query request.
Signals that the item the result set is positioned on has changed.
Seeks to the first item in the result set.
Returns true if the position of the result set is valid after the seek; and false otherwise.
Returns the number of items returned by a query.
Seeks to the last item in the result set.
Returns true if the position of the result set is valid after the seek; and false otherwise.
Returns the value of a meta-data property identified by key for the current item.
See also setMetaData().
Returns the value of a meta-data property for the current item.
Seeks to the next item in the result set.
Returns true if the position of the result set is valid after the seek; and false otherwise.
Seeks to the previous item in the result set.
Returns true if the position of the result set is valid after the seek; and false otherwise.
Returns the attributes of the property identified by key.
Returns the key of property.
Returns the type of the property identified by key.
Returns the result set containing the results of a query.
Signals that the resultSet containing the results of a query have changed.
Sets the value of a meta-data property identified by key for the current item.
Returns true if the value was changed; otherwise returns false.
See also metaData().
Sets the
Constant | Value | Description |
---|---|---|
QGalleryQueryRequest::of | ? | a meta-data property for the current item. |
Returns true if the value was changed; otherwise returns false.
Reimplemented from QGalleryAbstractRequest::setResponse().