TaurusBaseWritableWidget

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

Bases: taurus.qt.qtgui.base.taurusbase.TaurusBaseWidget

The base class for all taurus input widgets

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

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.

Return type:bool
Returns:
getDisplayValue(cache=True, fragmentName=None)[source]

Reimplemented from class:TaurusBaseWidget

getForcedApply()[source]

whether forcedApply mode is enabled or not.

Return type:bool
Returns:
getModelClass()[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).
Return type:sequence <callable>
Returns:
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...

postAttach()[source]

reimplemented from TaurusBaseWidget

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

Parameters:v – The attribute value
updatePendingOperations()[source]

reimplemented from TaurusBaseWidget

updateStyle()[source]

reimplemented from TaurusBaseWidget

valueChanged(*args, **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())