QLed
- class QLed(parent=None, designMode=False)[source]
A Led
Import from
taurus.qt.qtgui.display
as:from taurus.qt.qtgui.display import QLed
- DefaultBlinkingInterval = 0
- DefaultLedColor = 'green'
- DefaultLedInverted = False
- DefaultLedPattern = 'leds_images256:led_{color}_{status}.png'
- DefaultLedStatus = True
- blinkingInterval
This property holds the blinking interval in millisecs. 0 means no blinking
Access functions:
- getBlinkingInterval()[source]
returns the blinking interval
- Returns:
blinking interval or 0 if blinking is not enabled.
- Return type:
- getLedPatternName()[source]
Returns the current led pattern name :return: led pattern name :rtype: str
- ledColor
This property holds the led color
Access functions:
- ledInverted
False means do not invert the status, True means invert the status
Access functions:
- Type:
This property holds the led inverted
- ledPattern
This property holds the led pattern name
Access functions:
- ledStatus
False means OFF, True means ON
Access functions:
- Type:
This property holds the led status
- minimumSizeHint()[source]
Overwrite the default minimum size hint (0,0) to be (16,16) :return: the minimum size hint 16,16 :rtype: PyQt5.Qt.QSize
- setBlinkingInterval(interval)[source]
sets the blinking interval (the time between status switching). Set to a nonpositive number for disabling blinking
- Parameters:
interval (int) – the blinking interval in millisecs. Set to 0 for disabling blinking
- setLedInverted(inverted)[source]
Sets the led inverted mode
- Parameters:
status (bool) – the new inverted mode
- setLedPatternName(name)[source]
Sets the led pattern name. Should be a string containing a path to valid images. The string can contain the keywords:
{status} - transformed to ‘on’ of ‘off’ according to the status
{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