4.57. umbra.ui.widgets.notification_QLabel — Umbra 1.0.4 documentation

### Navigation

- index
- modules |
- next |
- previous |
- Umbra 1.0.4 documentation »
- 4. Api »

# 4.57. umbra.ui.widgets.notification_QLabel

notification_QLabel.py

Platform:
  Windows, Linux, Mac Os X.
Description:
  This module defines the `Notification_QLabel` class.
Others:
  Portions of the code and logic from Prymatex: https://github.com/D3f0/prymatex/blob/master/prymatex/gui/widgets/overlay.py

## 4.57.1. Module Attributes

`umbra.ui.widgets.notification_QLabel.` `LOGGER`

## 4.57.2. Classes

class `umbra.ui.widgets.notification_QLabel.` `Notification_QLabel`(parent=None, color=None, backgroundColor=None, borderColor=None, anchor=None, horizontalPadding=None, verticalPadding=None, horizontalOffset=None, verticalOffset=None, fadeSpeed=None, targetOpacity=None, duration=None)

  Bases: `PyQt4.QtGui.QLabel`

  This class is a QLabel subclass providing a notification label with fading capabilities.

  Parameters: | parent – Widget parent. ( QObject ) color – Widget text color. ( QColor ) backgroundColor – Widget background color. ( QColor ) borderColor – Widget border color. ( QColor ) anchor – Widget anchoring area ( From 0 to 8 ). ( Integer ) horizontalPadding – Left padding relative to parent Widget. ( Integer ) verticalPadding – Bottom padding relative to parent Widget. ( Integer ) horizontalOffset – Widget horizontal offset. ( Integer ) verticalOffset – Widget vertical offset. ( Integer ) fadeSpeed – Notification fading speed. ( Float ) targetOpacity – Notification maximum target opacity. ( Float ) duration – Notification duration in milliseconds. ( Integer )

  `notificationClicked`

    This signal is emited by the `Notification_QLabel` class when it receives a mouse press event. ( pyqtSignal )

    Returns: | Current notification text. ( QString )

  `fadedIn`

    This signal is emited by the `Notification_QLabel` class when it has faded in. ( pyqtSignal )

  `fadedOut`

    This signal is emited by the `Notification_QLabel` class when it has faded out. ( pyqtSignal )

  `color`

    This method is the property for self.__color attribute.

    Returns: | self.__color. ( QColor )

  `backgroundColor`

    This method is the property for self.__backgroundColor attribute.

    Returns: | self.__backgroundColor. ( QColor )

  `borderColor`

    This method is the property for self.__borderColor attribute.

    Returns: | self.__borderColor. ( QColor )

  `anchor`

    This method is the property for self.__anchor attribute.

    Returns: | self.__anchor. ( Integer )

  `horizontalPadding`

    This method is the property for self.__horizontalPadding attribute.

    Returns: | self.__horizontalPadding. ( Integer )

  `verticalPadding`

    This method is the property for self.__verticalPadding attribute.

    Returns: | self.__verticalPadding. ( Integer )

  `horizontalOffset`

    This method is the property for self.__horizontalOffset attribute.

    Returns: | self.__horizontalOffset. ( Integer )

  `verticalOffset`

    This method is the property for self.__verticalOffset attribute.

    Returns: | self.__verticalOffset. ( Integer )

  `fadeSpeed`

    This method is the property for self.__fadeSpeed attribute.

    Returns: | self.__fadeSpeed. ( Float )

  `targetOpacity`

    This method is the property for self.__targetOpacity attribute.

    Returns: | self.__targetOpacity. ( Float )

  `duration`

    This method is the property for self.__duration attribute.

    Returns: | self.__duration. ( Integer )

  `opacity`

    This method is the property for self.__opacity attribute.

    Returns: | self.__opacity. ( Float )

  `style`

    This method is the property for self.__style attribute.

    Returns: | self.__style. ( String )

  `setParent`(parent)

    This method reimplements the `QLabel.setParent()` method.

    Parameters: | parent – Parent. ( QObject )

  `resizeEvent`(event)

    This method reimplements the `QLabel.resizeEvent()` method.

    Parameters: | event – QEvent. ( QEvent )

  `mousePressEvent`(event)

    This method reimplements the `QLabel.mousePressEvent()` method.

    Parameters: | event – QEvent. ( QEvent )

  `showEvent`(event)

    This method reimplements the `QLabel.showEvent()` method.

    Parameters: | event – QEvent. ( QEvent )

  `showMessage`(message, duration=2500)

    This method shows given message.

    Parameters: | message – Message. ( String ) duration – Notification duration in milliseconds. ( Integer )
    Returns: | Method success. ( Boolean )

  `hideMessage`()

    This method hides the current message.

    Returns: | Method success. ( Boolean )

  `refreshPosition`()

    This method refreshes the Widget position.

    Returns: | Method success. ( Boolean )

### Navigation

- index
- modules |
- next |
- previous |
- Umbra 1.0.4 documentation »
- 4. Api »