Class WIdentityProxyModel
A WIdentityProxyModel simply forwards the structure of the source model, without any
transformation. WIdentityProxyModel can be used as a base class for implementing proxy
models that reimplement data(), but retain all other characteristics of the source model.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WAbstractProxyModel
WAbstractProxyModel.BaseItemNested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetColumnCount(WModelIndex parent) Returns the number of columns.getIndex(int row, int column, WModelIndex parent) Returns the child index for the given row and column.getParent(WModelIndex child) Returns the parent for a model index.intgetRowCount(WModelIndex parent) Returns the number of rows.booleaninsertColumns(int column, int count, WModelIndex parent) Inserts one or more columns.booleaninsertRows(int row, int count, WModelIndex parent) Inserts one or more rows.mapFromSource(WModelIndex sourceIndex) Maps a proxy model index to the source model.mapToSource(WModelIndex proxyIndex) Maps a source model index to the proxy model.booleanremoveColumns(int column, int count, WModelIndex parent) Removes columns.booleanremoveRows(int row, int count, WModelIndex parent) Removes rows.booleansetHeaderData(int section, Orientation orientation, Object value, ItemDataRole role) Set header data for a column or row.voidsetSourceModel(WAbstractItemModel newSourceModel) Sets the source model.Methods inherited from class eu.webtoolkit.jwt.WAbstractProxyModel
createSourceIndex, dropEvent, endShiftModelIndexes, fromRawIndex, getAcceptDropMimeTypes, getData, getFlags, getHeaderData, getHeaderFlags, getMimeType, getSourceModel, setData, setItemData, startShiftModelIndexes, toRawIndexMethods inherited from class eu.webtoolkit.jwt.WAbstractItemModel
beginInsertColumns, beginInsertRows, beginRemoveColumns, beginRemoveRows, collapseColumn, columnsAboutToBeInserted, columnsAboutToBeRemoved, columnsInserted, columnsRemoved, copyData, createIndex, createIndex, dataChanged, dropEvent, endInsertColumns, endInsertRows, endRemoveColumns, endRemoveRows, expandColumn, getColumnCount, getData, getData, getData, getData, getHeaderData, getHeaderData, getHeaderFlags, getIndex, getItemData, getRowCount, hasChildren, hasIndex, hasIndex, headerDataChanged, insertColumn, insertColumn, insertColumns, insertRow, insertRow, insertRows, layoutAboutToBeChanged, layoutChanged, match, modelReset, removeColumn, removeColumn, removeColumns, removeRow, removeRow, removeRows, reset, rowsAboutToBeInserted, rowsAboutToBeRemoved, rowsInserted, rowsRemoved, setData, setData, setData, setData, setHeaderData, setHeaderData, sort, sortMethods inherited from class eu.webtoolkit.jwt.WObject
getId, getObjectName, remove, setFormData, setObjectName, tr
-
Constructor Details
-
WIdentityProxyModel
public WIdentityProxyModel()Constructor.
-
-
Method Details
-
getColumnCount
Returns the number of columns.Translates the parent index to the source model, and returns the number of columns of the source model.
- Specified by:
getColumnCountin classWAbstractItemModel- See Also:
-
getRowCount
Returns the number of rows.Translates the parent index to the source model, and returns the number of rows of the source model.
- Specified by:
getRowCountin classWAbstractItemModel- See Also:
-
getParent
Returns the parent for a model index.Translates the child index to the source model, and translates its parent back to this proxy model.
- Specified by:
getParentin classWAbstractItemModel- See Also:
-
getIndex
Returns the child index for the given row and column.- Specified by:
getIndexin classWAbstractItemModel- See Also:
-
mapFromSource
Maps a proxy model index to the source model.Returns a model index with the same row and column as the source index. The parent index is mapped recursively.
- Specified by:
mapFromSourcein classWAbstractProxyModel- See Also:
-
mapToSource
Maps a source model index to the proxy model.Returns a model index with the same row and column as the proxy index. The parent index is mapped recursively.
- Specified by:
mapToSourcein classWAbstractProxyModel- See Also:
-
setSourceModel
Sets the source model.The source model provides the actual data for the proxy model.
Ownership of the source model is not transferred.
All signals of the source model are forwarded to the proxy model.
- Overrides:
setSourceModelin classWAbstractProxyModel
-
insertColumns
Inserts one or more columns.Inserts
countcolumns at columncolumnin the source model.Forwards the result indicating success from the source model.
- Overrides:
insertColumnsin classWAbstractProxyModel- See Also:
-
insertRows
Inserts one or more rows.Inserts
countrows at rowrowin the source model.Forwards the result indicating success from the source model.
- Overrides:
insertRowsin classWAbstractItemModel- See Also:
-
removeColumns
Removes columns.Removes
countcolumns at columncolumnin the source model.Forwards the result indicating success from the source model.
- Overrides:
removeColumnsin classWAbstractProxyModel- See Also:
-
removeRows
Removes rows.Removes
countrows at rowrowin the source model.Forwards the result indicating success from the source model.
- Overrides:
removeRowsin classWAbstractItemModel- See Also:
-
setHeaderData
Set header data for a column or row.Sets the header data for a column or row in the source model.
Forwards the result indicating success from the source model.
- Overrides:
setHeaderDatain classWAbstractItemModel- See Also:
-