# `TaurusValue`

digraph inheritancebae9b723ba { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "BaseConfigurableClass" [URL="taurus.qt.qtcore.configuration-BaseConfigurableClass.html#taurus.qt.qtcore.configuration.BaseConfigurableClass",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="A base class defining the API for configurable objects."]; "Logger" [URL="taurus-Logger.html#taurus.Logger",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="The taurus logger class. All taurus pertinent classes should inherit"]; "QObject" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QObject(parent: QObject|None = None)"]; "wrapper" -> "QObject" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QPaintDevice" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QPaintDevice()"]; "simplewrapper" -> "QPaintDevice" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QWidget" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QWidget(parent: QWidget|None = None, flags: Qt.WindowFlags|Qt.WindowType = Qt.WindowFlags())"]; "QObject" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QPaintDevice" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusBaseComponent" [URL="taurus.qt.qtgui.base-TaurusBaseComponent.html#taurus.qt.qtgui.base.TaurusBaseComponent",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="A generic Taurus component."]; "TaurusListener" -> "TaurusBaseComponent" [arrowsize=0.5,style="setlinewidth(0.5)"]; "BaseConfigurableClass" -> "TaurusBaseComponent" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusBaseWidget" [URL="taurus.qt.qtgui.base-TaurusBaseWidget.html#taurus.qt.qtgui.base.TaurusBaseWidget",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="The base class for all Qt Taurus widgets."]; "TaurusBaseComponent" -> "TaurusBaseWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusListener" [URL="taurus.core.tauruslistener-TaurusListener.html#taurus.core.tauruslistener.TaurusListener",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="TaurusListener Interface"]; "Logger" -> "TaurusListener" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusValue" [URL="#taurus.qt.qtgui.panel.TaurusValue",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="Internal TaurusValue class"]; "QWidget" -> "TaurusValue" [arrowsize=0.5,style="setlinewidth(0.5)"]; "TaurusBaseWidget" -> "TaurusValue" [arrowsize=0.5,style="setlinewidth(0.5)"]; "simplewrapper" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded]; "wrapper" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded]; "simplewrapper" -> "wrapper" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class TaurusValue(parent=None, designMode=False, customWidgetMap=None)

  Internal TaurusValue class

  Warning

  `TaurusValue` (and any derived class from it) should never be instantiated directly. It is designed to be instantiated by a `TaurusForm` class, since it breaks some conventions on the way it manages layouts of its parent model.

  Import from `taurus.qt.qtgui.panel` as:

      from taurus.qt.qtgui.panel import TaurusValue

  addCustomWidgetToLayout(**kwargs)

    Deprecated since version 4.6.5: Use item factories instead

  addExtraWidgetToLayout()
  addLabelWidgetToLayout()
  addReadWidgetToLayout()
  addUnitsWidgetToLayout()
  addWriteWidgetToLayout()
  allowWrite
    pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

      designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute

    type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.

  applyConfig(configdict, **kwargs)

    extending `TaurusBaseWidget.applyConfig()` to restore the subwidget’s classes

    Parameters:

      configdict (dict)

    See also

    `TaurusBaseWidget.applyConfig()`, `createConfig()`

  createConfig(allowUnpickable=False)

    extending `TaurusBaseWidget.createConfig()` to store also the class names for subwidgets

    Parameters:

      alllowUnpickable (bool)

    Returns:

      configurations (which can be loaded with `applyConfig()`).

    Return type:

      dict<str,object>

  customWidget(**kwargs)

    Returns the custom widget

    Deprecated since version 4.6.5: Use item factories instead

  customWidgetClassFactory(**kwargs)

    Deprecated since version 4.6.5: Use item factories instead

  extraWidget()

    Returns the extra widget

  extraWidgetClass
    pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

      designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute

    type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.

  extraWidgetClassFactory(classID)
  getAllowWrite()
  getCustomWidgetClass(**kwargs)

    Deprecated since version 4.6.5: Use item factories instead

  getCustomWidgetMap(**kwargs)

    Returns the map used to create custom widgets.

    Returns:

      a dictionary whose keys are device type strings (i.e. see `PyTango.DeviceInfo`) and whose values are widgets to be used

    Return type:

      dict<str,Qt.QWidget>

    Deprecated since version 4.6.5: Use item factories instead

  getDefaultCustomWidgetClass(**kwargs)

    Deprecated since version 4.6.5: Use item factories instead

  getDefaultExtraWidgetClass()
  getDefaultLabelWidgetClass()
  getDefaultReadWidgetClass(returnAll=False)

    Returns the default class (or classes) to use as read widget for the current model.

    Parameters:

      returnAll (bool) – if True, the return value is a list of valid classes instead of just one class

    Returns:

      the default class to use for the read widget (or, if returnAll==True, a list of classes that can show the attribute ). If a list is returned, it will be loosely ordered by preference, being the first element always the default one.

    Return type:

      class or list<class>

  getDefaultUnitsWidgetClass()
  getDefaultWriteWidgetClass(returnAll=False)

    Returns the default class (or classes) to use as write widget for the current model.

    Parameters:

      returnAll (bool) – if True, the return value is a list of valid classes instead of just one class

    Returns:

      the default class to use for the write widget (or, if returnAll==True, a list of classes that can show the attribute ). If a list is returned, it will be loosely ordered by preference, being the first element always the default one.

    Return type:

      class or list<class>

  getExtraWidgetClass()
  getLabelConfig()
  getLabelWidgetClass()
  getModelClass(**kwargs)

    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

  getPreferredRow()
  classmethod getQtDesignerPluginInfo()

    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

  getReadWidgetClass()
  getRow()
  getSwitcherClass()

    Returns the TaurusValue switcher class (used in compact mode). Override this method if you want to use a custom switcher in TaurusValue subclasses.

  getUnitsWidgetClass()
  getWriteWidgetClass()
  handleEvent(evt_src, evt_type, evt_value)

    Reimplemented from `TaurusBaseWidget.handleEvent()` to update subwidgets on config events

  hasPendingOperations()

    self.getPendingOperations will always return an empty list, but still self.hasPendingOperations will look at the writeWidget’s operations. If you want to ask the TaurusValue for its pending operations, call self.writeWidget().getPendingOperations()

  isCompact()
  isReadOnly()

    Determines if this component is read-only or not in the sense that the user can interact with it. Default implementation returns True.

    Override when necessary.

    Returns:

      whether or not this component is read-only

    Return type:

      bool

  isValueChangedByUser()
  labelConfig
    pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

      designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute

    type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.

  labelWidget()

    Returns the label widget

  labelWidgetClass
    pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

      designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute

    type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.

  labelWidgetClassFactory(classID)
  minimumHeight(self) → int
  model
    pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

      designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute

    type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.

  modifiableByUser
    pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

      designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute

    type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.

  onChangeLabelConfig()
  onChangeReadWidget()
  onChangeWriteWidget()
  onSetFormatter()

    Reimplemented to call onSetFormatter of the read widget (if provided)

  parentModelChanged(parentmodel_name)

    Invoked when the parent model changes

    Parameters:

      parentmodel_name (str) – the new name of the parent model

  preferredRow
    pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

      designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute

    type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.

  readWidget(followCompact=False)

    Returns the read widget. If followCompact=True, and compact mode is used, it returns the switcher’s readWidget instead of the switcher itself.

  readWidgetClass
    pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

      designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute

    type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.

  readWidgetClassFactory(classID)
  resetAllowWrite()
  resetCustomWidgetClass(**kwargs)

    Deprecated since version 4.6.5: Use item factories instead

  resetExtraWidgetClass()
  resetLabelConfig()
  resetLabelWidgetClass()
  resetPreferredRow()
  resetReadWidgetClass()
  resetUnitsWidgetClass()
  resetWriteWidgetClass()
  setAllowWrite(mode)
  setCompact(compact)
  setCustomWidgetClass(**kwargs)

    substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

    Deprecated since version 4.6.5: Use item factories instead

  setCustomWidgetMap(**kwargs)

    Sets a map map for custom widgets.

    Parameters:

      cwmap (dict<str,Qt.QWidget>) – a dictionary whose keys are device class strings (see `PyTango.DeviceInfo`) and whose values are widget classes to be used

    Deprecated since version 4.6.5: Use item factories instead

  setDangerMessage(dangerMessage=None)

    Sets the danger message when applying an operation. If dangerMessage is None, the apply operation is considered safe

    Parameters:

      dangerMessage (str or None) – the danger message. If None is given (default) the apply operation is considered safe

  setExtraWidgetClass(classID)

    substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

  setForceDangerousOperations(yesno)

    Forces/clears the dangerous operations

    Parameters:

      yesno (bool) – force or not the dangerous operations

  setFormat(format)

    Reimplemented to call setFormat of the read widget (if provided)

  setLabelConfig(config)

    Sets fragment configuration to the label widget.

    Parameters:

      config (str) – fragment

  setLabelWidgetClass(classID)

    substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

  setMinimumHeight(self, minh: int)
  setModel(model, **kwargs)

    extending `TaurusBaseWidget.setModel()` to change the modelclass dynamically and to update the subwidgets

  setParent(self, parent: QWidget | None)
  setParent(self, parent: QWidget | None, f: Qt.WindowFlags | Qt.WindowType)
  setPreferredRow(row)
  setReadWidgetClass(classID)

    substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

  setUnitsWidgetClass(classID)

    substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

  setVisible(self, visible: bool)
  setWriteWidgetClass(classID)

    substitutes the current widget by a new one. classID can be one of: None, ‘Auto’, a TaurusWidget class name, or any class

  unitsWidget()

    Returns the units widget

  unitsWidgetClass
    pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

      designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute

    type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.

  unitsWidgetClassFactory(classID)
  updateCustomWidget(**kwargs)

    Deprecated since version 4.6.5: Use item factories instead

  updateExtraWidget()
  updateLabelWidget()
  updatePendingOpsStyle()

    This method should be reimplemented by derived classes that want to change their appearance depending whether there are pending operations or not

  updateReadWidget()
  updateUnitsWidget()
  updateWriteWidget()
  writeWidget(followCompact=False)

    Returns the write widget. If followCompact=True, and compact mode is used, it returns the switcher’s writeWidget instead of None.

  writeWidgetClass
    pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,

      designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute

    type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.

  writeWidgetClassFactory(classID, ignoreCompact=False)