eric7.UI.NotificationWidget
Module implementing a Notification widget.
Global Attributes
Classes
Functions
NotificationFrame
    Class implementing a Notification widget.
Derived from
QFrame, Ui_NotificationFrame
Class Attributes
| NotificationStyleSheetTemplate | 
Class Methods
| getIcon | Class method to get the icon for a specific notification kind. | 
| getStyleSheet | Class method to get a style sheet for specific notification kind. | 
Methods
Static Methods
NotificationFrame.getIcon (class method)
getIcon(kind)
        Class method to get the icon for a specific notification kind.
- kind (NotificationTypes)
- 
notification kind
- Return:
- 
icon for the notification kind
- Return Type:
- 
QPixmap
NotificationFrame.getStyleSheet (class method)
getStyleSheet(kind)
        Class method to get a style sheet for specific notification kind.
- kind (NotificationTypes)
- 
notification kind
- Return:
- 
string containing the style sheet for the notification kind
- Return Type:
- 
str
NotificationFrame (Constructor)
NotificationFrame(icon, heading, text, kind=NotificationTypes.INFORMATION, parent=None)
        Constructor
- icon (QPixmap)
- 
icon to be used
- heading (str)
- 
heading to be used
- text (str)
- 
text to be used
- kind (NotificationTypes)
- 
kind of notification to be shown
- parent (QWidget)
- 
reference to the parent widget
NotificationTypes
    Class implementing the notification types.
Derived from
enum.Enum
Class Attributes
| CRITICAL | 
| INFORMATION | 
| OTHER | 
| WARNING | 
Class Methods
Methods
Static Methods
NotificationWidget
    Class implementing a Notification list widget.
Derived from
QWidget
Class Attributes
Class Methods
Methods
Static Methods
NotificationWidget (Constructor)
NotificationWidget(parent=None, setPosition=False)
        Constructor
- parent (QWidget)
- 
reference to the parent widget
- setPosition (bool)
- 
flag indicating to set the display
            position interactively
NotificationWidget.__adjustSizeAndPosition
__adjustSizeAndPosition()
        Private slot to adjust the notification list widget size and position.
NotificationWidget.__removeNotification
__removeNotification(notification)
        Private method to remove a notification from the list.
- notification (NotificationFrame)
- 
reference to the notification to be removed
NotificationWidget.mouseMoveEvent
mouseMoveEvent(evt)
        Protected method to handle dragging the window.
- evt (QMouseEvent)
- 
reference to the mouse event
NotificationWidget.mousePressEvent
mousePressEvent(evt)
        Protected method to handle presses of a mouse button.
- evt (QMouseEvent)
- 
reference to the mouse event
NotificationWidget.mouseReleaseEvent
mouseReleaseEvent(evt)
        Protected method to handle releases of a mouse button.
- evt (QMouseEvent)
- 
reference to the mouse event
NotificationWidget.showNotification
showNotification(icon, heading, text, kind=NotificationTypes.INFORMATION, timeout=0)
        Public method to show a notification.
- icon (QPixmap)
- 
icon to be used
- heading (str)
- 
heading to be used
- text (str)
- 
text to be used
- kind (NotificationTypes)
- 
kind of notification to be shown
- timeout (int)
- 
timeout in seconds after which the notification is
            to be removed (0 = do not remove until it is clicked on)