The QGalleryResultSet class provides a gallery response which returns the results of a query. More...
#include <QGalleryResultSet>
Inherits: QGalleryAbstractResponse.
This class was introduced in Qt Mobility 1.1.
QGalleryResultSet ( QObject * parent = 0 ) | |
~QGalleryResultSet () | |
virtual int | currentIndex () const = 0 |
virtual bool | fetch ( int index ) = 0 |
virtual bool | fetchFirst () |
virtual bool | fetchLast () |
virtual bool | fetchNext () |
virtual bool | fetchPrevious () |
virtual bool | isValid () const |
virtual int | itemCount () const = 0 |
virtual QVariant | itemId () const = 0 |
virtual QString | itemType () const = 0 |
virtual QUrl | itemUrl () const = 0 |
virtual QVariant | metaData ( int key ) const = 0 |
virtual QGalleryProperty::Attributes | propertyAttributes ( int key ) const = 0 |
virtual int | propertyKey ( const QString & property ) const = 0 |
virtual QVariant::Type | propertyType ( int key ) const = 0 |
virtual QList<QGalleryResource> | resources () const |
virtual bool | setMetaData ( int key, const QVariant & value ) = 0 |
void | currentIndexChanged ( int index ) |
void | currentItemChanged () |
void | itemsInserted ( int index, int count ) |
void | itemsMoved ( int from, int to, int count ) |
void | itemsRemoved ( int index, int count ) |
void | metaDataChanged ( int index, int count, const QList<int> & keys ) |
The QGalleryResultSet class provides a gallery response which returns the results of a query.
Implementations of QGalleryResultSet are used to return a result set in response to a QGalleryAbstractRequest. A QGalleryResultSet provides functions for accessing identifying information and meta-data of items queried from a gallery.
Only one item in a result set can be accessed at a time, so before information about an item can be accessed it must be selected using one of the fetch() functions. When a new index is selected the result set will emit the currentIndexChanged() signal, and when the currently selected item changes the currentItemChanged() signal will be emitted. If the currentIndex() contains a gallery item isValid() will return true, otherwise it will return false. Information identifying the current item in a result set can be accessed using the itemId(), itemUrl() and itemType() functions.
For each meta-data property that can be addressed by a result set it will provide a unique key which queried by passing the property's name to the propertyKey() function. Passing this key to the metaData() function will return the current item's value for that property. Some result sets may contain editable meta-data values which can be changed using the setMetaData() function. The attributes of a meta-data property such as whether it's writable can be queried from propertyAttributes() and the type of value that will returned by metaData() can be queried using propertyType().
Whenever items are added or removed from a result set the itemsInserted() and itemsRemoved() signals will be emitted identifying where and how many items were changed. If the meta-data of one or more items in a result set changes the metaDataChanged() signal will be emitted.
Constructs a new result set.
The parent is passed to QGalleryAbstractResponse.
Destroys a result set.
Returns the index of the item a result set currently positioned on.
This function was introduced in Qt Mobility 1.1.
See also fetch().
Signals that a result set has been repositioned on a new index.
This function was introduced in Qt Mobility 1.1.
Signals that the item the result set is positioned on has changed.
This function was introduced in Qt Mobility 1.1.
Moves the current position of a result set to an arbitrary index.
Returns true if the result set is positioned on a valid item on return; otherwise returns false.
This function was introduced in Qt Mobility 1.1.
Moves the current position of the result set to the first item in the set.
Returns true if the result set is positioned on a valid item on return; otherwise returns false.
This function was introduced in Qt Mobility 1.1.
Moves the current position of the result set to the last item in the set.
Returns true if the result set is positioned on a valid item on return; otherwise returns false.
This function was introduced in Qt Mobility 1.1.
Moves the current position of the result set to the next item in the set.
Returns true if the result set is positioned on a valid item on return; otherwise returns false.
This function was introduced in Qt Mobility 1.1.
Moves the current position of the result set to the previous item in the set.
Returns true if the result set is positioned on a valid item on return; otherwise returns false.
This function was introduced in Qt Mobility 1.1.
Returns true if a result set is currently positioned on a valid item; otherwise returns false.
This function was introduced in Qt Mobility 1.1.
See also currentIndex().
Returns the number of items in a result set.
This function was introduced in Qt Mobility 1.1.
Returns the ID of the item a result set is currently positioned on.
This function was introduced in Qt Mobility 1.1.
See also currentIndex().
Returns the type of the item a result set is currently positioned on.
This function was introduced in Qt Mobility 1.1.
See also currentIndex().
Returns the URL of the item a result set is currently positioned on.
This function was introduced in Qt Mobility 1.1.
See also currentIndex() and resources().
Signals that count items have been inserted into a result set at index.
This function was introduced in Qt Mobility 1.1.
Signals that count items have been moved from an existing index to a new index.
This function was introduced in Qt Mobility 1.1.
Signals that count items have been removed from a result set at index.
This function was introduced in Qt Mobility 1.1.
Returns the meta-data value of the current item for key.
This function was introduced in Qt Mobility 1.1.
See also setMetaData().
Signals that the meta-data identified by keys of count items starting at index has changed.
This function was introduced in Qt Mobility 1.1.
Returns the attributes of the property identified by key.
This function was introduced in Qt Mobility 1.1.
Returns a positive integer key for a property name, or a negative integer if the property name is invalid.
This function was introduced in Qt Mobility 1.1.
Returns the type of the property identified by key.
This function was introduced in Qt Mobility 1.1.
Returns the resources of the item of a result set is currently positioned on.
The default implementation returns a single resource with the URL of the current item, or an empty list if the current item doesn't have a valid URL.
This function was introduced in Qt Mobility 1.1.
See also currentIndex() and itemUrl().
Sets the meta-data value of the current item for key.
Returns true if the value was changed successfully; otherwise returns false.
This function was introduced in Qt Mobility 1.1.
See also metaData().
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.