TaurusLockButton

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

Import from taurus.qt.qtgui.button as:

from taurus.qt.qtgui.button import TaurusLockButton
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

dict

get_lock_info(cache=False)[source]
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

on_toggle(down)[source]
setModel(model, **kwargs)[source]

Sets/unsets the model name for the given key. If key is MLIST, a model is set for each name in the model sequence, new model keys are automatically added to the object’s modelList attribute and the corresponding models are attached using those keys. The new keys are of the form (MLIST, i) where i is the index of the corresponding model name in the model sequence.

Parameters
  • model (str (or sequence of str if key is MLIST)) – the new model name. If key is MLIST, model is expected to be a sequence of model names.

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

update_button(lock_info=None)[source]