# `QLed`

digraph inheritancea8c0f85cac { bgcolor=transparent; rankdir=UD; ratio=compress; size="8.0, 12.0"; "QLed" [URL="#taurus.qt.qtgui.display.QLed",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="A Led"]; "QPixmapWidget" -> "QLed" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QObject" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QObject(parent: QObject|None = None)"]; "wrapper" -> "QObject" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QPaintDevice" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QPaintDevice()"]; "simplewrapper" -> "QPaintDevice" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QPixmapWidget" [URL="taurus.qt.qtgui.display-QPixmapWidget.html#taurus.qt.qtgui.display.QPixmapWidget",color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,target="_top",tooltip="This widget displays an image (pixmap). By default the pixmap is"]; "QWidget" -> "QPixmapWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QWidget" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded,tooltip="QWidget(parent: QWidget|None = None, flags: Qt.WindowFlags|Qt.WindowType = Qt.WindowFlags())"]; "QObject" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "QPaintDevice" -> "QWidget" [arrowsize=0.5,style="setlinewidth(0.5)"]; "simplewrapper" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded]; "wrapper" [color=dodgerblue1,fillcolor=white,fontcolor=black,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.5,shape=box,style=rounded]; "simplewrapper" -> "wrapper" [arrowsize=0.5,style="setlinewidth(0.5)"]; }

class QLed(parent=None, designMode=False)

  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:

    > - `QLed.getBlinkingInterval()`

    > - `QLed.setBlinkingInterval()`

    > - `QLed.resetBlinkingInterval()`

  getBlinkingInterval()

    returns the blinking interval

    Returns:

      blinking interval or 0 if blinking is not enabled.

    Return type:

      int

  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.

    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:

    > - `QLed.getLedColor()`

    > - `QLed.setLedColor()`

    > - `QLed.resetLedColor()`

  ledInverted

    False means do not invert the status, True means invert the status

    Access functions:

    > - `QLed.getLedInverted()`

    > - `QLed.setLedInverted()`

    > - `QLed.resetLedInverted()`

    Type:

      This property holds the led inverted

  ledPattern

    This property holds the led pattern name

    Access functions:

    > - `QLed.getLedPatternName()`

    > - `QLed.setLedPatternName()`

    > - `QLed.resetLedPatternName()`

  ledStatus

    False means OFF, True means ON

    Access functions:

    > - `QLed.getLedStatus()`

    > - `QLed.setLedStatus()`

    > - `QLed.resetLedStatus()`

    Type:

      This property holds the led status

  minimumSizeHint()

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

  resetBlinkingInterval()

    resets the blinking interval

  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

  setBlinkingInterval(interval)

    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

  setLedColor(color)

    Sets the led color

    Parameters:

      status (str) – the new color

  setLedInverted(inverted)

    Sets the led inverted mode

    Parameters:

      status (bool) – the new inverted mode

  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

    Parameters:

      status (bool) – the new status

  sizeHint(self) → QSize
  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

  toggleLedStatus()

    toggles the current status of the led