QNodeEditor.graphics.edge.EdgeGraphics#
- class QNodeEditor.graphics.edge.EdgeGraphics(edge: Edge, theme: ~typing.Type[~QNodeEditor.themes.theme.Theme] = <class 'QNodeEditor.themes.dark.DarkTheme'>)#
Bases:
QGraphicsPathItemExtension of QGraphicsPathItem for drawing an edge.
This class is abstract. It serves as a base class for various edge types.
Properties
Get or set the scene ending position of the edge.
Get or set the scene starting position of the edge.
Methods
Create new edge graphics.
boundingRectGet the bounding rectangle of the edge.
Abstract method that calculates the path of the edge.
hoverEnterEventUpdate the edge graphics if the mouse is hovered over it.
hoverLeaveEventUpdate the edge graphics if the mouse stops hovering over it.
Checks whether a line segment intersects with this edge.
paintDraw the edge
shapeGet the shape of the edge.
- __init__(edge: Edge, theme: ~typing.Type[~QNodeEditor.themes.theme.Theme] = <class 'QNodeEditor.themes.dark.DarkTheme'>)#
Create new edge graphics.
- abstract create_path() QPainterPath#
Abstract method that calculates the path of the edge.
- Returns:
Path connecting start and end point
- Return type: