spark.graph_editor.widgets.attributes#
Attributes#
Classes#
Support for integer-based Flags |
|
Base QWidget class for the graph editor attributes. |
|
QWidget for the body of configuration object. |
|
Module Contents#
- class spark.graph_editor.widgets.attributes.QControlFlags[source]#
Bases:
enum.IntFlagSupport for integer-based Flags
Initialize self. See help(type(self)) for accurate signature.
- class spark.graph_editor.widgets.attributes.QAttrControls(on_initializer_toggled_callback, on_inheritance_toggled_callback, warning_flags, inheritance_flags, initializer_flags, **kwargs)[source]#
Bases:
PySide6.QtWidgets.QWidget- Parameters:
on_initializer_toggled_callback (Callable)
on_inheritance_toggled_callback (Callable)
warning_flags (QControlFlags)
inheritance_flags (QControlFlags)
initializer_flags (QControlFlags)
- class spark.graph_editor.widgets.attributes.QAttribute(attr_label, attr_value, attr_widget, attr_init_mandatory=False, attr_metadata=None, warning_flags=QControlFlags.SHOW_INTERACTIVE, inheritance_flags=QControlFlags.EMPTY_SPACE, initializer_flags=QControlFlags.EMPTY_SPACE, ref_post_callback_stack=None, is_initializer_attr=False, **kwargs)[source]#
Bases:
PySide6.QtWidgets.QWidgetBase QWidget class for the graph editor attributes.
- Parameters:
attr_label (str)
attr_value (Any)
attr_widget (type[spark.graph_editor.widgets.base.QInput])
attr_init_mandatory (bool)
attr_metadata (dict | None)
warning_flags (QControlFlags)
inheritance_flags (QControlFlags)
initializer_flags (QControlFlags)
ref_post_callback_stack (list | None)
is_initializer_attr (bool)
- set_initializer_status(state)[source]#
Sets the error status of widget.
- Parameters:
state (bool)
- Return type:
None
- set_inheritance_status(state)[source]#
Sets the error status of widget.
- Parameters:
- Return type:
None
- class spark.graph_editor.widgets.attributes.QConfigBody(config, is_initializer, config_path=None, ref_widgets_map=None, ref_post_callback_stack=None, inheritance_tree=None, on_inheritance_toggle=None, **kwargs)[source]#
Bases:
PySide6.QtWidgets.QWidgetQWidget for the body of configuration object.
- Parameters:
config (spark.core.config.BaseSparkConfig)
is_initializer (bool)
config_path (str | None)
ref_widgets_map (dict[tuple[str, Ellipsis], PySide6.QtWidgets.QWidget] | None)
ref_post_callback_stack (list | None)
inheritance_tree (spark.core.utils.InheritanceTree | None)
on_inheritance_toggle (Callable | None)
- class spark.graph_editor.widgets.attributes.TypeParser[source]#
-
- CONTAINER_TYPES: re.Pattern[source]#
- class spark.graph_editor.widgets.attributes.WidgetParser[source]#
-
- get_possible_widgets(attr_type)[source]#
Maps an argument type to a corresponding type of possible widgets classes. Returns an ordered list of widgets and metadata to format the inspector.
- get_possible_widgets_raw(raw_types)[source]#
Maps an argument raw type to a corresponding type of possible widgets classes. Returns an ordered list of widgets and metadata to format the inspector.
- get_widget(attr_type)[source]#
Maps an argument type to a corresponding widget class, according to the priority list. Returns the best widget fit and metadata to format the inspector.
- Parameters:
- Return type:
tuple[type[PySide6.QtWidgets.QWidget], WidgetParserMetadata]