taurus taurus

Previous topic

QFallBackWidget

Next topic

QLedOld

This Page

QLed

Inheritance diagram of QLed

class QLed(parent=None, designMode=False)

Bases: taurus.qt.qtgui.display.qpixmapwidget.QPixmapWidget

A Led

DefaultLedColor = 'green'
DefaultLedInverted = False
DefaultLedPattern = ':leds/images256/led_{color}_{status}.png'
DefaultLedStatus = True
getLedColor()

Returns the led color :return: led color :rtype: str

getLedInverted()

Returns if the led is inverted. :return: inverted mode :rtype: bool

getLedPatternName()

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

getLedStatus()

Returns the led status :return: led status :rtype: bool

classmethod getQtDesignerPluginInfo()
isLedColorValid(name)

Determines if the given color name is valid. :param color: the color :type color: str :return: True is the given color name is valid or False otherwise :rtype: bool

ledColor

This property holds the led color

Access functions:

ledInverted

This property holds the led inverted: False means do not invert the

Access functions:

ledPattern

This property holds the led pattern name

Access functions:

ledStatus

This property holds the led status: False means OFF, True means ON

Access functions:

minimumSizeHint()

Overwrite the default minimum size hint (0,0) to be (16,16) :return: the minimum size hint 16,16 :rtype: PyQt4.Qt.QSize

resetLedColor()

Resets the led color

resetLedInverted()

Resets the led inverted mode

resetLedPatternName()

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

resetLedStatus()

Resets the led status

setLedColor(color)

Sets the led color :param status: the new color :type status: str

setLedInverted(inverted)

Sets the led inverted mode :param status: the new inverted mode :type status: bool

setLedPatternName(name)

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
setLedStatus(status)

Sets the led status :param status: the new status :type status: bool

sizeHint()
toLedName(status=None, color=None, inverted=None)

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