node_edge_rerouting Module

A module containing the Edge Rerouting functionality

class nodeeditor.node_edge_rerouting.EdgeRerouting(grView: QGraphicsView)

Bases: object

print(*args)

Helper function to better control debug printing to console for this feature

getEdgeClass()

Helper function to get the Edge class. Using what the Scene class provides

getAffectedEdges()list

Get a list of all edges connected to the self.start_socket where we started the re-routing

Returns

List of all edges affected by the rerouting started from this self.start_socket Socket

Return type

list

setAffectedEdgesVisible(visibility: bool = True)

Show/Hide all edges connected to the self.start_socket where we started the re-routing

Parameters

visibility (bool) – True if all the affected Edge (s) should be shown or hidden

resetRerouting()

Reset to default state. Init this feature internal variables

clearReroutingEdges()

Remove the helping dashed edges from the Scene

updateScenePos(x: float, y: float)

Update position of all the rerouting edges (dashed ones). Called from mouseMove event to update to new mouse position

Parameters
  • x (float) – new X position

  • y (float) – new Y position

startRerouting(socket: Socket)

Method to start the re-routing. Called from the grView’s state machine.

Parameters

socket (Socket) – Socket where we started the re-routing

stopRerouting(target: Socket = None)

Method for stopping the re-routing

Parameters

target (Socket or None) – Target where we ended the rerouting (usually released mouse button). Provide Socket or None to cancel