node_edge_intersect Module¶
A module containing the intersecting nodes functionality. If a node gets dragged and dropped on an existing edge it will intersect that edge.
-
class
nodeeditor.node_edge_intersect.EdgeIntersect(grView: PyQt5.QtWidgets.QGraphicsView)¶ Bases:
object-
enterState(node: Node)¶ Initialize when we enter the state
-
leaveState(scene_pos_x: float, scene_pos_y: float)¶ Deinit when we leave this state
- Parameters
scene_pos_x (float) – scene position x
scene_pos_y (float) – scene position y
-
dropNode(node: Node, scene_pos_x: float, scene_pos_y: float)¶ Code handling the dropping of a node on an existing edge.
- Parameters
scene_pos_x (float) – scene position x
scene_pos_y (float) – scene position y
-
hotZoneRect(node: Node) → QRectF¶ Returns A QRectF of creating a box around a node
-
update(scene_pos_x: float, scene_pos_y: float)¶ Updating during mouse move when grView is in this state
- Parameters
scene_pos_x (float) – scene position x
scene_pos_y (float) – scene position y
-
intersect(node_box: PyQt5.QtCore.QRectF) → nodeeditor.node_edge.Edge¶ Checking for intersection of a rectangle (usually a Node) with edges in the scene
-