taurus taurus

Previous topic

TaurusBaseProxyModel

Next topic

TaurusDbBaseModel

This Page

TaurusBaseTreeItem

Inheritance diagram of TaurusBaseTreeItem

class TaurusBaseTreeItem(model, data, parent=None)

Bases: object

A generic node

DisplayFunc

alias of str

appendChild(child)

Adds a new child node

Parameters:child (:class:~`TaurusTreeBaseItem`) – child to be added
child(row)

Returns the child in the given row

Return type::class:~`TaurusTreeBaseItem`
Returns:the child node for the given row
childCount()

Returns the number of childs for this node

Return type::class:~`int`
Returns:number of childs for this node
data(index)

Returns the data of this node for the given index

Return type::class:~`object`
Returns:the data for the given index
depth()

Depth of the node in the hierarchy

Return type::class:~`int`
Returns:the node depth
display()

Returns the display string for this node

Return type::class:~`str`
Returns:the node’s display string
hasChildren()
icon(index)
itemData()

The internal itemData object

Return type::class:~`object`
Returns:object holding the data of this item
mimeData(index)
parent()

Returns the parent node or None if no parent exists

Return type::class:~`TaurusTreeBaseItem`
Returns:the parent node
qdisplay()

Returns the display QString for this node

Return type::class:~`Qt.QString`
Returns:the node’s display string
role()

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.

Return type::class:~`taurus.core.taurusbasetypes.TaurusElementType`
Returns:the role in form of element type
row()

Returns the row for this node

Return type::class:~`int`
Returns:row number for this node
setData(index, data)

Sets the node data

Parameters:data (:class:~`object`) – the data to be associated with this node
toolTip(index)