SimplePropertyWidget
- class omni.kit.window.property.templates.SimplePropertyWidget(title: str, collapsed: bool = False, collapsable: bool = True)
Bases:
PropertyWidget
SimplePropertyWidget provides a simple vertical list of “Label” -> “Value widget” pair layout.
Methods
__init__
(title[, collapsed, collapsable])Initialize class function
add_item
(label, value)This function is supposed to be called inside of build_items function.
add_item_with_model
(label, model[, ...])This function is supposed to be called inside of build_items function.
add_label
(label)Add a Label with a highlight text based on current filter
See PropertyWidget.build_impl.
When derived from SimplePropertyWidget, override this function to build your items.
clean
()See PropertyWidget.clean
on_collapsed_changed
(collapsed)Update collapsed state.
on_new_payload
(payload[, ignore_large_selection])See PropertyWidget.on_new_payload
Request the widget to rebuild.
reset
()See PropertyWidget.reset
- __init__(title: str, collapsed: bool = False, collapsable: bool = True)
Initialize class function
- Parameters
collapsed (bool) – Default Collapsed state of frame.
collapsable (collapsable) – Created frame is CollapsibleFrame/Frame.
- add_item(label: str, value)
This function is supposed to be called inside of build_items function. Adds a “Label” -> “Value widget” pair item to the widget. “value” will be an uneditable string in a StringField.
- Parameters
label (str) – The label text of the entry.
value – The value to be stringified and displayed in a StringField.
- add_item_with_model(label: str, model, editable: bool = False, identifier: Optional[str] = None)
This function is supposed to be called inside of build_items function. Adds a “Label” -> “Value widget with model” pair item to the widget. “value” will be an editable string in a StringField backed by supplied model.
- Parameters
label (str) – The label text of the entry.
model – The model to be used by the string field.
editable – If the StringField generated from model should be editable. Default is False.
- add_label(label: str)
Add a Label with a highlight text based on current filter
- Parameters
label (str) – Name of label.
- build_impl()
See PropertyWidget.build_impl.
- build_items()
When derived from SimplePropertyWidget, override this function to build your items.
- clean()
See PropertyWidget.clean
- on_collapsed_changed(collapsed)
Update collapsed state.
- Parameters
collapsed (bool) – New state of collapsed frame.
- on_new_payload(payload, ignore_large_selection=False) bool
See PropertyWidget.on_new_payload
- request_rebuild()
Request the widget to rebuild. It will be rebuilt on next frame.
- reset()
See PropertyWidget.reset