spark.graph_editor.widgets.checkbox#

Classes#

WarningFlag

Toggleable QPushButton used to indicate that an attribute in a SparkConfig may have conflicts.

InitializerToggleButton

Toggleable QPushButton used to indicate that an attribute in a SparkConfig can be set using an initializer.

InheritStatus

Create a collection of name/value pairs.

InheritToggleButton

Toggleable QPushButton used to indicate that an attribute in a SparkConfig is inheriting it's value to child attributes.

Module Contents#

class spark.graph_editor.widgets.checkbox.WarningFlag(value=False, **kwargs)[source]#

Bases: PySide6.QtWidgets.QPushButton

Toggleable QPushButton used to indicate that an attribute in a SparkConfig may have conflicts.

Parameters:

value (bool)

warning_icon[source]#
tooltip_message = None[source]#
empty_icon[source]#
toggle_icon[source]#
set_error_status(messages)[source]#
Parameters:

messages (list[str])

Return type:

None

mousePressEvent(event)[source]#
Parameters:

event (PySide6.QtGui.QMouseEvent)

Return type:

None

mouseReleaseEvent(event)[source]#
Parameters:

event (PySide6.QtGui.QMouseEvent)

Return type:

None

enterEvent(event)[source]#
Parameters:

event (PySide6.QtCore.QEvent)

Return type:

None

leaveEvent(event)[source]#
Parameters:

event (PySide6.QtCore.QEvent)

Return type:

None

class spark.graph_editor.widgets.checkbox.InitializerToggleButton(value=False, interactable=True, **kwargs)[source]#

Bases: PySide6.QtWidgets.QPushButton

Toggleable QPushButton used to indicate that an attribute in a SparkConfig can be set using an initializer.

Parameters:
simple_icon[source]#
complex_icon[source]#
toggle_icon[source]#
set_value(state)[source]#

Set the current state of the checkbox.

Parameters:

state (bool)

Return type:

None

class spark.graph_editor.widgets.checkbox.InheritStatus(*args, **kwds)[source]#

Bases: enum.Enum

Create a collection of name/value pairs.

Example enumeration:

>>> class Color(Enum):
...     RED = 1
...     BLUE = 2
...     GREEN = 3

Access them by:

  • attribute access:

    >>> Color.RED
    <Color.RED: 1>
    
  • value lookup:

    >>> Color(1)
    <Color.RED: 1>
    
  • name lookup:

    >>> Color['RED']
    <Color.RED: 1>
    

Enumerations can be iterated over, and know how many members they have:

>>> len(Color)
3
>>> list(Color)
[<Color.RED: 1>, <Color.BLUE: 2>, <Color.GREEN: 3>]

Methods can be added to enumerations, and members can have their own attributes – see the documentation for details.

LOCK[source]#
FREE[source]#
class spark.graph_editor.widgets.checkbox.InheritToggleButton(value=False, interactable=True, **kwargs)[source]#

Bases: PySide6.QtWidgets.QPushButton

Toggleable QPushButton used to indicate that an attribute in a SparkConfig is inheriting it’s value to child attributes.

Parameters:
lock_icon[source]#
free_icon[source]#
interactable = True[source]#
toggle_icon[source]#
set_value(state)[source]#

Set the current state of the checkbox.

Parameters:

state (InheritStatus)

Return type:

None