taurus taurus

Previous topic

TaurusDbTreeWidget

Next topic

TaurusDevTreeOptions

This Page

TaurusDevTree

Inheritance diagram of TaurusDevTree

class TaurusDevTree(parent=None, designMode=False)

Bases: taurus.qt.qtgui.tree.taurusdevicetree.TaurusTreeNodeContainer, PyQt4.QtGui.QTreeWidget, taurus.qt.qtgui.base.taurusbase.TaurusBaseWidget

This widget displays a list of servers, devices or instances. To set a new Model use either setModel(filters), addModels(list), setFilters(...) or loadTree(filters) setModel and loadTree are equivalent; adding a new branch to the tree addModels merges the tree with new models setFilters clears previous models and adds new one

TRACE_ALL = False
addAttrToDev(my_device, expert=False, allow_types=None)

This command returns the list of attributes of a given device applying display level and type filters. @argin expert If False only PyTango.DispLevel.OPERATOR attributes are displayed @argin allow_types Only those types included in the list will be displayed (e.g. may be restricted to numeric types only)

addAttrToNode()
addModels(modelNames)

Adds models to the existing ones: :type modelNames: :class:~`sequence` <:class:~`str`> :param modelNames: the names of the models to be added .. seealso:: removeModels()

clear()
collapseNode(ALL=False, filters='', fun=None)

Collapses the whole tree or from a given node. @argin ALL tells whether to collapse from current item or the whole tree @argin filters Allows to set a list of nodes to not be filtered

contextMenuEvent(event)

This function is called when right clicking on TaurusDevTree area.

defineStyle()
deviceClicked(item, column)
deviceSelected(device_name='')

QSIGNAL: this method is used to emit deviceSelected(QString) signal

dropEvent(event)

reimplemented to support dropping of modelnames in forms

expandAll(queue=True)
expandNode(node=None, expand=True)

Needed to do threaded expansion of the tree

findDialog()
findInTree(regexp, collapseAll=None, exclude=None, select=True, queue=True)
getAllNodes()

Returns a list with all node objects.

getConfig(name)
getMatchingNodes(regexp, limit=0, all=False, exclude=None)

It returns all nodes matching the given expression.

getModel()
getModelClass()
getModelMimeData()

Returns a MimeData object containing the model data. The default implementation fills the TAURUS_MODEL_MIME_TYPE. If the widget’s Model class is Attribute or Device, it also fills TAURUS_ATTR_MIME_TYPE or TAURUS_DEV_MIME_TYPE, respectively

getNode(target=None)

Gets currrent node or node by name or by regexp

getNodeByName(key)
getNodeList()
classmethod getQtDesignerPluginInfo()
getSelectedNodes()
getTangoDict(filters)
initConfig()

Initializing the attributes that will be kept persitent as Qt settings. e.g. for Filters property, the following attributes are created:

  • self.filters
  • self._filters
  • self.setFilters
  • self.getFilters
  • self.resetFilters
mimeTypes()
minimumSizeHint()
mouseMoveEvent(event)

copied from TaurusBaseWidget to provide drag events

refreshTree()
setFilters(filters)
setIcons(dct={}, root_name=None, regexps=True)

This method change the icons depending of the status of the devices Dict is a dictionary with name of device and colors such as {name_device:color,name_device2:color2} An alternative may be an icon name!

setModel(model)
setModelCheck(model)
setNodeTree(parent, diction, alias=False)

It has parent as argument to allow itself to be recursive Initializes the node tree from a dictionary {‘Node0.0’:{‘Node1.0’:None,’Node1.1’:None}}

setStateIcon(child, color)
setTangoHost(tango_host)
setTree(diction, clear=False)

Initializes the tree from a dictionary {‘Node0.0’:{‘Node1.0’:None,’Node1.1’:None}}

showNodeContextMenu(node, event)

A pop up menu will be shown with the available options. Menus are managed using two tuple lists for each node: node.ContextMenu and node.ExpertMenu

sizeHint()
sortCustom(order)
trace(msg)
unpackChildren()

removes all nodes from the tree and returns them in a list, used for resorting