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) –Trueif all the affectedEdge(s) should be shown or hidden
-
resetRerouting()¶ Reset to default state. Init this feature internal variables
-
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 positiony (
float) – new Y position
-
startRerouting(socket: Socket)¶ Method to start the re-routing. Called from the grView’s state machine.
-