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.
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.
whether autoApply mode is enabled or not.
Return type: | :class:~`bool` |
---|---|
Returns: |
whether forcedApply mode is enabled or not.
Return type: | :class:~`bool` |
---|---|
Returns: |
reimplemented from TaurusBaseWidget
Return type: | :class:~`sequence` <:class:~`callable`> |
---|---|
Returns: |
reimplemented from TaurusBaseWidget
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)
reimplemented from TaurusBaseWidget
reimplemented from TaurusBaseWidget
reimplemented from TaurusBaseWidget
resets the autoApply mode (i.e.: sets it to False)
resets the forcedApply mode (i.e.: sets it to False)
reimplemented from TaurusBaseWidget
Sets autoApply mode. In autoApply mode, the widget writes the value automatically whenever it is changed by the user (e.g., when valueChanged() 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 (:class:~`bool`) – True for setting autoApply mode. False for disabling |
---|
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 (:class:~`bool`) – True for setting forcedApply mode. False for disabling |
---|
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 |
---|
reimplemented from TaurusBaseWidget
reimplemented from TaurusBaseWidget
Subclasses should connect some particular signal to this method for indicating that something has changed. e.g., a QLineEdit should connect its “textChanged” signal...
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 (:class:~`bool`) – If True, it behaves as in forceApply mode (even if the forceApply mode is disabled by setForceApply()) |
---|