spark.graph_editor.widgets.shape#

Classes#

QPushButtonSquare

A square QPushButton

QShapeEdit

A widget for inputting or displaying a shape with a dynamic number of dimensions.

QShape

Custom QWidget used for integer fields in the SparkGraphEditor's Inspector.

Module Contents#

class spark.graph_editor.widgets.shape.QPushButtonSquare(*args, **kwargs)[source]#

Bases: PySide6.QtWidgets.QPushButton

A square QPushButton

hasHeightForWidth()[source]#
Return type:

bool

heightForWidth(width)[source]#
Parameters:

width (int)

Return type:

int

class spark.graph_editor.widgets.shape.QShapeEdit(initial_shape=None, min_dims=1, max_dims=8, max_shape=1000000000.0, **kwargs)[source]#

Bases: PySide6.QtWidgets.QWidget

A widget for inputting or displaying a shape with a dynamic number of dimensions.

Parameters:
editingFinished[source]#
min_dims = 1[source]#
max_dims = 8[source]#
max_shape = 0[source]#
removeButton[source]#
addButton[source]#
get_shape()[source]#
Return type:

tuple[int, Ellipsis]

set_shape(new_shape)[source]#

Clears existing dimensions and sets a new shape.

Parameters:

new_shape (tuple[int, Ellipsis])

setEnabled(value)[source]#
Parameters:

value (bool)

Return type:

None

class spark.graph_editor.widgets.shape.QShape(initial_shape=(1,), min_dims=1, max_dims=8, max_shape=1000000000.0, **kwargs)[source]#

Bases: spark.graph_editor.widgets.base.QInput

Custom QWidget used for integer fields in the SparkGraphEditor’s Inspector.

Parameters:
get_value()[source]#

Returns the widget value.

Return type:

tuple[int, Ellipsis]

set_value(value)[source]#

Sets the widget value.

Parameters:

value (tuple[int, Ellipsis])

setEnabled(value)[source]#
Parameters:

value (bool)

Return type:

None