node_graphics_scene Module

A module containing Graphic representation of Scene

class nodeeditor.node_graphics_scene.QDMGraphicsScene(scene: Scene, parent: PyQt5.QtWidgets.QWidget = None)

Bases: PyQt5.QtWidgets.QGraphicsScene

Class representing Graphic of Scene

Parameters
  • scene (Scene) – reference to the Scene

  • parent (QWidget) – parent widget

itemSelected

pyqtSignal emitted when some item is selected in the Scene

itemsDeselected

pyqtSignal emitted when items are deselected in the Scene

initAssets()

Initialize QObjects like QColor, QPen and QBrush

dragMoveEvent(event)

Overriden Qt’s dragMoveEvent to enable Qt’s Drag Events

setGrScene(width: int, height: int)

Set width and height of the Graphics Scene

drawBackground(painter: PyQt5.QtGui.QPainter, rect: PyQt5.QtCore.QRect)

Draw background scene grid