Class: QgsModelDesignerDialog

class qgis.gui.QgsModelDesignerDialog

Bases: PyQt5.QtWidgets.QMainWindow

Model designer dialog base class

Warning

Not stable API

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

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()
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()
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()
closeEvent(self, event: QCloseEvent)
Parameters

event (QCloseEvent) –

connectNotify()
contextMenuEvent()
create()
customEvent()
destroy()
disconnectNotify()
dragEnterEvent()
dragLeaveEvent()
dragMoveEvent()
dropEvent()
endUndoCommand(self)

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

enterEvent()
event()
exportAsScriptAlgorithm(self)
focusInEvent()
focusNextChild()
focusNextPrevChild()
focusOutEvent()
focusPreviousChild()
hideEvent()
initPainter()
inputMethodEvent()
isSignalConnected()
keyPressEvent()
keyReleaseEvent()
leaveEvent()
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()
model(self)QgsProcessingModelAlgorithm

Returns the model shown in the dialog.

Return type

QgsProcessingModelAlgorithm

mouseDoubleClickEvent()
mouseMoveEvent()
mousePressEvent()
mouseReleaseEvent()
moveEvent()
nativeEvent()
paintEvent()
receivers()
repaintModel(self, showControls: bool = True)
Parameters

showControls (bool = True) –

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

saveAs (bool = False) –

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

dirty (bool) –

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()
showEvent()
tabletEvent()
timerEvent()
toolbar(self) → QToolBar
Return type

QToolBar

updateMicroFocus()
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()