TaurusAttrForm

Inheritance diagram of TaurusAttrForm
class TaurusAttrForm(parent=None, designMode=False)[source]

A form that displays the attributes of a Device Server

Import from taurus.qt.qtgui.panel as:

from taurus.qt.qtgui.panel import TaurusAttrForm
getModelClass(**kwargs)[source]

see TaurusBaseComponent.getModelClass()

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:

dict

getViewFilters()[source]

returns the filters used in deciding which attributes are displayed

Returns:

a sequence of filters

Return type:

sequence<callable>

model

Returns the model name for this component.

Parameters:

key (object) – the model key. Defaults to first element of .modelKeys

Returns:

the model name.

Return type:

str

setExpertView(expert)[source]

sets the expert view mode

Parameters:

expert (bool) – If expert is True, attributes won’t be filtered. If it is False, attributes with display level Expert won’t be shown

setSortKey(sortkey)[source]

sets the key function used to sort the attributes in the form

Parameters:

sortkey (callable) – a function that takes a AttributeInfo as argument and returns a key to use for sorting purposes (e.g. the default sortKey is lambda x:x.name)

setViewFilters(filterlist)[source]

sets the filters to be applied when displaying the attributes

Parameters:

filterlist (sequence<callable>) – a sequence of attr filters. All filters will be applied to each attribute name to decide whether to display it or not. for an attribute to be plotted, the following condition must be true for all filters: bool(filter(attrname))==True

useParentModel

(deprecated))