4.56. umbra.ui.widgets.notification_QLabel — Umbra 1.0.9 documentation

# 4.56. umbra.ui.widgets.notification_QLabel

notification_QLabel.py

Platform:
  Windows, Linux, Mac Os X.
Description:
  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.56.1. Module Attributes

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

## 4.56.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`

  Defines a QLabel subclass providing a notification label with fading capabilities.

  Initializes the class.

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

  `notificationClicked`

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

    Returns: | Current notification text.
    Return type: | 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`

    Property for self.__color attribute.

    Returns: | self.__color.
    Return type: | QColor

  `backgroundColor`

    Property for self.__backgroundColor attribute.

    Returns: | self.__backgroundColor.
    Return type: | QColor

  `borderColor`

    Property for self.__borderColor attribute.

    Returns: | self.__borderColor.
    Return type: | QColor

  `anchor`

    Property for self.__anchor attribute.

    Returns: | self.__anchor.
    Return type: | int

  `horizontalPadding`

    Property for self.__horizontalPadding attribute.

    Returns: | self.__horizontalPadding.
    Return type: | int

  `verticalPadding`

    Property for self.__verticalPadding attribute.

    Returns: | self.__verticalPadding.
    Return type: | int

  `horizontalOffset`

    Property for self.__horizontalOffset attribute.

    Returns: | self.__horizontalOffset.
    Return type: | int

  `verticalOffset`

    Property for self.__verticalOffset attribute.

    Returns: | self.__verticalOffset.
    Return type: | int

  `fadeSpeed`

    Property for self.__fadeSpeed attribute.

    Returns: | self.__fadeSpeed.
    Return type: | float

  `targetOpacity`

    Property for self.__targetOpacity attribute.

    Returns: | self.__targetOpacity.
    Return type: | float

  `duration`

    Property for self.__duration attribute.

    Returns: | self.__duration.
    Return type: | int

  `opacity`

    Property for self.__opacity attribute.

    Returns: | self.__opacity.
    Return type: | float

  `style`

    Property for self.__style attribute.

    Returns: | self.__style.
    Return type: | unicode

  `setParent`(parent)

    Reimplements the `QLabel.setParent()` method.

    Parameters: | parent (QObject) – Parent.

  `resizeEvent`(event)

    Reimplements the `QLabel.resizeEvent()` method.

    Parameters: | event (QEvent) – QEvent.

  `mousePressEvent`(event)

    Reimplements the `QLabel.mousePressEvent()` method.

    Parameters: | event (QEvent) – QEvent.

  `showEvent`(event)

    Reimplements the `QLabel.showEvent()` method.

    Parameters: | event (QEvent) – QEvent.

  `showMessage`(message, duration=2500)

    Shows given message.

    Parameters: | message (unicode) – Message. duration (int) – Notification duration in milliseconds.
    Returns: | Method success.
    Return type: | bool

  `hideMessage`()

    Hides the current message.

    Returns: | Method success.
    Return type: | bool

  `refreshPosition`()

    Refreshes the Widget position.

    Returns: | Method success.
    Return type: | bool