Class: QgsModelDesignerDialog

class qgis.gui.QgsModelDesignerDialog

Bases: PyQt5.QtWidgets.QMainWindow

Model designer dialog base class

Warning

Not stable API

New in version 3.14:

Methods

actionEditHelp

rtype

QAction

actionEvent

actionOpen

rtype

QAction

actionRun

rtype

QAction

actionSaveInProject

rtype

QAction

addAlgorithm

param algorithmId

addInput

param inputId

beginUndoCommand

Starts an undo command.

changeEvent

checkForUnsavedChanges

Checks if there are unsaved changes in the model, and if so, prompts the user to save them.

childEvent

closeEvent

param event

connectNotify

contextMenuEvent

create

customEvent

destroy

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

endUndoCommand

Ends the current undo command.

enterEvent

event

exportAsScriptAlgorithm

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPreviousChild

hideEvent

initPainter

inputMethodEvent

isSignalConnected

keyPressEvent

keyReleaseEvent

leaveEvent

loadModel

Loads a model into the designer from the specified file path.

messageBar

rtype

QgsMessageBar

metric

model

Returns the model shown in the dialog.

mouseDoubleClickEvent

mouseMoveEvent

mousePressEvent

mouseReleaseEvent

moveEvent

nativeEvent

paintEvent

receivers

repaintModel

param showControls

resizeEvent

saveModel

param saveAs

sender

senderSignalIndex

setDirty

param dirty

setLastRunChildAlgorithmInputs

Sets the inputs for child algorithms for the last run of the model through the designer window.

setLastRunChildAlgorithmResults

Sets the results of child algorithms for the last run of the model through the designer window.

setModel

Sets the model shown in the dialog.

setModelScene

Sets the related scene.

sharedPainter

showEvent

tabletEvent

timerEvent

toolbar

rtype

QToolBar

updateMicroFocus

validateSave

Checks if the model can current be saved, and returns True if it can.

view

rtype

QGraphicsView

wheelEvent

actionEditHelp(self) QAction
Return type

QAction

actionEvent(self, QActionEvent)
actionOpen(self) QAction
Return type

QAction

actionRun(self) QAction
Return type

QAction

actionSaveInProject(self) QAction
Return type

QAction

addAlgorithm(self, algorithmId: str, pos: Union[QPointF, QPoint])
Parameters
  • algorithmId (str) –

  • pos (Union[QPointF) –

addInput(self, inputId: str, pos: Union[QPointF, QPoint])
Parameters
  • inputId (str) –

  • pos (Union[QPointF) –

beginUndoCommand(self, text: str, id: int = 0)

Starts an undo command. This should be called before any changes are made to the model.

Parameters
  • text (str) –

  • id (int = 0) –

changeEvent(self, QEvent)
checkForUnsavedChanges(self) bool

Checks if there are unsaved changes in the model, and if so, prompts the user to save them.

Returns False if the cancel option was selected

Return type

bool

childEvent(self, QChildEvent)
closeEvent(self, event: QCloseEvent)
Parameters

event (QCloseEvent) –

connectNotify(self, QMetaMethod)
contextMenuEvent(self, QContextMenuEvent)
create(self, window: sip.voidptr = 0, initializeWindow: bool = True, destroyOldWindow: bool = True)
customEvent(self, QEvent)
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True)
disconnectNotify(self, QMetaMethod)
dragEnterEvent(self, QDragEnterEvent)
dragLeaveEvent(self, QDragLeaveEvent)
dragMoveEvent(self, QDragMoveEvent)
dropEvent(self, QDropEvent)
endUndoCommand(self)

Ends the current undo command. This should be called after changes are made to the model.

enterEvent(self, QEvent)
event(self, QEvent) bool
exportAsScriptAlgorithm(self)
focusInEvent(self, QFocusEvent)
focusNextChild(self) bool
focusNextPrevChild(self, bool) bool
focusOutEvent(self, QFocusEvent)
focusPreviousChild(self) bool
hideEvent(self, QHideEvent)
initPainter(self, QPainter)
inputMethodEvent(self, QInputMethodEvent)
isSignalConnected(self, QMetaMethod) bool
keyPressEvent(self, QKeyEvent)
keyReleaseEvent(self, QKeyEvent)
leaveEvent(self, QEvent)
loadModel(self, path: str)

Loads a model into the designer from the specified file path.

Parameters

path (str) –

messageBar(self) QgsMessageBar
Return type

QgsMessageBar

metric(self, QPaintDevice.PaintDeviceMetric) int
model(self) QgsProcessingModelAlgorithm

Returns the model shown in the dialog.

Return type

QgsProcessingModelAlgorithm

mouseDoubleClickEvent(self, QMouseEvent)
mouseMoveEvent(self, QMouseEvent)
mousePressEvent(self, QMouseEvent)
mouseReleaseEvent(self, QMouseEvent)
moveEvent(self, QMoveEvent)
nativeEvent(self, Union[QByteArray, bytes, bytearray], sip.voidptr) Tuple[bool, int]
paintEvent(self, QPaintEvent)
receivers(self, PYQT_SIGNAL) int
repaintModel(self, showControls: bool = True)
Parameters

showControls (bool = True) –

resizeEvent(self, QResizeEvent)
saveModel(self, saveAs: bool = False)
Parameters

saveAs (bool = False) –

sender(self) QObject
senderSignalIndex(self) int
setDirty(self, dirty: bool)
Parameters

dirty (bool) –

setLastRunChildAlgorithmInputs(self, inputs: Dict[str, Any])

Sets the inputs for child algorithms for the last run of the model through the designer window.

Parameters

inputs (Dict[str) –

setLastRunChildAlgorithmResults(self, results: Dict[str, Any])

Sets the results of child algorithms for the last run of the model through the designer window.

Parameters

results (Dict[str) –

setModel(self, model: QgsProcessingModelAlgorithm)

Sets the model shown in the dialog.

Ownership of model is transferred to the dialog.

Parameters

model (QgsProcessingModelAlgorithm) –

setModelScene(self, scene: QgsModelGraphicsScene)

Sets the related scene.

Parameters

scene (QgsModelGraphicsScene) –

sharedPainter(self) QPainter
showEvent(self, QShowEvent)
tabletEvent(self, QTabletEvent)
timerEvent(self, QTimerEvent)
toolbar(self) QToolBar
Return type

QToolBar

updateMicroFocus(self)
validateSave(self) bool

Checks if the model can current be saved, and returns True if it can.

Return type

bool

view(self) QGraphicsView
Return type

QGraphicsView

wheelEvent(self, QWheelEvent)