nodedge.edge_dragging

Edge dragging module containing EdgeDragging class.

class nodedge.edge_dragging.EdgeDraggingMode

Bases: enum.IntEnum

DragMode class.

NOOP = 1

Mode representing ready state

EDGE_DRAG = 2

Mode representing when we drag edge state

EDGE_CUT = 3

Mode representing when we draw a cutting edge

class nodedge.edge_dragging.EdgeDragging(graphicsView: GraphicsView)

Bases: object

EdgeDragging class .

update(item: Optional[PySide2.QtWidgets.QGraphicsItem]) → None

Update callback.

Parameters

item – selected item.

Returns

Optional[QGraphicsItem]

startEdgeDragging(graphicsSocket: nodedge.graphics_socket.GraphicsSocket)

Handle the start of dragging an Edge operation.

Parameters

graphicsSocket (GraphicsSocket) – The socket being connected to another one.

endEdgeDragging(graphicsSocket: Optional[nodedge.graphics_socket.GraphicsSocket])

Handle the end of dragging an Edge operation.

Parameters

graphicsSocket (GraphicsSocket) – socket being connected

Returns

True is the operation is a success, false otherwise.

Return type

bool