Bases: PyQt4.QtGui.QLabel, taurus.qt.qtgui.base.taurusbase.TaurusBaseWidget
A widget that represents the read value of an attribute.
Deprecated since version Use: taurus.qt.qtgui.display.TaurusLabel instead.
The following features are present:
- The background color changes with the attribute quality according to the Taurus color guide
- The attribute value is displayed according to the attribute format
- Supports all data types and formats (although it is designed mainly for SCALAR format)
- A tooltip is automatically generated displaying additional attribute information
- If the size of the widget is too small to display the entire value, the text changes to a symbolic link that opens a dialog with the attribute value when clicked
This widget emits the following signals (excluding signals of the super classes):
Example:
import sys
from taurus.qt import Qt
from taurus.qt.qtgui.display import TaurusValueLabel
app = Qt.QApplication(sys.argv)
w = TaurusValueLabel()
w.model = 'sys/taurustest/1/position'
w.setVisible(True)
sys.exit(app.exec_())
either or not to show the state as a background color
either or not to show the state as a background color
reimplemented to check that the display fits the size each time that the value changes
This property holds the unique URI string representing the model name with which this widget will get its data from. The convention used for the string can be found here.
In case the property useParentModel is set to True, the model text must start with a ‘/’ followed by the attribute name.
Access functions:
- TaurusBaseWidget.getModel()
- TaurusValueLabel.setModel()
- TaurusBaseWidget.resetModel()
See also
Whether or not to show the device state as background color. Note: obviously, setShowState(True) forces setShowQuality(False) !
Whether or not to show the value as background color. The attribute value must be a state! Note: obviously, forces setShowState(False) and setShowQuality(False)
This property holds whether or not this widget should fill the background with the attribute quality/device state according to the Taurus color guide
Access functions:
- TaurusBaseWidget.getShowQuality()
- TaurusBaseWidget.setShowQuality()
- TaurusBaseWidget.resetShowQuality()
See also
This property holds whether or not this widget should display the current value of the model as text. Setting this to False is useful when you just want to represent the quality/state as background color in a small space
Access functions:
- TaurusBaseWidget.getShowText()
- TaurusBaseWidget.setShowText()
- TaurusBaseWidget.resetShowText()
This property holds the contents of a the popup menu as an XML string.
Access functions:
- TaurusBaseWidget.getTaurusPopupMenu()
- TaurusBaseWidget.setTaurusPopupMenu()
- TaurusBaseWidget.resetTaurusPopupMenu()
See also
This property holds whether or not this widget should search in the widget hierarchy for a model prefix in a parent widget.
Access functions:
- TaurusBaseWidget.getUseParentModel()
- TaurusBaseWidget.setUseParentModel()
- TaurusBaseWidget.resetUseParentModel()
See also
Checks that the display fits in the widget and sets it to ”...” if it does not