TaurusCommandsForm
¶

-
class
TaurusCommandsForm
(parent=None, designMode=False)[source]¶ Bases:
taurus.qt.qtgui.container.tauruswidget.TaurusWidget
A form that shows commands available for a Device Server
-
applyConfig
(configdict, **kwargs)[source]¶ extending
TaurusBaseWidget.applyConfig()
to restore the splitter configParameters: configdict ( dict
) –See also
TaurusBaseWidget.applyConfig()
,createConfig()
-
createConfig
(allowUnpickable=False)[source]¶ extending
TaurusBaseWidget.createConfig()
:type alllowUnpickable:bool
:param alllowUnpickable:Return type: dict
<str
,object
>Returns: configurations (which can be loaded with applyConfig()
).
-
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 }
Return type: dict
Returns: a map with pertinent designer information
-
getSplitter
()[source]¶ returns the splitter that separates the command buttons area from the output area
Return type: QSplitter
Returns:
-
getViewFilters
()[source]¶ returns the filters used in deciding which commands are displayed
Return type: sequence
<callable
>Returns: a sequence of filters
-
setDefaultParameters
(params)[source]¶ sets the values that will appear by default in the parameters combo box, the command combo box for the command will be editable only if the first parameter is an empty string
Parameters: params ( dict
<str
,list
>) – { ‘cmd_name’: [‘parameters string 1’, ‘parameters string 2’ ] }
-
setExpertView
(expert)[source]¶ sets the expert view mode
Parameters: expert ( bool
) – If expert is True, commands won’t be filtered. If it is False, commands with display level Expert won’t be shown
-
setSortKey
(sortkey)[source]¶ sets the method used to sort the commands (cmd_name by default)
Parameters: sortkey ( callable
) – a function that takes aCommandInfo
as argument and returns a key to use for sorting purposes (e.g. the default sortKey islambda x:x.cmd_name
)
-
setViewFilters
(filterlist)[source]¶ sets the filters to be applied when displaying the commands
Parameters: filterlist ( sequence
<callable
>) – a sequence of command filters. All filters will be applied to each command to decide whether to display it or not. for a command to be plotted, the following condition must be true for all filters: bool(filter(command))==True
-