TaurusBaseWritableWidget

Inheritance diagram of TaurusBaseWritableWidget
class TaurusBaseWritableWidget(name='', taurus_parent=None, designMode=False, **kwargs)[source]

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()[source]

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()[source]

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'>)[source]

Reimplemented from class:TaurusBaseWidget

getForcedApply()[source]

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'>)[source]

reimplemented from TaurusBaseWidget

getOperationCallbacks()[source]

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()[source]

reimplemented from TaurusBaseWidget

getValue()[source]

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)[source]

reimplemented from TaurusBaseWidget

isReadOnly()[source]

reimplemented from TaurusBaseWidget

notifyValueChanged(*args)[source]

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'>)[source]

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()[source]

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

resetForcedApply()[source]

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

resetPendingOperations()[source]

reimplemented from TaurusBaseWidget

setAutoApply(auto)[source]

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)[source]

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)[source]

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()[source]

reimplemented from TaurusBaseWidget

updateStyle()[source]

reimplemented from TaurusBaseWidget

valueChanged(**kwargs)

Deprecated since version 4.0: Use notifyValueChanged instead

writeValue(forceApply=False)[source]

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())