Bases: taurus.qt.qtgui.container.tauruswidget.TaurusWidget
A form containing specific widgets for interacting with a given list of taurus attributes and/or devices.
Its model is a list of attribute and/or device names to be shown. Each item is represented in a row consisting of a label, a read widget, a write widget, a units widget and an “extra” widget (some of them may not be shown) which are vertically aligned with their counterparts from other items.
By default a TaurusValue object is used for each item, but this can be changed and specific mappings can be defined using the setCustomWidgetMap() method.
By default, the form provides global Apply and Cancel buttons.
You can also see some code that exemplifies the use of TaurusForm in Taurus coding examples
Adds models to the existing ones:
Parameters: | modelNames (:class:~`sequence` <:class:~`str`>) – the names of the models to be added |
---|
See also
launches a model chooser dialog to modify the contents of the form
reimplemented to support dropping of modelnames in forms
Returns the map used to create custom widgets.
Return type: | :class:~`dict` <:class:~`str`, :class:~`tuple`> |
---|---|
Returns: | a dictionary whose keys are device type strings (i.e. see PyTango.DeviceInfo) and whose values are tuples of classname,args,kwargs |
Returns a tuple that can be used for creating a widget for a given model.
Parameters: | model (:class:~`str`) – a taurus model name for which the new item of the form will be created |
---|---|
Return type: | :class:~`tuple` <:class:~`type`, :class:~`list`, :class:~`dict`> |
Returns: | a tuple containing a class, a list of args and a dict of keyword args. The args and the keyword args can be passed to the class constructor |
returns the child item with at the given index position.
returns the child item with given model. If there is more than one item with the same model, the index parameter can be used to distinguish among them Please note that his index is only relative to same-model items!
returns a list of the objects that have been created as childs of the form
whether the user can change the contents of the widget
Return type: | :class:~`bool` |
---|---|
Returns: | True if the user is allowed to modify the look&feel |
Removes models from those already in the form.
Parameters: | modelNames (:class:~`sequence` <:class:~`str`>) – the names of the models to be removed |
---|
See also
Sets a map map for custom widgets.
Parameters: | cwmap (:class:~`dict` <:class:~`str`, :class:~`tuple`>) – a dictionary whose keys are device type strings (i.e. see PyTango.DeviceInfo) and whose values are tuples of classname,args,kwargs |
---|
sets whether the user can change the contents of the form (e.g., via Modify Contents in the context menu) Reimplemented from TaurusWidget.setModifiableByUser()
Parameters: | modifiable (:class:~`bool`) – |
---|
See also
TaurusWidget.setModifiableByUser()
Returns whether this component is using the parent model
Return type: | :class:~`bool` |
---|---|
Returns: | True if using parent model or False otherwise |