KDescendantsProxyModel QML Type
Flattens a tree model into a list. More...
| Import Statement: | import org.kde.kitemmodels |
| In C++: | KDescendantsProxyModel |
Properties
- ancestorSeparator : string
- displayAncestorData : bool
- expandsByDefault : bool
- model : var
- sourceModel : var
Methods
- void collapseChildren(int row)
- void expandChildren(int row)
- QModelIndex mapFromSource(QModelIndex sourceIndex)
- QItemSelection mapSelectionFromSource(QItemSelection sourceSelection)
- QItemSelection mapSelectionToSource(QItemSelection proxySelection)
- QModelIndex mapToSource(QModelIndex proxyIndex)
- void toggleChildren(int row)
Detailed Description
Set model to the source tree model. Each item in the flattened list can be expanded or collapsed using its row in this proxy model.
Property Documentation
ancestorSeparator : string [default: " / "]
The separator between ancestor values when displayAncestorData is true.
displayAncestorData : bool [default: false]
Whether display data includes the item's ancestors.
expandsByDefault : bool [default: true]
Whether all items are expanded when the source model is loaded.
model : var
The source tree model to flatten.
sourceModel : var
The source tree model to flatten. This inherited property refers to the same model as model.
Method Documentation
void collapseChildren(int row)
Collapses the children of the item at row in this proxy model.
void expandChildren(int row)
Expands the children of the item at row in this proxy model.
QModelIndex mapFromSource(QModelIndex sourceIndex)
Returns the proxy model index corresponding to sourceIndex.
See also mapToSource().
QItemSelection mapSelectionFromSource(QItemSelection sourceSelection)
Returns the proxy model selection corresponding to sourceSelection.
QItemSelection mapSelectionToSource(QItemSelection proxySelection)
Returns the source model selection corresponding to proxySelection.
QModelIndex mapToSource(QModelIndex proxyIndex)
Returns the source model index corresponding to proxyIndex.
See also mapFromSource().
void toggleChildren(int row)
Toggles the expansion of the item at row in this proxy model.