# `TaurusBaseTreeItem`

digraph inheritancecedb6e3ec9 { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "TaurusBaseTreeItem" [URL="#taurus.qt.qtcore.model.TaurusBaseTreeItem",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="A generic node"]; }

class TaurusBaseTreeItem(model, data, parent=None)

  A generic node

  Import from `taurus.qt.qtcore.model` as:

      from taurus.qt.qtcore.model import TaurusBaseTreeItem

  DisplayFunc

    alias of `str`

  appendChild(child)

    Adds a new child node

    Parameters:

      child (TaurusTreeBaseItem) – child to be added

  child(row)

    Returns the child in the given row

    Returns:

      the child node for the given row

    Return type:

      TaurusTreeBaseItem

  childCount()

    Returns the number of childs for this node

    Returns:

      number of childs for this node

    Return type:

      int

  data(index)

    Returns the data of this node for the given index

    Returns:

      the data for the given index

    Return type:

      object

  depth()

    Depth of the node in the hierarchy

    Returns:

      the node depth

    Return type:

      int

  display()

    Returns the display string for this node

    Returns:

      the node’s display string

    Return type:

      str

  hasChildren()
  icon(index)
  itemData()

    The internal itemData object

    Returns:

      object holding the data of this item

    Return type:

      object

  mimeData(index)
  parent()

    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()

    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

  row()

    Returns the row for this node

    Returns:

      row number for this node

    Return type:

      int

  setData(index, data)

    Sets the node data

    Parameters:

      data (object) – the data to be associated with this node

  toolTip(index)