TaurusValueLineEdit
digraph inheritancef2eda76eff {
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"];
"QLineEdit" [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,tooltip="QLineEdit(parent: Optional[QWidget] = None)"];
"QWidget" -> "QLineEdit" [arrowsize=0.5,style="setlinewidth(0.5)"];
"QObject" [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,tooltip="QObject(parent: Optional[QObject] = None)"];
"wrapper" -> "QObject" [arrowsize=0.5,style="setlinewidth(0.5)"];
"QPaintDevice" [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,tooltip="QPaintDevice()"];
"simplewrapper" -> "QPaintDevice" [arrowsize=0.5,style="setlinewidth(0.5)"];
"QWidget" [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,tooltip="QWidget(parent: Optional[QWidget] = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags())"];
"QObject" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"];
"QPaintDevice" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"];
"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.html#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)"];
"TaurusValueLineEdit" [URL="#taurus.qt.qtgui.input.TaurusValueLineEdit",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 taurus-aware ``QLineEdit``. It will display the value (or fragment"];
"QLineEdit" -> "TaurusValueLineEdit" [arrowsize=0.5,style="setlinewidth(0.5)"];
"TaurusBaseWritableWidget" -> "TaurusValueLineEdit" [arrowsize=0.5,style="setlinewidth(0.5)"];
"simplewrapper" [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];
"wrapper" [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];
"simplewrapper" -> "wrapper" [arrowsize=0.5,style="setlinewidth(0.5)"];
}
- class TaurusValueLineEdit(qt_parent=None, designMode=False)[source]
A taurus-aware
QLineEdit
. It will display the value (or fragment of the value) referenced by its model. It is aTaurusBaseWritableWidget
and as such it does not apply the changes straight away to the model (unlessautoApply
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 !
Import from
taurus.qt.qtgui.input
as:from taurus.qt.qtgui.input import TaurusValueLineEdit
- autoApply
- pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,
designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute
type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.
- enableWheelEvent
- pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,
designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute
type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.
- forcedApply
- pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,
designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute
type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.
- 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)
- isTextValid()[source]
Validates current text
- Returns:
Returns False if there is a validator and the current text is not Acceptable. Returns True otherwise.
- Return type:
bool
- model
- pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,
designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute
type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.
- setEnabled(enabled)[source]
Reimplement from
QLineEdit
to avoid autoenabling if the widget is explicitly disabled (but allow auto-disabling if the widget is explicitly enabled)
- useParentModel
- pyqtProperty(type, fget=None, fset=None, freset=None, fdel=None, doc=None,
designable=True, scriptable=True, stored=True, user=False, constant=False, final=False, notify=None, revision=0) -> property attribute
type is the type of the property. It is either a type object or a string that is the name of a C++ type. freset is a function for resetting an attribute to its default value. designable sets the DESIGNABLE flag (the default is True for writable properties and False otherwise). scriptable sets the SCRIPTABLE flag. stored sets the STORED flag. user sets the USER flag. constant sets the CONSTANT flag. final sets the FINAL flag. notify is the NOTIFY signal. revision is the REVISION. The other parameters are the same as those required by the standard Python property type. Properties defined using pyqtProperty behave as both Python and Qt properties. Decorators can be used to define new properties or to modify existing ones.