Class: QgsModelGraphicsView

class qgis.gui.QgsModelGraphicsView(parent: QWidget = None)

Bases: PyQt5.QtWidgets.QGraphicsView

Constructor for QgsModelGraphicsView, with the specified parent widget.

QGraphicsView subclass representing the model designer.

Warning

Not stable API

New in version 3.14.

Parameters

parent

actionEvent()
algorithmDropped

Emitted when an algorithm is dropped onto the view. [signal]

Parameters
  • algorithmId (str) –

  • pos (Union[QPointF) –

changeEvent()
childEvent()
closeEvent()
connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent(self, event: QDragEnterEvent)
Parameters

event (QDragEnterEvent) –

dragLeaveEvent()
dragMoveEvent(self, event: QDragMoveEvent)
Parameters

event (QDragMoveEvent) –

drawBackground()
drawForeground()
drawFrame()
dropEvent(self, event: QDropEvent)
Parameters

event (QDropEvent) –

endMacroCommand(self)

Ends a macro command, containing a group of interactions in the view.

enterEvent()
event()
eventFilter()
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
initStyleOption()
inputDropped

Emitted when an input parameter is dropped onto the view. [signal]

Parameters
  • inputId (str) –

  • pos (Union[QPointF) –

inputMethodEvent()
isSignalConnected()
itemFocused

Emitted when an item is “focused” in the view, i.e. it becomes the active item and should have its properties displayed in any designer windows. [signal]

Parameters

item (QgsModelComponentGraphicItem) –

keyPressEvent(self, event: QKeyEvent)
Parameters

event (QKeyEvent) –

keyReleaseEvent(self, event: QKeyEvent)
Parameters

event (QKeyEvent) –

leaveEvent()
macroCommandEnded

Emitted when a macro command containing a group of interactions in the view has ended. [signal]

macroCommandStarted

Emitted when a macro command containing a group of interactions is started in the view. [signal]

Parameters

text (str) –

metric()
modelScene(self)QgsModelGraphicsScene

Returns the scene associated with the tool.

See also

view()

Return type

QgsModelGraphicsScene

mouseDoubleClickEvent(self, event: QMouseEvent)
Parameters

event (QMouseEvent) –

mouseMoveEvent(self, event: QMouseEvent)
Parameters

event (QMouseEvent) –

mousePressEvent(self, event: QMouseEvent)
Parameters

event (QMouseEvent) –

mouseReleaseEvent(self, event: QMouseEvent)
Parameters

event (QMouseEvent) –

moveEvent()
nativeEvent()
paintEvent()
receivers()
resizeEvent()
scrollContentsBy()
sender()
senderSignalIndex()
setModelScene(self, scene: QgsModelGraphicsScene)

Sets the related scene.

Parameters

scene (QgsModelGraphicsScene) –

setViewportMargins()
setupViewport()
sharedPainter()
showEvent()
snapSelected(self)

Snaps the selected items to the grid.

startMacroCommand(self, text: str)

Starts a macro command, containing a group of interactions in the view.

Parameters

text (str) –

tabletEvent()
timerEvent()
updateMicroFocus()
viewportEvent()
viewportMargins()
viewportSizeHint()
wheelEvent(self, event: QWheelEvent)
Parameters

event (QWheelEvent) –

willBeDeleted

Emitted in the destructor when the view is about to be deleted, but is still in a perfectly valid state. [signal]