src.GUI.UI.visual_routine_builder package

Submodules

src.GUI.UI.visual_routine_builder.connection_line module

Connection Line - Visual connection between nodes

This module contains the ConnectionLine class which represents curved connection lines between nodes in the visual routine builder.

class src.GUI.UI.visual_routine_builder.connection_line.ConnectionLine(from_port: ConnectionPort, to_port: ConnectionPort, is_conditional: bool = False, condition_label: str = '', parent: QGraphicsItem | None = None)

Bases: QGraphicsItem

A connection line between two nodes

boundingRect()

Define the bounding rectangle

contextMenuEvent(event)

Show context menu on right-click

hoverEnterEvent(event)

Highlight connection on hover

hoverLeaveEvent(event)

Remove highlight on hover leave

paint(painter, option, widget=None)

Paint the connection line with bezier curve

update_position()

Update the line position when nodes move

src.GUI.UI.visual_routine_builder.node_item module

Node Item - Visual node representing a step, middleware, or routine

This module contains the NodeItem class which represents a draggable node in the visual routine builder canvas.

class src.GUI.UI.visual_routine_builder.node_item.NodeItem(node_type: str = 'step', data: dict[str, Any] | None = None, parent: QGraphicsItem | None = None)

Bases: QGraphicsItem

A visual node representing a step, middleware, or routine

boundingRect()

Define the bounding rectangle

contextMenuEvent(event)

Show context menu on right-click

itemChange(change, value)

Handle item changes (e.g., position changes with snap-to-grid)

paint(painter, option, widget=None)

Paint the node

update_connections()

Update all connection lines connected to this node

src.GUI.UI.visual_routine_builder.port_item module

Connection Port - Visual connection point on nodes

This module contains the ConnectionPort class which represents clickable connection ports on nodes for creating connections between steps.

class src.GUI.UI.visual_routine_builder.port_item.ConnectionPort(node: NodeItem, is_input: bool = True, parent: QGraphicsItem | None = None)

Bases: QGraphicsItem

A connection port on a node

boundingRect()

Define the bounding rectangle for the port

get_center_pos()

Get the center position in scene coordinates

hoverEnterEvent(event)

Highlight port on hover

hoverLeaveEvent(event)

Remove highlight on hover leave

mousePressEvent(event)

Handle click on port - either start or finish connection

paint(painter, option, widget=None)

Paint the port

sceneEvent(event)

Intercept scene events to debug what’s happening

shape()

Return the shape of the item for collision detection

Module contents

Visual Routine Builder Module

A modular N8N-style visual routine builder for creating workflows with drag-and-drop nodes and connections.

This module exports: - NodeItem: Visual node representing a step, middleware, or routine - ConnectionPort: Clickable connection ports on nodes - ConnectionLine: Visual curved connections between nodes - (RoutineCanvas and VisualRoutineBuilderWidget remain in settings_visual_routinebuilder_ui.py)

class src.GUI.UI.visual_routine_builder.ConnectionLine(from_port: ConnectionPort, to_port: ConnectionPort, is_conditional: bool = False, condition_label: str = '', parent: QGraphicsItem | None = None)

Bases: QGraphicsItem

A connection line between two nodes

boundingRect()

Define the bounding rectangle

contextMenuEvent(event)

Show context menu on right-click

hoverEnterEvent(event)

Highlight connection on hover

hoverLeaveEvent(event)

Remove highlight on hover leave

paint(painter, option, widget=None)

Paint the connection line with bezier curve

update_position()

Update the line position when nodes move

class src.GUI.UI.visual_routine_builder.ConnectionPort(node: NodeItem, is_input: bool = True, parent: QGraphicsItem | None = None)

Bases: QGraphicsItem

A connection port on a node

boundingRect()

Define the bounding rectangle for the port

get_center_pos()

Get the center position in scene coordinates

hoverEnterEvent(event)

Highlight port on hover

hoverLeaveEvent(event)

Remove highlight on hover leave

mousePressEvent(event)

Handle click on port - either start or finish connection

paint(painter, option, widget=None)

Paint the port

sceneEvent(event)

Intercept scene events to debug what’s happening

shape()

Return the shape of the item for collision detection

class src.GUI.UI.visual_routine_builder.NodeItem(node_type: str = 'step', data: dict[str, Any] | None = None, parent: QGraphicsItem | None = None)

Bases: QGraphicsItem

A visual node representing a step, middleware, or routine

boundingRect()

Define the bounding rectangle

contextMenuEvent(event)

Show context menu on right-click

itemChange(change, value)

Handle item changes (e.g., position changes with snap-to-grid)

paint(painter, option, widget=None)

Paint the node

update_connections()

Update all connection lines connected to this node