- class napari.utils.notifications.Notification(message: str, severity: Union[str, NotificationSeverity] = NotificationSeverity.WARNING, actions: Sequence[Tuple[str, Callable[, None]]] = (), **kwargs)¶
A Notifcation event. Usually created by
message (str) – The main message/payload of the notification.
actions (sequence of tuple, optional) – Where each tuple is a (str, callable) 2-tuple where the first item is a name for the action (which may, for example, be put on a button), and the callable is a callback to perform when the action is triggered. (for example, one might show a traceback dialog). by default ()
This boolean property indicates whether the event will be delivered to event callbacks.
This boolean property indicates whether the event has already been acted on by an event handler.
The object that the event applies to (i.e.
List of objects that the event applies to (i.e.
- property blocked: bool¶
This boolean property indicates whether the event will be delivered to event callbacks. If it is set to True, then no further callbacks will receive the event. When possible, it is recommended to use Event.handled rather than Event.blocked.
- property handled: bool¶
This boolean property indicates whether the event has already been acted on by an event handler. Since many handlers may have access to the same events, it is recommended that each check whether the event has already been handled as well as set handled=True if it decides to act on the event.