TaurusBaseTreeItem
- class TaurusBaseTreeItem(model, data, parent=None)[source]
A generic node
Import from
taurus.qt.qtcore.model
as:from taurus.qt.qtcore.model import TaurusBaseTreeItem
- appendChild(child)[source]
Adds a new child node
- Parameters:
child (TaurusTreeBaseItem) – child to be added
- child(row)[source]
Returns the child in the given row
- Returns:
the child node for the given row
- Return type:
TaurusTreeBaseItem
- childCount()[source]
Returns the number of childs for this node
- Returns:
number of childs for this node
- Return type:
- data(index)[source]
Returns the data of this node for the given index
- Returns:
the data for the given index
- Return type:
- display()[source]
Returns the display string for this node
- Returns:
the node’s display string
- Return type:
- itemData()[source]
The internal itemData object
- Returns:
object holding the data of this item
- Return type:
- parent()[source]
Returns the parent node or None if no parent exists
- Returns:
the parent node
- Return type:
TaurusTreeBaseItem
- qdisplay(**kwargs)
Deprecated since version 4.5: Use display instead
- role()[source]
Returns the prefered role for the item. This implementation returns taurus.core.taurusbasetypes.TaurusElementType.Unknown
This method should be able to return any kind of python object as long as the model that is used is compatible.
- Returns:
the role in form of element type
- Return type:
taurus.core.taurusbasetypes.TaurusElementType