Member Function Documentation
QProxyModel::QProxyModel(QObject * parent = 0)
Constructs a proxy model with the given parent.
QProxyModel::~QProxyModel()
Destroys the proxy model.
int QProxyModel::columnCount(const QModelIndex & parent = QModelIndex()) const [virtual]
Reimplemented from QAbstractItemModel::columnCount().
Returns the number of columns for the given parent.
See also QAbstractItemModel::columnCount().
QVariant QProxyModel::data(const QModelIndex & index, int role = Qt::DisplayRole) const [virtual]
Reimplemented from QAbstractItemModel::data().
Returns the data stored in the item with the given index under the specified role.
See also setData().
bool QProxyModel::dropMimeData(const QMimeData * data, Qt::DropAction action, int row, int column, const QModelIndex & parent) [virtual]
Reimplemented from QAbstractItemModel::dropMimeData().
Returns true if the model accepts the data dropped onto an attached view for the specified action; otherwise returns false.
The parent, row, and column details can be used to control which MIME types are acceptable to different parts of a model when received via the drag and drop system.
void QProxyModel::fetchMore(const QModelIndex & parent) [virtual]
Reimplemented from QAbstractItemModel::fetchMore().
Fetches more child items of the given parent. This function is used by views to tell the model that they can display more data than the model has provided.
See also QAbstractItemModel::fetchMore().
Qt::ItemFlags QProxyModel::flags(const QModelIndex & index) const [virtual]
Reimplemented from QAbstractItemModel::flags().
Returns the item flags for the given index.
bool QProxyModel::hasChildren(const QModelIndex & parent = QModelIndex()) const [virtual]
Reimplemented from QAbstractItemModel::hasChildren().
Returns true if the item corresponding to the parent index has child items; otherwise returns false.
See also QAbstractItemModel::hasChildren().
Reimplemented from QAbstractItemModel::headerData().
Returns the data stored in the section of the header with specified orientation under the given role.
See also setHeaderData().
QModelIndex QProxyModel::index(int row, int column, const QModelIndex & parent = QModelIndex()) const [virtual]
Reimplemented from QAbstractItemModel::index().
Returns the model index with the given row, column, and parent.
See also QAbstractItemModel::index().
bool QProxyModel::insertColumns(int column, int count, const QModelIndex & parent = QModelIndex()) [virtual]
Reimplemented from QAbstractItemModel::insertColumns().
Inserts count columns into the model, creating new items as children of the given parent. The new columns are inserted before the column specified. If the parent item has no children, a single row is created to contain the required number of columns.
Returns true if the columns were successfully inserted; otherwise returns false.
See also QAbstractItemModel::insertColumns().
bool QProxyModel::insertRows(int row, int count, const QModelIndex & parent = QModelIndex()) [virtual]
Reimplemented from QAbstractItemModel::insertRows().
Inserts count rows into the model, creating new items as children of the given parent. The new rows are inserted before the row specified. If the parent item has no children, a single column is created to contain the required number of rows.
Returns true if the rows were successfully inserted; otherwise returns false.
See also QAbstractItemModel::insertRows().
QModelIndexList QProxyModel::match(const QModelIndex & start, int role, const QVariant & value, int hits = 1, Qt::MatchFlags flags = Qt::MatchFlags( Qt::MatchStartsWith | Qt::MatchWrap )) const [virtual]
Reimplemented from QAbstractItemModel::match().
Returns a list of model indexes that each contain the given value for the role specified. The search begins at the start index and is performed according to the specified flags. The search continues until the number of matching data items equals hits, the last row is reached, or the search reaches start again, depending on whether MatchWrap is specified in flags.
See also QAbstractItemModel::match().
QMimeData * QProxyModel::mimeData(const QModelIndexList & indexes) const [virtual]
Reimplemented from QAbstractItemModel::mimeData().
Returns MIME data for the specified indexes in the model.
QStringList QProxyModel::mimeTypes() const [virtual]
Reimplemented from QAbstractItemModel::mimeTypes().
Returns a list of MIME types that are supported by the model.
Returns the model that contains the data that is available through the proxy model.
See also setModel().
QModelIndex QProxyModel::parent(const QModelIndex & child) const [virtual]
Reimplemented from QAbstractItemModel::parent().
Returns the model index that corresponds to the parent of the given child index.
void QProxyModel::revert() [virtual]
Reimplemented from QAbstractItemModel::revert().
int QProxyModel::rowCount(const QModelIndex & parent = QModelIndex()) const [virtual]
Reimplemented from QAbstractItemModel::rowCount().
Returns the number of rows for the given parent.
See also QAbstractItemModel::rowCount().
bool QProxyModel::setData(const QModelIndex & index, const QVariant & value, int role = Qt::EditRole) [virtual]
Reimplemented from QAbstractItemModel::setData().
Sets the role data for the item at index to value. Returns true if successful; otherwise returns false.
The base class implementation returns false. This function and data() must be reimplemented for editable models.
See also data(), itemData(), and QAbstractItemModel::setData().
Reimplemented from QAbstractItemModel::setHeaderData().
Sets the role data in the section of the header with the specified orientation to the value given.
See also headerData() and QAbstractItemModel::setHeaderData().
void QProxyModel::setModel(QAbstractItemModel * model) [virtual]
Sets the given model to be processed by the proxy model.
See also model().
void QProxyModel::sort(int column, Qt::SortOrder order = Qt::AscendingOrder) [virtual]
Reimplemented from QAbstractItemModel::sort().
Sorts the child items in the specified column according to the sort order defined by order.
See also QAbstractItemModel::sort().
QSize QProxyModel::span(const QModelIndex & index) const [virtual]
Reimplemented from QAbstractItemModel::span().
Returns the size of the item that corresponds to the specified index.
bool QProxyModel::submit() [virtual]
Reimplemented from QAbstractItemModel::submit().
Qt::DropActions QProxyModel::supportedDropActions() const [virtual]
Reimplemented from QAbstractItemModel::supportedDropActions().
Returns the drop actions that are supported by the model; this is a combination of the individual actions defined in Qt::DropActions.
The selection of drop actions provided by the model will influence the behavior of the component that started the drag and drop operation.
See also l{dnd.html}{Drag and Drop}.