QGalleryItemListModel Class Reference
The QGalleryItemListModel class provides a QAbstractItemModel wrapper for QGalleryItemList. More...
#include <QGalleryItemListModel>
Properties
Public Functions
| QGalleryItemListModel ( QObject * parent = 0 ) |
| ~QGalleryItemListModel () |
void | addColumn ( const QHash<int, QString> & properties ) |
void | addColumn ( const QString & property, int role = Qt::DisplayRole ) |
bool | autoUpdateCursorPosition () const |
int | columnCount ( const QModelIndex & parent = QModelIndex() ) const |
QVariant | data ( const QModelIndex & index, int role = Qt::DisplayRole ) const |
Qt::ItemFlags | flags ( const QModelIndex & index ) 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 ) |
QGalleryItemList * | itemList () const |
QModelIndex | parent ( const QModelIndex & parent ) const |
void | removeColumn ( int index ) |
QHash<int, QString> | roleProperties ( int column ) const |
int | rowCount ( const QModelIndex & parent = QModelIndex() ) const |
void | setAutoUpdateCursorPosition ( bool enabled ) |
bool | setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole ) |
bool | setHeaderData ( int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole ) |
void | setRoleProperties ( int column, const QHash<int, QString> & properties ) |
Public Slots
Detailed Description
The QGalleryItemListModel class provides a QAbstractItemModel wrapper for QGalleryItemList.
See also QGalleryItemList.
Property Documentation
autoUpdateCursorPosition : bool
This property holds whether a model should update the QGalleryItemList::cursorPosition property.
If enabled the model will attempt to infer an appropriate cursorPosition from index() calls.
Access functions:
bool | autoUpdateCursorPosition () const |
void | setAutoUpdateCursorPosition ( bool enabled ) |
This property holds the gallery item list a model wraps.
Access functions:
QGalleryItemList * | itemList () const |
void | setItemList ( QGalleryItemList * list ) |
Member Function Documentation
QGalleryItemListModel::QGalleryItemListModel ( QObject * parent = 0 )
Constructs a new gallery item list model.
The parent is passed to QObject.
QGalleryItemListModel::~QGalleryItemListModel ()
Destroys a gallery item list model.
void QGalleryItemListModel::addColumn ( const QHash<int, QString> & properties )
Add a new column to a model with the given properties mapped to item model roles.
void QGalleryItemListModel::addColumn ( const QString & property, int role = Qt::DisplayRole )
Adds a new column to a model with property mapped to an item model role.
int QGalleryItemListModel::columnCount ( const QModelIndex & parent = QModelIndex() ) const
QVariant QGalleryItemListModel::data ( const QModelIndex & index, int role = Qt::DisplayRole ) const
See also setData().
Qt::ItemFlags QGalleryItemListModel::flags ( const QModelIndex & index ) const
QVariant QGalleryItemListModel::headerData ( int section, Qt::Orientation orientation, int role = Qt::DisplayRole ) const
See also setHeaderData().
QModelIndex QGalleryItemListModel::index ( int row, int column, const QModelIndex & parent = QModelIndex() ) const
void QGalleryItemListModel::insertColumn ( int index, const QHash<int, QString> & properties )
Inserts a new column into a model at index with the given properties mapped to item model roles.
void QGalleryItemListModel::insertColumn ( int index, const QString & property, int role = Qt::DisplayRole )
Inserts a new column into a model at index with property mapped to an item model role.
QModelIndex QGalleryItemListModel::parent ( const QModelIndex & parent ) const
void QGalleryItemListModel::removeColumn ( int index )
Removes the column at index from a model.
QHash<int, QString> QGalleryItemListModel::roleProperties ( int column ) const
Returns the gallery properties mapped to item model roles for a column.
See also setRoleProperties().
int QGalleryItemListModel::rowCount ( const QModelIndex & parent = QModelIndex() ) const
bool QGalleryItemListModel::setData ( const QModelIndex & index, const QVariant & value, int role = Qt::EditRole )
See also data().
bool QGalleryItemListModel::setHeaderData ( int section, Qt::Orientation orientation, const QVariant & value, int role = Qt::EditRole )
See also headerData().
void QGalleryItemListModel::setRoleProperties ( int column, const QHash<int, QString> & properties )
Sets the gallery properties mapped to item model roles for a column.
See also roleProperties().