nodedge.graphics_node

Graphics node module containing GraphicsNode class.

class nodedge.graphics_node.GraphicsNode(node: Node, parent: Optional[PySide2.QtWidgets.QGraphicsItem] = None)

Bases: PySide2.QtWidgets.QGraphicsItem

Node class

The graphics node is the graphical representation of a node.

Parameters
  • node (Node) – reference to Node

  • parent (Optional[QGraphicsItem]) – parent widget

property title

Title of this GraphicsNode.

Getter

Return current GraphicsNode title

Setter

Store and make visible the new title

Type

str

property selectedState
property content
Getter

Return reference to GraphicsNodeContent

Return type

GraphicsNodeContent

initUI() → None

Set up this QGraphicsItem.

initStyle() → None

Initialize QObjects like QColor, QPen and QBrush.

initSizes() → None

Set up internal attributes like width, height, etc.

initContent() → None

Set up the GraphicsNodeContentProxy to have a container for GraphicsNodeContent.

boundingRect()

Define Qt’ bounding rectangle.

paint(painter, QStyleOptionGraphicsItem, widget=None)

Paint the rounded rectangular Node.

mouseMoveEvent(event)

Override Qt’s event to detect that we moved this .

mouseReleaseEvent(event)

Handle Qt’s event when we move, select or deselect this GraphicsNode.

hoverEnterEvent(event: PySide2.QtWidgets.QGraphicsSceneHoverEvent) → None

Handle Qt’s hover event. It adds a highlighting boundary around this GraphicsNode.

hoverLeaveEvent(event: PySide2.QtWidgets.QGraphicsSceneHoverEvent) → None

Handle Qt’s hover effect.

mouseDoubleClickEvent(event: PySide2.QtWidgets.QGraphicsSceneMouseEvent)

Qt’s overridden event for doubleclick. Resend to onDoubleClicked()

onSelected()

Handle when the node has been selected.

class nodedge.graphics_node.GraphicsNodeWidget(parent=None)

Bases: PySide2.QtWidgets.QWidget

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class nodedge.graphics_node.GraphicsNodeVBoxLayout(parent=None)

Bases: PySide2.QtWidgets.QVBoxLayout

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class nodedge.graphics_node.GraphicsNodeTitleFrame(parent=None)

Bases: PySide2.QtWidgets.QFrame

staticMetaObject = <PySide2.QtCore.QMetaObject object>
class nodedge.graphics_node.GraphicsNodeStatusLabel(parent=None)

Bases: PySide2.QtWidgets.QLabel

staticMetaObject = <PySide2.QtCore.QMetaObject object>