The QGalleryQueryModel class provides a model for the results of a gallery query. More...
#include <QGalleryQueryModel>
|
QGalleryQueryModel ( QObject * parent = 0 ) | |
QGalleryQueryModel ( QAbstractGallery * gallery, QObject * parent = 0 ) | |
~QGalleryQueryModel () | |
void | addColumn ( const QHash<int, QString> & properties ) |
void | addColumn ( const QString & property, int role = Qt::DisplayRole ) |
bool | autoUpdate () const |
void | cancel () |
void | clear () |
int | columnCount ( const QModelIndex & parent = QModelIndex() ) const |
QVariant | data ( const QModelIndex & index, int role = Qt::DisplayRole ) const |
int | error () const |
QString | errorString () const |
void | execute () |
QGalleryFilter | filter () const |
Qt::ItemFlags | flags ( const QModelIndex & index ) const |
QAbstractGallery * | gallery () const |
QVariant | headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const |
QModelIndex | index ( int row, int column, const QModelIndex & parent = QModelIndex() ) const |
void | insertColumn ( int index, const QHash<int, QString> & properties ) |
void | insertColumn ( int index, const QString & property, int role = Qt::DisplayRole ) |
QVariant | itemId ( const QModelIndex & index ) const |
QString | itemType ( const QModelIndex & index ) const |
QUrl | itemUrl ( const QModelIndex & index ) const |
int | limit () const |
int | offset () const |
QModelIndex | parent ( const QModelIndex & index ) const |
void | removeColumn ( int index ) |
QHash<int, QString> | roleProperties ( int column ) const |
QVariant | rootItem () const |
QString | rootType () const |
int | rowCount ( const QModelIndex & parent = QModelIndex() ) const |
QGalleryQueryRequest::Scope | scope () const |
void | setAutoUpdate ( bool enabled ) |
bool | setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) |
void | setFilter ( const QGalleryFilter & filter ) |
void | setGallery ( QAbstractGallery * gallery ) |
bool | setHeaderData ( int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole ) |
void | setLimit ( int limit ) |
void | setOffset ( int offset ) |
void | setRoleProperties ( int column, const QHash<int, QString> & properties ) |
void | setRootItem ( const QVariant & itemId ) |
void | setRootType ( const QString & itemType ) |
void | setScope ( QGalleryQueryRequest::Scope scope ) |
void | setSortPropertyNames ( const QStringList & names ) |
QStringList | sortPropertyNames () const |
QGalleryAbstractRequest::Status | status () const |
void | cancelled () |
void | error ( int error, const QString & errorString ) |
void | errorChanged () |
void | finished () |
void | statusChanged ( QGalleryAbstractRequest::Status status ) |
The QGalleryQueryModel class provides a model for the results of a gallery query.
This property holds whether a query should continue to update its result set after the initial query succeeded.
Access functions:
bool | autoUpdate () const |
void | setAutoUpdate ( bool enabled ) |
This property holds the error encountered by an unsuccessful query.
Access functions:
int | error () const |
void | error ( int error, const QString & errorString ) |
Notifier signal:
void | errorChanged () |
This property holds a string describing the cause of an error in more detail.
This may be an empty string if more information is not known.
Access functions:
QString | errorString () const |
Notifier signal:
void | errorChanged () |
This property holds a filter restricting the results of a query.
Access functions:
QGalleryFilter | filter () const |
void | setFilter ( const QGalleryFilter & filter ) |
This property holds the Gallery a model executes its queries against.
Access functions:
QAbstractGallery * | gallery () const |
void | setGallery ( QAbstractGallery * gallery ) |
This property holds the maximum 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 the ID of the item a query should return the descendents of.
Access functions:
QVariant | rootItem () const |
void | setRootItem ( const QVariant & itemId ) |
See also scope().
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 a query will return all descendents of its root item or just the direct decendents.
Access functions:
QGalleryQueryRequest::Scope | scope () const |
void | setScope ( QGalleryQueryRequest::Scope scope ) |
See also rootItem().
This property holds a list of names of meta-data properties the results of a query should be sorted 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 the status of a query.
Access functions:
QGalleryAbstractRequest::Status | status () const |
Notifier signal:
void | statusChanged ( QGalleryAbstractRequest::Status status ) |
Constructs a new query model.
The parent is passed to QAbstractItemModel.
Constructs a new model which queries items from a gallery.
The parent is passed to QAbstractItemModel.
Adds a column which maps the given properties to a query model.
The column will not be populated until the query is executed.
Adds a column which maps a meta-data property to role to a query model.
The column will not be populated until the query is executed.
Cancels a query.
Signals that the query was cancelled.
Clears the results of a query.
See also setData().
Signals that the error and errorString properties have changed.
Executes a query.
Signals that the query has finished with the given result.
See also setHeaderData().
Inserts a column which maps the given properties into a query model at index.
The column will not be populated until the query is executed.
Inserts a column which maps a meta-data property to role into a query model at index.
The column will not be populated until the query is executed.
Returns the ID of the item at index.
Returns the type of the item at index.
Returns the URL of the item at index.
Removes the column at index from a query model.
Returns the meta-data properties which a column maps to roles.
See also setRoleProperties().
See also data().
See also headerData().
Sets the meta-data properties which a column maps to roles.
New properties will not be populated until the query is executed.
See also roleProperties().
Signals that the status of the query has changed.