TaurusLabel

Inheritance diagram of TaurusLabel
class TaurusLabel(parent=None, designMode=False)[source]

Bases: PyQt4.QtGui.QLabel, taurus.qt.qtgui.base.taurusbase.TaurusBaseWidget

DefaultAlignment = <PyQt4.QtCore.Alignment object>
DefaultAutoTrim = True
DefaultBgRole = 'quality'
DefaultFgRole = 'rvalue'
DefaultModelIndex = None
DefaultPrefix = ''
DefaultShowText = True
DefaultSuffix = ''
autoTrim

This property holds the

Access functions:

bgRole

This property holds the background role. Valid values are ‘’/’None’, ‘quality’, ‘state’

Access functions:

controller()[source]
controllerUpdate()[source]
displayValue(v)[source]

Reimplementation of displayValue for TaurusLabel

dragEnabled

This property holds the

Access functions:

  • TaurusLabel.isDragEnabled()
  • TaurusLabel.setDragEnabled()
  • TaurusLabel.resetDragEnabled()
fgRole

This property holds the foreground role (the text). Valid values are:

  1. ‘’/’None’ - no value is displayed
  2. ‘value’ - the value is displayed
  3. ‘w_value’ - the write value is displayed
  4. ‘quality’ - the quality is displayed
  5. ‘state’ - the device state is displayed

Access functions:

getAutoTrim()[source]
getBgRole()[source]
getFgRole()[source]
getModelIndex()[source]
getModelIndexValue()[source]
getModelMimeData()[source]
getPermanentText()[source]
getPrefixText()[source]
classmethod getQtDesignerPluginInfo()[source]
getSuffixText()[source]
handleEvent(evt_src, evt_type, evt_value)[source]
hasDynamicTextInteractionFlags()[source]
isReadOnly()[source]
model

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:

See also

Model concept

modelIndex

This property holds the index inside the model value that should be displayed

Access functions:

See also

Model concept

prefixText

This property holds a prefix text

Access functions:

resetAutoTrim()[source]
resetBgRole()[source]
resetFgRole()[source]
resetModelIndex()[source]
resetPrefixText()[source]
resetSuffixText()[source]
resetTextInteractionFlags()[source]
resizeEvent(event)[source]
setAutoTrim(trim)[source]
setBgRole(bgRole)[source]

Set the background role. The label background will be set according to the current palette and the role. Valid roles are: - ‘none’ : no background - ‘state’ a color depending on the device state - ‘quality’ a color depending on the attribute quality - ‘value’ a color depending on the rvalue of the attribute - <arbitrary member name> a color based on the value of an arbitrary

member of the model object (warning: experimental feature!)

Warning

the <arbitrary member name> support is still experimental and its API may change in future versions

setDynamicTextInteractionFlags(flags)[source]
setFgRole(fgRole)[source]
setModel(m)[source]
setModelIndex(modelIndex)[source]
setPrefixText(prefix)[source]
setSuffixText(suffix)[source]
setText(text)[source]

Reimplementation of setText to set permanentText

setTextInteractionFlags(flags)[source]
setText_(text)[source]

Method to expose QLabel.setText

showValueDialog(*args)[source]
suffixText

This property holds a suffix text

Access functions:

textInteractionFlags

Specifies how the label should interact with user input if it displays text.

useParentModel

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

Model concept