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
classThe graphics node is the graphical representation of a node.
-
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
-
initUI
() → None¶ Set up this
QGraphicsItem
.
-
initStyle
() → None¶ Initialize
QObjects
likeQColor
,QPen
andQBrush
.
-
initSizes
() → None¶ Set up internal attributes like width, height, etc.
-
initContent
() → None¶ Set up the
GraphicsNodeContentProxy
to have a container forGraphicsNodeContent
.
-
boundingRect
()¶ Define Qt’ bounding rectangle.
-
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.
-
property
-
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>¶
-