spinetoolbox.widgets.notification

Contains a notification widget.

author:
  1. Savolainen (VTT)
date:

12.12.2019

Module Contents

class spinetoolbox.widgets.notification.Notification(parent, txt, anim_duration=500, life_span=2000)[source]

Bases: PySide2.QtWidgets.QWidget

Custom pop-up notification widget with fade-in and fade-out effect.

Parameters:
  • parent (QWidget) – Parent widget
  • txt (str) – Text to display in notification
  • anim_duration (int) – Duration of the animation in msecs
  • life_span (int) – How long does the notification stays in place in msecs
opacity[source]
show(self)[source]
get_opacity(self)[source]

opacity getter.

set_opacity(self, op)[source]

opacity setter.

update_opacity(self, value)[source]

Updates graphics effect opacity.

start_self_destruction(self)[source]

Starts fade-out animation and closing of the notification.

enterEvent(self, e)[source]
remaining_time(self)[source]
class spinetoolbox.widgets.notification.NotificationStack(parent, anim_duration=500, life_span=2000)[source]

Bases: PySide2.QtCore.QObject

push(self, txt)[source]

Pushes a notification to the stack with the given text.

handle_notification_destroyed(self, notification, height)[source]

Removes from the stack the given notification and move up subsequent ones.