QAbstractItemModel

#include <QtCore/QAbstractItemModel>

More information will be added here shortly. For now, you'll find more extensive information about this class in the Qt reference for QAbstractItemModel


Overview

Public Functions Index

QAbstractItemModel (QObject *parent=0)
virtual ~QAbstractItemModel ()
virtual QModelIndexbuddy (const QModelIndex &index) const
virtual boolcanFetchMore (const QModelIndex &parent) const
intcolumnCount (const QModelIndex &parent=QModelIndex()) const =0
QVariantdata (const QModelIndex &index, int role=Qt::DisplayRole) const =0
virtual booldropMimeData (const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent)
virtual voidfetchMore (const QModelIndex &parent)
virtual Qt::ItemFlagsflags (const QModelIndex &index) const
virtual boolhasChildren (const QModelIndex &parent=QModelIndex()) const
boolhasIndex (int row, int column, const QModelIndex &parent=QModelIndex()) const
virtual QVariantheaderData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const
QModelIndexindex (int row, int column, const QModelIndex &parent=QModelIndex()) const =0
boolinsertColumn (int column, const QModelIndex &parent=QModelIndex())
virtual boolinsertColumns (int column, int count, const QModelIndex &parent=QModelIndex())
boolinsertRow (int row, const QModelIndex &parent=QModelIndex())
virtual boolinsertRows (int row, int count, const QModelIndex &parent=QModelIndex())
virtual QMap< int, QVariant >itemData (const QModelIndex &index) const
virtual QModelIndexListmatch (const QModelIndex &start, int role, const QVariant &value, int hits=1, Qt::MatchFlags flags=Qt::MatchFlags(Qt::MatchStartsWith|Qt::MatchWrap)) const
virtual QMimeData *mimeData (const QModelIndexList &indexes) const
virtual QStringListmimeTypes () const
QModelIndexparent (const QModelIndex &child) const =0
boolremoveColumn (int column, const QModelIndex &parent=QModelIndex())
virtual boolremoveColumns (int column, int count, const QModelIndex &parent=QModelIndex())
boolremoveRow (int row, const QModelIndex &parent=QModelIndex())
virtual boolremoveRows (int row, int count, const QModelIndex &parent=QModelIndex())
const QHash< int, QByteArray > &roleNames () const
introwCount (const QModelIndex &parent=QModelIndex()) const =0
virtual boolsetData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole)
virtual boolsetHeaderData (int section, Qt::Orientation orientation, const QVariant &value, int role=Qt::EditRole)
virtual boolsetItemData (const QModelIndex &index, const QMap< int, QVariant > &roles)
voidsetSupportedDragActions (Qt::DropActions)
QModelIndexsibling (int row, int column, const QModelIndex &idx) const
virtual voidsort (int column, Qt::SortOrder order=Qt::AscendingOrder)
virtual QSizespan (const QModelIndex &index) const
Qt::DropActionssupportedDragActions () const
virtual Qt::DropActionssupportedDropActions () const

Protected Functions Index

QAbstractItemModel (QAbstractItemModelPrivate &dd, QObject *parent=0)
voidbeginInsertColumns (const QModelIndex &parent, int first, int last)
voidbeginInsertRows (const QModelIndex &parent, int first, int last)
boolbeginMoveColumns (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationColumn)
boolbeginMoveRows (const QModelIndex &sourceParent, int sourceFirst, int sourceLast, const QModelIndex &destinationParent, int destinationRow)
voidbeginRemoveColumns (const QModelIndex &parent, int first, int last)
voidbeginRemoveRows (const QModelIndex &parent, int first, int last)
voidbeginResetModel ()
voidchangePersistentIndex (const QModelIndex &from, const QModelIndex &to)
voidchangePersistentIndexList (const QModelIndexList &from, const QModelIndexList &to)
QModelIndexcreateIndex (int row, int column, void *data=0) const
QModelIndexcreateIndex (int row, int column, int id) const
QModelIndexcreateIndex (int row, int column, quint32 id) const
booldecodeData (int row, int column, const QModelIndex &parent, QDataStream &stream)
voidencodeData (const QModelIndexList &indexes, QDataStream &stream) const
voidendInsertColumns ()
voidendInsertRows ()
voidendMoveColumns ()
voidendMoveRows ()
voidendRemoveColumns ()
voidendRemoveRows ()
voidendResetModel ()
QModelIndexListpersistentIndexList () const
voidreset ()
voidsetRoleNames (const QHash< int, QByteArray > &roleNames)

Public Slots Index

virtual voidrevert ()
virtual boolsubmit ()

Signals Index

voiddataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight)
voidheaderDataChanged (Qt::Orientation orientation, int first, int last)
voidlayoutAboutToBeChanged ()
voidlayoutChanged ()

Public Functions

QAbstractItemModel (

virtual~QAbstractItemModel ()

Destructor.

virtualQModelIndex buddy (

virtual bool canFetchMore (

int columnCount (

QVariant data (

virtual bool dropMimeData (

virtual void fetchMore (

virtual Qt::ItemFlags flags (

virtual bool hasChildren (

bool hasIndex (

virtualQVariant headerData (
  • intsection,
  • Qt::Orientationorientation,
  • introle )

QModelIndex index (

bool insertColumn (

virtual bool insertColumns (

bool insertRow (

virtual bool insertRows (

virtualQMap< int, QVariant > itemData (

virtualQModelIndexList match (

virtualQMimeData * mimeData (

virtualQStringList mimeTypes ()

QModelIndex parent (

bool removeColumn (

virtual bool removeColumns (

bool removeRow (

virtual bool removeRows (

const QHash< int, QByteArray > & roleNames ()

int rowCount (

virtual bool setData (

virtual bool setHeaderData (
  • intsection,
  • Qt::Orientationorientation,
  • const QVariant &value,
  • introle )

virtual bool setItemData (

void setSupportedDragActions (
  • Qt::DropActions)

QModelIndex sibling (

virtual void sort (
  • intcolumn,
  • Qt::SortOrderorder )

virtualQSize span (

Qt::DropActions supportedDragActions ()

virtual Qt::DropActions supportedDropActions ()

Protected Functions

QAbstractItemModel (
  • QAbstractItemModelPrivate &dd,
  • QObject *parent )

void beginInsertColumns (

void beginInsertRows (

bool beginMoveColumns (
  • const QModelIndex &sourceParent,
  • intsourceFirst,
  • intsourceLast,
  • const QModelIndex &destinationParent,
  • intdestinationColumn )

bool beginMoveRows (
  • const QModelIndex &sourceParent,
  • intsourceFirst,
  • intsourceLast,
  • const QModelIndex &destinationParent,
  • intdestinationRow )

void beginRemoveColumns (

void beginRemoveRows (

void beginResetModel ()

void changePersistentIndex (

void changePersistentIndexList (

QModelIndex createIndex (
  • introw,
  • intcolumn,
  • void *data )

QModelIndex createIndex (
  • introw,
  • intcolumn,
  • intid )

QModelIndex createIndex (
  • introw,
  • intcolumn,
  • quint32id )

bool decodeData (

void encodeData (

void endInsertColumns ()

void endInsertRows ()

void endMoveColumns ()

void endMoveRows ()

void endRemoveColumns ()

void endRemoveRows ()

void endResetModel ()

QModelIndexList persistentIndexList ()

void reset ()

void setRoleNames (

Public Slots

virtual void revert ()

virtual bool submit ()

Signals

void dataChanged (

void headerDataChanged (
  • Qt::Orientationorientation,
  • intfirst,
  • intlast )

void layoutAboutToBeChanged ()

void layoutChanged ()

Last modified: 2015-07-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus