TreeModel models the data of a tree widget.
Slots
- childrenSource
-
virtual Obj[]? children(Obj node)
Get the children of the specified node. If no children return null or the empty list. Default returns null.
- hasChildrenSource
-
virtual Bool hasChildren(Obj node)
Return if this has or might have children. This is an optimization to display an expansion control without actually loading all the children. The default returns
!children.isEmpty
. - imageSource
-
virtual Image? image(Obj node)
Get the image to display for specified node or null.
- rootsSource
-
abstract Obj[] roots()
Get root nodes.
- textSource
-
Get the text to display for specified node. Default is
node.toStr
.