Definition at line 159 of file qabstractitemmodel.h.
#include <qabstractitemmodel.h>

Public Slots |
|
| virtual bool | submit () |
| virtual void | revert () |
Signals |
|
| void | dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight) |
| void | headerDataChanged (Qt::Orientation orientation, int first, int last) |
| void | layoutChanged () |
| void | layoutAboutToBeChanged () |
Public Member Functions |
|
| QAbstractItemModel (QObject *parent=0) | |
| virtual | ~QAbstractItemModel () |
| bool | hasIndex (int row, int column, const QModelIndex &parent=QModelIndex()) const |
| virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const =0 |
| virtual QModelIndex | parent (const QModelIndex &child) const =0 |
| QModelIndex | sibling (int row, int column, const QModelIndex &idx) const |
| virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const =0 |
| virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const =0 |
| virtual bool | hasChildren (const QModelIndex &parent=QModelIndex()) const |
| virtual QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const =0 |
| virtual bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) |
| virtual QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const |
| virtual bool | setHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole) |
| virtual QMap< int, QVariant > | itemData (const QModelIndex &index) const |
| virtual bool | setItemData (const QModelIndex &index, const QMap< int, QVariant > &roles) |
| virtual QStringList | mimeTypes () const |
| virtual QMimeData * | mimeData (const QModelIndexList &indexes) const |
| virtual bool | dropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent) |
| virtual Qt::DropActions | supportedDropActions () const |
| Qt::DropActions | supportedDragActions () const |
| void | setSupportedDragActions (Qt::DropActions) |
| virtual bool | insertRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
| virtual bool | insertColumns (int column, int count, const QModelIndex &parent=QModelIndex()) |
| virtual bool | removeRows (int row, int count, const QModelIndex &parent=QModelIndex()) |
| virtual bool | removeColumns (int column, int count, const QModelIndex &parent=QModelIndex()) |
| bool | insertRow (int row, const QModelIndex &parent=QModelIndex()) |
| bool | insertColumn (int column, const QModelIndex &parent=QModelIndex()) |
| bool | removeRow (int row, const QModelIndex &parent=QModelIndex()) |
| bool | removeColumn (int column, const QModelIndex &parent=QModelIndex()) |
| virtual void | fetchMore (const QModelIndex &parent) |
| virtual bool | canFetchMore (const QModelIndex &parent) const |
| virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
| virtual void | sort (int column, Qt::SortOrder order=Qt::AscendingOrder) |
| virtual QModelIndex | buddy (const QModelIndex &index) const |
| virtual QModelIndexList | match (const QModelIndex &start, int role, const QVariant &value, int hits=1, Qt::MatchFlags flags=Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const |
| virtual QSize | span (const QModelIndex &index) const |
| const QHash< int, QByteArray > & | roleNames () const |
Protected Member Functions |
|
| QAbstractItemModel (QAbstractItemModelPrivate &dd, QObject *parent=0) | |
| QModelIndex | createIndex (int row, int column, void *data=0) const |
| QModelIndex | createIndex (int row, int column, int id) const |
| QModelIndex | createIndex (int row, int column, quint32 id) const |
| void | encodeData (const QModelIndexList &indexes, QDataStream &stream) const |
| bool | decodeData (int row, int column, const QModelIndex &parent, QDataStream &stream) |
| void | beginInsertRows (const QModelIndex &parent, int first, int last) |
| void | endInsertRows () |
| void | beginRemoveRows (const QModelIndex &parent, int first, int last) |
| void | endRemoveRows () |
| bool | beginMoveRows (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationRow) |
| void | endMoveRows () |
| void | beginInsertColumns (const QModelIndex &parent, int first, int last) |
| void | endInsertColumns () |
| void | beginRemoveColumns (const QModelIndex &parent, int first, int last) |
| void | endRemoveColumns () |
| bool | beginMoveColumns (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationColumn) |
| void | endMoveColumns () |
| void | reset () |
| void | beginResetModel () |
| void | endResetModel () |
| void | changePersistentIndex (const QModelIndex &from, const QModelIndex &to) |
| void | changePersistentIndexList (const QModelIndexList &from, const QModelIndexList &to) |
| QModelIndexList | persistentIndexList () const |
| void | setRoleNames (const QHash< int, QByteArray > &roleNames) |
Friends |
|
| class | QPersistentModelIndexData |
| class | QAbstractItemViewPrivate |
| QAbstractItemModel | ( | QObject * | parent = 0 |
) | [explicit] |
| virtual ~QAbstractItemModel | ( | ) | [virtual] |
| QAbstractItemModel | ( | QAbstractItemModelPrivate & | dd, |
| QObject * | parent = 0 |
||
| ) | [protected] |
| bool hasIndex | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const |
| virtual QModelIndex index | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | const [pure virtual] |
| virtual QModelIndex parent | ( | const QModelIndex & | child | ) | const [pure virtual] |
Implemented in QDirModel, QFileSystemModel, QProxyModel, QSortFilterProxyModel, and QStandardItemModel.
| QModelIndex sibling | ( | int | row, |
| int | column, | ||
| const QModelIndex & | idx | ||
| ) | const [inline] |
Definition at line 175 of file qabstractitemmodel.h.
| virtual int rowCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [pure virtual] |
| virtual int columnCount | ( | const QModelIndex & | parent = QModelIndex() |
) | const [pure virtual] |
Implemented in QDirModel, QFileSystemModel, QProxyModel, QSortFilterProxyModel, QStandardItemModel, and QSqlQueryModel.
| virtual bool hasChildren | ( | const QModelIndex & | parent = QModelIndex() |
) | const [virtual] |
Reimplemented in QDirModel, QFileSystemModel, QProxyModel, QSortFilterProxyModel, and QStandardItemModel.
| virtual QVariant data | ( | const QModelIndex & | index, |
| int | role =
Qt::DisplayRole |
||
| ) | const [pure virtual] |
| virtual bool setData | ( | const QModelIndex & | index, |
| const QVariant & | value, | ||
| int | role =
Qt::EditRole |
||
| ) | [virtual] |
| virtual QVariant headerData | ( | int | section, |
| Qt::Orientation | orientation, | ||
| int | role =
Qt::DisplayRole |
||
| ) | const [virtual] |
Reimplemented in QAbstractProxyModel, QDirModel, QFileSystemModel, QProxyModel, QSortFilterProxyModel, QStandardItemModel, QSqlQueryModel, and QSqlTableModel.
| virtual bool setHeaderData | ( | int | section, |
| Qt::Orientation | orientation, | ||
| const QVariant & | value, | ||
| int | role =
Qt::EditRole |
||
| ) | [virtual] |
Reimplemented in QAbstractProxyModel, QProxyModel, QSortFilterProxyModel, QStandardItemModel, and QSqlQueryModel.
| virtual QMap<int, QVariant> itemData | ( | const QModelIndex & | index | ) | const [virtual] |
Reimplemented in QAbstractProxyModel, and QStandardItemModel.
| virtual bool setItemData | ( | const QModelIndex & | index, |
| const QMap< int, QVariant > & | roles | ||
| ) | [virtual] |
Reimplemented in QStandardItemModel.
| virtual QStringList mimeTypes | ( | ) | const [virtual] |
Reimplemented in ObjectDescriptionModel< type >, QDirModel, QFileSystemModel, QProxyModel, QSortFilterProxyModel, and QStandardItemModel.
| virtual QMimeData* mimeData | ( | const QModelIndexList & | indexes | ) | const [virtual] |
Reimplemented in ObjectDescriptionModel< type >, QDirModel, QFileSystemModel, QProxyModel, QSortFilterProxyModel, and QStandardItemModel.
| virtual bool dropMimeData | ( | const QMimeData * | data, |
| Qt::DropAction | action, | ||
| int | row, | ||
| int | column, | ||
| const QModelIndex & | parent | ||
| ) | [virtual] |
| virtual Qt::DropActions supportedDropActions | ( | ) | const [virtual] |
| Qt::DropActions supportedDragActions | ( | ) | const |
| void setSupportedDragActions | ( | Qt::DropActions | ) |
| virtual bool insertRows | ( | int | row, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
Reimplemented in QProxyModel, QSortFilterProxyModel, QStandardItemModel, QStringListModel, and QSqlTableModel.
| virtual bool insertColumns | ( | int | column, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
Reimplemented in QProxyModel, QSortFilterProxyModel, QStandardItemModel, and QSqlQueryModel.
| virtual bool removeRows | ( | int | row, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
| virtual bool removeColumns | ( | int | column, |
| int | count, | ||
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [virtual] |
Reimplemented in QSortFilterProxyModel, QStandardItemModel, QSqlQueryModel, QSqlRelationalTableModel, and QSqlTableModel.
| bool insertRow | ( | int | row, |
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [inline] |
Reimplemented in QStandardItemModel.
Definition at line 310 of file qabstractitemmodel.h.
{ return insertRows(arow, 1, aparent); }
| bool insertColumn | ( | int | column, |
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [inline] |
Reimplemented in QStandardItemModel.
Definition at line 312 of file qabstractitemmodel.h.
{ return insertColumns(acolumn, 1, aparent); }
| bool removeRow | ( | int | row, |
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [inline] |
Definition at line 314 of file qabstractitemmodel.h.
{ return removeRows(arow, 1, aparent); }
| bool removeColumn | ( | int | column, |
| const QModelIndex & | parent = QModelIndex() |
||
| ) | [inline] |
Definition at line 316 of file qabstractitemmodel.h.
{ return removeColumns(acolumn, 1, aparent); }
| virtual void fetchMore | ( | const QModelIndex & | parent | ) | [virtual] |
Reimplemented in QFileSystemModel, QProxyModel, QSortFilterProxyModel, and QSqlQueryModel.
| virtual bool canFetchMore | ( | const QModelIndex & | parent | ) | const [virtual] |
Reimplemented in QFileSystemModel, QSortFilterProxyModel, and QSqlQueryModel.
| virtual Qt::ItemFlags flags | ( | const QModelIndex & | index | ) | const [virtual] |
| virtual void sort | ( | int | column, |
| Qt::SortOrder | order =
Qt::AscendingOrder |
||
| ) | [virtual] |
Reimplemented in QDirModel, QFileSystemModel, QProxyModel, QSortFilterProxyModel, QStandardItemModel, QStringListModel, and QSqlTableModel.
| virtual QModelIndex buddy | ( | const QModelIndex & | index | ) | const [virtual] |
Reimplemented in QSortFilterProxyModel.
| virtual QModelIndexList match | ( | const QModelIndex & | start, |
| int | role, | ||
| const QVariant & | value, | ||
| int | hits = 1, |
||
| Qt::MatchFlags | flags =
Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap) |
||
| ) | const [virtual] |
Reimplemented in QProxyModel, and QSortFilterProxyModel.
| virtual QSize span | ( | const QModelIndex & | index | ) | const [virtual] |
Reimplemented in QProxyModel, and QSortFilterProxyModel.
| const QHash<int,QByteArray>& roleNames | ( | ) | const |
| void dataChanged | ( | const QModelIndex & | topLeft, |
| const QModelIndex & | bottomRight | ||
| ) | [signal] |
| void headerDataChanged | ( | Qt::Orientation | orientation, |
| int | first, | ||
| int | last | ||
| ) | [signal] |
| void layoutChanged | ( | ) | [signal] |
| void layoutAboutToBeChanged | ( | ) | [signal] |
| virtual bool submit | ( | ) | [virtual, slot] |
Reimplemented in QAbstractProxyModel, QProxyModel, and QSqlTableModel.
| virtual void revert | ( | ) | [virtual, slot] |
Reimplemented in QAbstractProxyModel, QProxyModel, and QSqlTableModel.
| QModelIndex createIndex | ( | int | row, |
| int | column, | ||
| void * | data = 0 |
||
| ) | const [inline, protected] |
Definition at line 319 of file qabstractitemmodel.h.
{ return QModelIndex(arow, acolumn, adata, this); }
| QModelIndex createIndex | ( | int | row, |
| int | column, | ||
| int | id | ||
| ) | const [inline, protected] |
Definition at line 321 of file qabstractitemmodel.h.
: 4312 ) // avoid conversion warning on 64-bit
#endif
{ return QModelIndex(arow, acolumn, reinterpret_cast<void*>(aid), this); }
| QModelIndex createIndex | ( | int | row, |
| int | column, | ||
| quint32 | id | ||
| ) | const [inline, protected] |
Definition at line 330 of file qabstractitemmodel.h.
: 4312 ) // avoid conversion warning on 64-bit
#endif
{ return QModelIndex(arow, acolumn, reinterpret_cast<void*>(aid), this); }
| void encodeData | ( | const QModelIndexList & | indexes, |
| QDataStream & | stream | ||
| ) | const [protected] |
| bool decodeData | ( | int | row, |
| int | column, | ||
| const QModelIndex & | parent, | ||
| QDataStream & | stream | ||
| ) | [protected] |
| void beginInsertRows | ( | const QModelIndex & | parent, |
| int | first, | ||
| int | last | ||
| ) | [protected] |
| void endInsertRows | ( | ) | [protected] |
| void beginRemoveRows | ( | const QModelIndex & | parent, |
| int | first, | ||
| int | last | ||
| ) | [protected] |
| void endRemoveRows | ( | ) | [protected] |
| bool beginMoveRows | ( | const QModelIndex & | sourceParent, |
| int | sourceFirst, | ||
| int | sourceLast, | ||
| const QModelIndex & | destinationParent, | ||
| int | destinationRow | ||
| ) | [protected] |
| void endMoveRows | ( | ) | [protected] |
| void beginInsertColumns | ( | const QModelIndex & | parent, |
| int | first, | ||
| int | last | ||
| ) | [protected] |
| void endInsertColumns | ( | ) | [protected] |
| void beginRemoveColumns | ( | const QModelIndex & | parent, |
| int | first, | ||
| int | last | ||
| ) | [protected] |
| void endRemoveColumns | ( | ) | [protected] |
| bool beginMoveColumns | ( | const QModelIndex & | sourceParent, |
| int | sourceFirst, | ||
| int | sourceLast, | ||
| const QModelIndex & | destinationParent, | ||
| int | destinationColumn | ||
| ) | [protected] |
| void endMoveColumns | ( | ) | [protected] |
| void reset | ( | ) | [protected] |
| void beginResetModel | ( | ) | [protected] |
| void endResetModel | ( | ) | [protected] |
| void changePersistentIndex | ( | const QModelIndex & | from, |
| const QModelIndex & | to | ||
| ) | [protected] |
| void changePersistentIndexList | ( | const QModelIndexList & | from, |
| const QModelIndexList & | to | ||
| ) | [protected] |
| QModelIndexList persistentIndexList | ( | ) | const [protected] |
| void setRoleNames | ( | const QHash< int, QByteArray > & | roleNames | ) | [protected] |
friend class QPersistentModelIndexData
[friend] |
Definition at line 163 of file qabstractitemmodel.h.
friend class QAbstractItemViewPrivate
[friend] |
Definition at line 164 of file qabstractitemmodel.h.