src.themerr.notifier#
- class src.themerr.notifier.Notifier(heading: str | None = 'Themerr', icon: str | None = 'info', time: int | None = 5000, sound: bool | None = True)[source]#
Bases:
object
A class to show notification dialogs.
A wrapper class for the
xbmcgui.Dialog.notification
method.- Parameters:
- headingOptional[str]
The heading of the notification dialog.
- iconOptional[str]
The icon of the notification dialog.
- timeOptional[int]
The time to show the notification dialog.
- soundOptional[bool]
Whether to play a sound when showing the notification dialog.
Examples
>>> notifier = Notifier()
- Attributes:
- dialogxbmcgui.Dialog
The notification dialog.
- headingOptional[str]
The heading of the notification dialog.
- iconOptional[str]
The icon of the notification dialog.
- timeOptional[int]
The time to show the notification dialog.
- soundOptional[bool]
Whether to play a sound when showing the notification dialog.
Methods
notify(
message: str, heading: Optional[str] = None, icon: Optional[str] = None, time: Optional[int] = None, sound: Optional[bool] = None,
)
Show a notification dialog.
- notify(message: str, heading: str | None = None, icon: str | None = None, time: int | None = None, sound: bool | None = None)[source]#
Show a notification dialog.
Use the
xbmcgui.Dialog.notification
method to show a notification dialog.- Parameters:
- messagestr
The message of the notification dialog.
- headingOptional[str]
The heading of the notification dialog.
- iconOptional[str]
The icon of the notification dialog.
- timeOptional[int]
The time to show the notification dialog.
- soundOptional[bool]
Whether to play a sound when showing the notification dialog.
Examples
>>> notifier = Notifier() >>> notifier.notify("Hello World!")