QNodeEditor.themes.theme.Theme#
- class QNodeEditor.themes.theme.Theme#
Bases:
objectTheme base class storing colors and other graphical properties for the node editor
Properties
Color of editor background
Color of region select in node view
Color of editor grid
Color of cutting line
Dash pattern for cutting length (length must be even)
Width of cutting line
Relative path to .ttf file in ./fonts/ directory
Default font size
Size of editor background grid points
Spacing of editor background grid points
Color of node body
Color of node header (behind title)
Color of node outline in default state
Color of node outline in hovered state
Color of node outline in selected state
Color of node shadow
Color of node title text
Node body border radius
Node outline width
Node shadow blur radius
Node shadow offset (dx, dy)
Node body padding (horizontal, vertical)
Vertical spacing between node entries
Type of edge ('direct' or 'bezier')
Color of edges in default state
Color of edges in hovered state
Color of edges in selected state
Color of edges that are being dragged
Width of edges in default state
Width of edges in hovered state
Width of edges in selected state
Width of edges that are being dragged
Style of edges in default state
Style of edges in hovered state
Style of edges in selected state
Style of edges that are being dragged
Filename of SVG to use for combo box arrow in ./img/ directory
Color of widget in default state
Primary color of widget in hovered state
Secondary color of widget in hovered state
Primary color of widget in pressed state
Secondary color of widget in pressed state
Color of active part of widget (such as progress bar)
Color of widget text in default state
Color of widget text in hovered state
Color of widget text in disabled state
Widget border radius
Widget outline width
Widget height
Color of socket
Color of socket outline
Socket radius
Socket outline width
Methods
Load the specified font from the ./fonts/ directory.
Get the absolute path to the SVG file used for the combo box arrow.
Get the absolute path to an SVG file.
- __init__()#
- classmethod font(point_size: int | None = None) QFont#
Load the specified font from the ./fonts/ directory.
- Parameters:
point_size (int, optional) – Font point size. If not specified, the default font size is used.
- Returns:
Loaded font
- Return type:
- classmethod load_combo_box_arrow() str#
Get the absolute path to the SVG file used for the combo box arrow.
- Returns:
Absolute path to SVG file
- Return type:
str
- classmethod load_svg(filename: str) str#
Get the absolute path to an SVG file.
Needed since filepaths for packages are not always intuitive.
- Parameters:
filename (str) – Name of SVG file in ./img/ directory to locate
- Returns:
Absolute path to SVG file
- Return type:
str
- edge_type: str#
Type of edge (‘direct’ or ‘bezier’)
- Type:
str
- edge_width_default: float#
Width of edges in default state
- Type:
float
- edge_width_drag: float#
Width of edges that are being dragged
- Type:
float
- edge_width_hover: float#
Width of edges in hovered state
- Type:
float
- edge_width_selected: float#
Width of edges in selected state
- Type:
float
- editor_cut_dash_pattern: list[int]#
Dash pattern for cutting length (length must be even)
- Type:
list[int]
- editor_cut_width: float#
Width of cutting line
- Type:
float
- editor_grid_point_size: float#
Size of editor background grid points
- Type:
float
- editor_grid_spacing: int#
Spacing of editor background grid points
- Type:
int
- font_name: str#
Relative path to .ttf file in ./fonts/ directory
- Type:
str
- font_size: int#
Default font size
- Type:
int
- node_border_radius: float#
Node body border radius
- Type:
float
- node_entry_spacing: float#
Vertical spacing between node entries
- Type:
float
- node_outline_width: float#
Node outline width
- Type:
float
- node_padding: tuple[int]#
Node body padding (horizontal, vertical)
- Type:
tuple[int]
- node_shadow_offset: tuple[float]#
Node shadow offset (dx, dy)
- Type:
tuple[float]
- node_shadow_radius: float#
Node shadow blur radius
- Type:
float
- socket_outline_width: float#
Socket outline width
- Type:
float
- socket_radius: int#
Socket radius
- Type:
int
- widget_border_radius: float#
Widget border radius
- Type:
float
- widget_combo_box_arrow_name: str#
Filename of SVG to use for combo box arrow in ./img/ directory
- Type:
str
- widget_height: int#
Widget height
- Type:
int
- widget_outline_width: float#
Widget outline width
- Type:
float