QNodeEditor.entries.labeled.LabeledEntry#
- class QNodeEditor.entries.labeled.LabeledEntry(*args, theme: ~typing.Type[~QNodeEditor.themes.theme.Theme] = <class 'QNodeEditor.themes.dark.DarkTheme'>, **kwargs)#
Bases:
EntryEntry housing a label displaying the name of the entry.
The entry is left-aligned for static and input entries, but right-aligned for output entries.
Examples
Example usage:
entry = LabeledEntry('Some entry') node = MyNode() node.add_entry(entry)
The
Nodeclass also contains helper methods to create labeled entries:node = MyNode() node.add_label_entry('Some entry', Entry.TYPE_INPUT) node.add_label_input('Some input') node.add_label_output('Some output')
Properties
Methods
Create a new labeled entry.
Update the label text when the entry name changes.
Update the label text when the entry width changes (affects truncation).
Update the label theme when the entry theme changes.
- __init__(*args, theme: ~typing.Type[~QNodeEditor.themes.theme.Theme] = <class 'QNodeEditor.themes.dark.DarkTheme'>, **kwargs)#
Create a new labeled entry.
- on_name_change(name: str) None#
Update the label text when the entry name changes.
The name is truncated if necessary to fit into the available with.
- Parameters:
name (str) – New entry name
- Return type:
None
- on_resize(*_) None#
Update the label text when the entry width changes (affects truncation).
- Return type:
None
- on_theme_change() None#
Update the label theme when the entry theme changes.
- Return type:
None