TaurusDbTreeWidget
- class TaurusDbTreeWidget(parent=None, designMode=False, with_navigation_bar=True, with_filter_widget=True, perspective=None, proxy=None)[source]
A class:taurus.qt.qtgui.tree.TaurusBaseTreeWidget that connects to a
taurus.core.taurusauthority.TaurusAuthority
model. It can show the list of database elements in four different perspectives:device : a three level hierarchy of devices (domain/family/name)
server : a server based perspective
class : a class based perspective
Filters can be inserted into this widget to restrict the tree nodes that are seen.
Import from
taurus.qt.qtgui.tree
as:from taurus.qt.qtgui.tree import TaurusDbTreeWidget
- DftPerspective = 3
- KnownPerspectives = {'PlainDevice': {'icon': 'applications-system', 'label': 'By plain device', 'model': [<class 'taurus.qt.qtcore.model.taurusdatabasemodel.TaurusDbDeviceProxyModel'>, <class 'taurus.qt.qtcore.model.taurusdatabasemodel.TaurusDbPlainDeviceModel'>], 'tooltip': 'View by plain device tree (it may take a long time if there are problems with the exported devices)'}, 2: {'icon': 'text-x-script', 'label': 'By class', 'model': [<class 'taurus.qt.qtcore.model.taurusdatabasemodel.TaurusDbDeviceClassProxyModel'>, <class 'taurus.qt.qtcore.model.taurusdatabasemodel.TaurusDbDeviceClassModel'>], 'tooltip': 'View by class tree'}, 3: {'icon': 'applications-system', 'label': 'By device', 'model': [<class 'taurus.qt.qtcore.model.taurusdatabasemodel.TaurusDbDeviceProxyModel'>, <class 'taurus.qt.qtcore.model.taurusdatabasemodel.TaurusDbDeviceModel'>], 'tooltip': 'View by device tree'}, 8: {'icon': 'application-x-executable', 'label': 'By server', 'model': [<class 'taurus.qt.qtcore.model.taurusdatabasemodel.TaurusDbServerProxyModel'>, <class 'taurus.qt.qtcore.model.taurusdatabasemodel.TaurusDbServerModel'>], 'tooltip': 'View by server tree'}}
- getModelClass(**kwargs)[source]
Return the class object for the widget. Default behavior is to do a ‘best effort’ to determine which model type corresponds to the current model name. Overwrite as necessary.
- Parameters:
key (object) – the model key. Defaults to first element of .modelKeys
- Returns:
The class object corresponding to the type of Taurus model this widget handles or None if no valid class is found.
- Return type:
class TaurusModel or None
- classmethod getQtDesignerPluginInfo()[source]
Returns pertinent information in order to be able to build a valid QtDesigner widget plugin.
The dictionary returned by this method should contain at least the following keys and values:
‘module’ : a string representing the full python module name (ex.: ‘taurus.qt.qtgui.base’)
‘icon’ : a string representing valid resource icon (ex.: ‘designer:combobox.png’)
- ‘container’a bool telling if this widget is a container widget or
not.
This default implementation returns the following dictionary:
{ 'group' : 'Taurus [Unclassified]', 'icon' : 'logos:taurus.png', 'container' : False }
- Returns:
a map with pertinent designer information
- Return type: