# `TaurusBaseWritableWidget`

digraph inheritanced5a1d7a92b { 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"]; "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)"]; "TaurusBaseWritableWidget" [URL="#taurus.qt.qtgui.base.TaurusBaseWritableWidget",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 taurus input widgets"]; "TaurusBaseWidget" -> "TaurusBaseWritableWidget" [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)"]; }

class TaurusBaseWritableWidget(name='', taurus_parent=None, designMode=False, **kwargs)

  The base class for all taurus input widgets

  it emits the applied signal when the value has been applied.

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

      from taurus.qt.qtgui.base import TaurusBaseWritableWidget

  property applied

    Base signal applied

  forceApply()

    It (re)applies the value regardless of pending operations. WARNING: USE WITH CARE. In most cases what you need is to make sure that pending operations are properly created, not calling this method

    It emits the applied signal if apply is not aborted.

  getAutoApply()

    whether autoApply mode is enabled or not.

    Returns:

      True if autoApply is enabled. False otherwise

    Return type:

      bool

  getDisplayValue(cache=True, fragmentName=None, *, key=<class 'taurus.qt.qtgui.base.taurusbase._DEFAULT'>)

    Reimplemented from class:TaurusBaseWidget

  getForcedApply()

    whether forcedApply mode is enabled or not.

    Returns:

      True if forceApply is enabled. False otherwise

    Return type:

      bool

  getModelClass(*, key=<class 'taurus.qt.qtgui.base.taurusbase._DEFAULT'>)

    reimplemented from `TaurusBaseWidget`

  getOperationCallbacks()

    returns the operation callbacks (i.e., a sequence of methods that will be called after an operation is executed (this default implementation it returns an empty list).

    Returns:

      list of operations

    Return type:

      sequence<callable>

  classmethod getQtDesignerPluginInfo()

    reimplemented from `TaurusBaseWidget`

  getValue()

    This method must be implemented in derived classes to return the value to be written. Note that this may differ from the displayed value (e.g. for a numeric value being edited by a QLineEdit-based widget, the displayed value will be a string while getValue will return a number)

  handleEvent(src, evt_type, evt_value)

    reimplemented from `TaurusBaseWidget`

  isReadOnly()

    reimplemented from `TaurusBaseWidget`

  notifyValueChanged(*args)

    Subclasses should connect some particular signal to this method for indicating that something has changed. e.g., a QLineEdit should connect its “textChanged” signal…

    Parameters:

      args – arbitrary signal parameters (ignored in this basic implementation)

  postAttach(*, key=<class 'taurus.qt.qtgui.base.taurusbase._DEFAULT'>)

    reimplemented from `TaurusBaseWidget` to update the widget value using the default model’s wvalue

    Parameters:

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

  resetAutoApply()

    resets the autoApply mode (i.e.: sets it to False)

  resetForcedApply()

    resets the forcedApply mode (i.e.: sets it to False)

  resetPendingOperations()

    reimplemented from `TaurusBaseWidget`

  setAutoApply(auto)

    Sets autoApply mode. In autoApply mode, the widget writes the value automatically whenever it is changed by the user (e.g., when `notifyValueChanged()` is called). If False, a value changed just flags a “pending operation” which needs to be applied manually by the user before the value gets written.

    Parameters:

      auto (bool) – True for setting autoApply mode. False for disabling

  setForcedApply(forced)

    Sets the forcedApply mode. In forcedApply mode, values are written even if there are not pending operations (e.g. even if the displayed value is the same as the currently applied one).

    Parameters:

      forced (bool) – True for setting forcedApply mode. False for disabling

  setValue(v)

    This method must be implemented in derived classes to provide a (widget-specific) way of updating the displayed value based on a given attribute value

    # noqa: DAR401

    Parameters:

      v – The attribute value

  updatePendingOperations()

    reimplemented from `TaurusBaseWidget`

  updateStyle()

    reimplemented from `TaurusBaseWidget`

  valueChanged(**kwargs)

    Deprecated since version 4.0: Use notifyValueChanged instead

  writeValue(forceApply=False)

    Writes the value to the attribute, either by applying pending operations or (if the ForcedApply flag is True), it writes directly when no operations are pending

    It emits the applied signal if apply is not aborted.

    Parameters:

      forceApply (bool) – If True, it behaves as in forceApply mode (even if the forceApply mode is disabled by `setForceApply()`)