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.BaseItem
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
getColumnCount
(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.int
getRowCount
(WModelIndex parent) Returns the number of rows.boolean
insertColumns
(int column, int count, WModelIndex parent) Inserts one or more columns.boolean
insertRows
(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.boolean
removeColumns
(int column, int count, WModelIndex parent) Removes columns.boolean
removeRows
(int row, int count, WModelIndex parent) Removes rows.boolean
setHeaderData
(int section, Orientation orientation, Object value, ItemDataRole role) Set header data for a column or row.void
setSourceModel
(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, toRawIndex
Methods 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, sort
Methods 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:
getColumnCount
in 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:
getRowCount
in 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:
getParent
in classWAbstractItemModel
- See Also:
-
getIndex
Returns the child index for the given row and column.- Specified by:
getIndex
in 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:
mapFromSource
in 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:
mapToSource
in 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:
setSourceModel
in classWAbstractProxyModel
-
insertColumns
Inserts one or more columns.Inserts
count
columns at columncolumn
in the source model.Forwards the result indicating success from the source model.
- Overrides:
insertColumns
in classWAbstractProxyModel
- See Also:
-
insertRows
Inserts one or more rows.Inserts
count
rows at rowrow
in the source model.Forwards the result indicating success from the source model.
- Overrides:
insertRows
in classWAbstractItemModel
- See Also:
-
removeColumns
Removes columns.Removes
count
columns at columncolumn
in the source model.Forwards the result indicating success from the source model.
- Overrides:
removeColumns
in classWAbstractProxyModel
- See Also:
-
removeRows
Removes rows.Removes
count
rows at rowrow
in the source model.Forwards the result indicating success from the source model.
- Overrides:
removeRows
in 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:
setHeaderData
in classWAbstractItemModel
- See Also:
-