6.68. umbra.managers.notificationsManager

notificationsManager.py

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

Others:

6.68.1. Module Attributes

umbra.managers.notificationsManager.LOGGER

6.68.2. Classes

class umbra.managers.notificationsManager.Notification(**kwargs)[source]

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)[source]

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[source]

Property for self.__container attribute.

Returns:self.__container.
Return type:QObject
notifications[source]

Property for self.__notifications attribute.

Returns:self.__notifications.
Return type:list
notifiers[source]

Property for self.__notifiers attribute.

Returns:self.__notifiers.
Return type:list
notifiersStackPadding[source]

Property for self.__notifiersStackPadding attribute.

Returns:self.__notifiersStackPadding.
Return type:int
maximumNotifiers[source]

Property for self.__maximumNotifiers attribute.

Returns:self.__maximumNotifiers.
Return type:int
listNotifications()[source]

Returns the registered notifications.

Returns:Notifications list.
Return type:list
isNotificationRegistered(notification)[source]

Returns if the given notification is registered.

Parameters:notification (unicode) – Notification.
Returns:Is notification registered.
Return type:bool
registerNotification(notification)[source]

Registers given notification.

Parameters:notification (Notification) – Notification to register.
Returns:Method success.
Return type:bool
formatNotification(notification)[source]

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)[source]

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)[source]

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)[source]

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