TaurusValueLineEdit

Inheritance diagram of TaurusValueLineEdit
class TaurusValueLineEdit(qt_parent=None, designMode=False)[source]

Bases: PyQt4.QtGui.QLineEdit, taurus.qt.qtgui.base.taurusbase.TaurusBaseWritableWidget

A taurus-aware QLineEdit. It will display the value (or fragment of the value) referenced by its model. It is a TaurusBaseWritableWidget and as such it does not apply the changes straight away to the model (unless autoApply is enabled), but instead shows that there are pending operations which can be applied by pressing “ENTER”.

When used with numerical value Attributes as its model, it provides some extended behaviour:

  • It represents out-of-limit values using different colours (for warning, range, invalid,...)
  • It uses a validator that is range-aware
  • The mouse wheel and keyboard arrows can be enabled for doing value increments

Note

when used with models whose value is a pint Quantity, the text is parsed by pint and therefore one can write e.g. 2 3 mm which is equivalent to 6 mm !

autoApply

whether autoApply mode is enabled or not.

Return type:bool
Returns:
enableWheelEvent
forcedApply

whether forcedApply mode is enabled or not.

Return type:bool
Returns:
getEnableWheelEvent()[source]
classmethod getQtDesignerPluginInfo()[source]
getSingleStep()[source]
getValue()[source]
handleEvent(evt_src, evt_type, evt_value)[source]
isTextValid()[source]

Validates current text

Return type:bool
Returns:Returns False if there is a validator and the current text is not Acceptable. Returns True otherwise.
keyPressEvent(evt)[source]

Key press event handler

model

Returns the model name for this component.

Return type:str
Returns:the model name.
notifyValueChanged(*args)[source]

reimplement to avoid autoapply on every partial edition

resetEnableWheelEvent()[source]
resetSingleStep()[source]
setEnableWheelEvent(b)[source]
setSingleStep(step)[source]
setValue(v)[source]

Set the displayed text from a given value object

updateStyle()[source]

Reimplemented from TaurusBaseWritableWidget

useParentModel

Returns whether this component is using the parent model

Return type:bool
Returns:True if using parent model or False otherwise
wheelEvent(evt)[source]

Wheel event handler