Delegate
- class omni.kit.data2ui.core.Delegate
Bases:
objectMethods
get_widget(item)Finds the widget class for a given item class, taking inheritance into account.
register_type(widget_type, item_type)Registers a new widget type for a given item type.
Attributes
widget_types_by_item_type- __init__()
- classmethod get_widget(item) Type
Finds the widget class for a given item class, taking inheritance into account.
- Parameters
item_type – The item class to find the associated widget class for.
- Returns
The widget class associated with the item class, or None if not found.
- classmethod register_type(widget_type, item_type)
Registers a new widget type for a given item type.
- Parameters
widget_type – The widget class to register.
item_type – The item class to associate with the widget.
- Returns
A TypeRegistry instance that handles adding/removing the mapping.