mdadash.backend.widgets.base
Base Class for Widgets and Widget Manager
Classes
This is the base class for all widgets. |
|
This is the manager that manager all widgets. |
- class mdadash.backend.widgets.base.WidgetBase[source]
Bases:
ABCThis is the base class for all widgets.
- class mdadash.backend.widgets.base.WidgetManager[source]
Bases:
objectThis is the manager that manager all widgets.
- add_widget_instance(widget_name: str) str | None[source]
Add widget instance
Add a widget instance based on the widget name already registered with the manager.
- Parameters:
widget_name (str) – Name of the widget class registered
- Return type:
uuid of instance added or None
- property classes
Dictionary of registered widget classes keyed by widget name
- delete_widget_instance(uuid: str) str | None[source]
Remove widget instance
Remove widget instanced based on uuid returned during the instance creation using
add_widget_instance()- Parameters:
uuid (str) – The uuid of the instance to be removed
- Return type:
uuid of instance deleted or None
- property instances
Dictionary of widget instances keyed by widget uuid
- classmethod register_class(widget_class: WidgetBase) None[source]
Register widget class
- Parameters:
widget_class – A widget class that is derived from WidgetBase