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 SocketReturn 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) –Trueif all the affectedEdge(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
- x (
-
startRerouting(socket: Socket)¶ Method to start the re-routing. Called from the grView’s state machine.
Parameters: socket ( Socket) –Socketwhere we started the re-routing
-
stopRerouting(target: Socket = None)¶ Method for stopping the re-routing
Parameters: target ( SocketorNone) – Target where we ended the rerouting (usually released mouse button). ProvideSocketorNoneto cancel
-