4.33. umbra.managers.notificationsManager — Umbra 1.0.9 documentation

# 4.33. umbra.managers.notificationsManager

notificationsManager.py

Platform:
  Windows, Linux, Mac Os X.
Description:
  Defines the `NotificationsManager` and `Notification` classes.

Others:

## 4.33.1. Module Attributes

`umbra.managers.notificationsManager.` `LOGGER`

## 4.33.2. Classes

class `umbra.managers.notificationsManager.` `Notification`(**kwargs)

  Bases: `foundations.dataStructures.Structure`

  Defines a storage object for `NotificationsManager` class notification.

  Initializes the class.

  Parameters: | **kwargs (dict) – message, time.

class `umbra.managers.notificationsManager.` `NotificationsManager`(parent=None)

  Bases: `PyQt4.QtCore.QObject`

  Defines the Application notifications manager.

  Initializes the class.

  `notificationRegistered`

    This signal is emited by the `NotificationsManager` class when a notification is registered. ( pyqtSignal )

    Returns: | Current registered notification.
    Return type: | Notification

  `container`

    Property for self.__container attribute.

    Returns: | self.__container.
    Return type: | QObject

  `notifications`

    Property for self.__notifications attribute.

    Returns: | self.__notifications.
    Return type: | list

  `notifiers`

    Property for self.__notifiers attribute.

    Returns: | self.__notifiers.
    Return type: | list

  `notifiersStackPadding`

    Property for self.__notifiersStackPadding attribute.

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

  `maximumNotifiers`

    Property for self.__maximumNotifiers attribute.

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

  `listNotifications`()

    Returns the registered notifications.

    Returns: | Notifications list.
    Return type: | list

  `isNotificationRegistered`(notification)

    Returns if the given notification is registered.

    Parameters: | notification (unicode) – Notification.
    Returns: | Is notification registered.
    Return type: | bool

  `registerNotification`(notification)

    Registers given notification.

    Parameters: | notification (Notification) – Notification to register.
    Returns: | Method success.
    Return type: | bool

  `formatNotification`(notification)

    Formats given notification.

    Parameters: | notification (Notification) – Notification to format.
    Returns: | Method success.
    Return type: | bool

  `notify`(message, duration=3000, notificationClickedSlot=None, messageLevel=u'Information', **kwargs)

    Displays an Application notification.

    Parameters: | message (unicode) – Notification message. duration (int) – Notification display duration. notificationClickedSlot (object) – Notification clicked slot. messageLevel (unicode) – Message level ( “Information”, “Warning”, “Exception” ). **kwargs (**) – Keywords arguments.
    Returns: | Method success.
    Return type: | bool

  `warnify`(message, duration=3000, notificationClickedSlot=None, **kwargs)

    Displays an Application notification warning.

    Parameters: | message (unicode) – Notification message. duration (int) – Notification display duration. notificationClickedSlot (object) – Notification clicked slot. **kwargs (**) – Keywords arguments.
    Returns: | Method success.
    Return type: | bool

  `exceptify`(message, duration=3000, notificationClickedSlot=None, **kwargs)

    Displays an Application notification exception.

    Parameters: | message (unicode) – Notification message. duration (int) – Notification display duration. notificationClickedSlot (object) – Notification clicked slot. **kwargs (**) – Keywords arguments.
    Returns: | Method success.
    Return type: | bool