QLed

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

A Led drawn with png files

Import from taurus.qt.qtgui.display as:

from taurus.qt.qtgui.display import QLed
DefaultLedPattern = 'leds_images256:led_{color}_{status}.png'
getLedPatternName()[source]

Returns the current led pattern name :return: led pattern name :rtype: str

classmethod getQtDesignerPluginInfo()[source]
isLedColorValid(name)[source]

Determines if the given color name is valid.

Parameters:

color (str) – the color

Returns:

True is the given color name is valid or False otherwise

Return type:

bool

ledColor

This property holds the led color

Access functions:

ledPattern

This property holds the led pattern name

Access functions:

resetLedPatternName()[source]

Resets the led pattern to leds/images256/led_{color}_{status}.png

setLedColor(color: str)[source]

Sets the led color

Parameters:

status (str) – the new color

setLedPatternName(name)[source]

Sets the led pattern name. Should be a string containing a path to valid images. The string can contain the keywords:

  1. {status} - transformed to ‘on’ of ‘off’ according to the status

  2. {color} - transformed to the current led color

Example: :leds/images256/led_{color}_{status}.png will be transformed to :leds/images256/led_red_on.png when the led status is True and the led color is red.

Parameters:

name (str) – new pattern

sizeHint(self) → QSize[source]
toLedName(status=None, color=None, inverted=None)[source]

Gives the led name for the given status and color. If status or color are not given, the current led status or color are used.

Parameters:
  • status (bool) – the status

  • color (str) – the color

Returns:

string containing the led name

Return type:

str