TaurusLed
¶

-
class
TaurusLed
(parent=None, designMode=False)[source]¶ Bases:
taurus.qt.qtgui.display.qled.QLed
,taurus.qt.qtgui.base.taurusbase.TaurusBaseWidget
A widget designed to represent with a LED image the state of a device, the value of a boolean attribute or the quality of an attribute.
-
DefaultFgRole
= 'rvalue'¶
-
DefaultModelIndex
= None¶
-
DefaultOffColor
= 'black'¶
-
DefaultOnColor
= 'green'¶
-
fgRole
¶ This property holds the foreground role. Valid values are:
- ‘value’ - the value is used
- ‘w_value’ - the write value is used
- ‘quality’ - the quality is used
Access functions:
-
getModelIndexValue
()[source]¶ Called inside getDisplayValue to use with spectrum attributes. By default not used, but some widget might want to support this feature.
Override when needed.
-
classmethod
getQtDesignerPluginInfo
()[source]¶ Returns pertinent information in order to be able to build a valid QtDesigner widget plugin.
The dictionary returned by this method should contain at least the following keys and values: - ‘module’ : a string representing the full python module name (ex.: ‘taurus.qt.qtgui.base’) - ‘icon’ : a string representing valid resource icon (ex.: ‘designer:combobox.png’) - ‘container’ : a bool telling if this widget is a container widget or not.
This default implementation returns the following dictionary:
{ 'group' : 'Taurus [Unclassified]', 'icon' : 'logos:taurus.png', 'container' : False }
Return type: dict
Returns: a map with pertinent designer information
-
handleEvent
(evt_src, evt_type, evt_value)[source]¶ very basic and generalistic handling of events.
Override when necessary.
Parameters: - evt_src (
object
orNone
) – object that triggered the event - evt_type (
TaurusEventType
orNone
) – type of event - evt_value (
object
orNone
) – event value
- evt_src (
-
isReadOnly
()[source]¶ Determines if this component is read-only or not in the sense that the user can interact with it. Default implementation returns True.
Override when necessary.
Return type: bool
Returns: whether or not this component is read-only
-
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.
Access functions:
TaurusBaseWidget.getModel()
TaurusLabel.setModel()
TaurusBaseWidget.resetModel()
See also
-
modelIndex
¶ This property holds the index inside the model value that should be displayed
Access functions:
See also
-
offColor
¶ This property holds the preferred led color This value is used for the cases where the model value does not contain enough information to distinguish between different Off colors. For example, a bool attribute, when it is False it is displayed with the off led but when it is true it may be displayed On in any color. The prefered color would be used in this case.
Access functions:
-
onColor
¶ This property holds the preferred led color This value is used for the cases where the model value does not contain enough information to distinguish between different On colors. For example, a bool attribute, when it is False it is displayed with the off led but when it is true it may be displayed On in any color. The prefered color would be used in this case.
Access functions:
-
setModel
(m)[source]¶ Sets/unsets the model name for this component
Parameters: model ( str
) – the new model name
-
setOffColor
(color)[source]¶ Sets the preferred led off color :param status: the new off color :type status: str
-
setOnColor
(color)[source]¶ Sets the preferred led on color :param status: the new on color :type status: str
-
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
-