QNodeEditor.graphics.cutter.Cutter#
- class QNodeEditor.graphics.cutter.Cutter(scene: NodeScene, parent: ~PyQt5.QtWidgets.QGraphicsItem = None, theme: ~typing.Type[~QNodeEditor.themes.theme.Theme] = <class 'QNodeEditor.themes.dark.DarkTheme'>)#
Bases:
QGraphicsItemExtension of QGraphicsItem for a line defined by points to cut edges with.
Properties
Get or set the cutting line theme.
Methods
Create a new cutting line.
Add a point to the cutting line
boundingRectGet the bounding rectangle of the cutting line.
Cut the edges that this cutting line intersects with.
paintDraw the cutting line.
Reset the cutting line by removing all points
shapeGet the shape of the cutting line.
- __init__(scene: NodeScene, parent: ~PyQt5.QtWidgets.QGraphicsItem = None, theme: ~typing.Type[~QNodeEditor.themes.theme.Theme] = <class 'QNodeEditor.themes.dark.DarkTheme'>)#
Create a new cutting line.
- Parameters:
scene (
NodeScene) – Scene the cutter should act inparent (QGraphicsItem, optional) – Parent item (if any)
theme (Type[
Theme], optional) – Theme for the cutting line (default:DarkTheme)
- cut() None#
Cut the edges that this cutting line intersects with.
- Return type:
None