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
- rtype:
QAction
- rtype:
QAction
- rtype:
QAction
- rtype:
QAction
Raise, unminimize and activate this window.
- param algorithmId:
- param inputId:
Starts an undo command.
Checks if there are unsaved changes in the model, and if so, prompts the user to save them.
- param event:
Ends the current undo command.
Loads a model into the designer from the specified file
path
.- rtype:
QgsMessageBar
Returns the model shown in the dialog.
- param showControls:
- param saveAs:
- param dirty:
Sets the inputs for child algorithms for the last run of the model through the designer window.
Sets the results of child algorithms for the last run of the model through the designer window.
Sets the
model
shown in the dialog.Sets the related
scene
.- rtype:
QToolBar
Checks if the model can current be saved, and returns
True
if it can.- rtype:
QGraphicsView
- 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
- activate(self)¶
Raise, unminimize and activate this window.
New in version 3.24.
- addAlgorithm(self, algorithmId: str, pos: QPointF | QPoint)¶
- Parameters:
algorithmId (str) –
pos (Union[QPointF) –
- addInput(self, inputId: str, pos: 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: PyQt5.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:
- metric(self, QPaintDevice.PaintDeviceMetric) int ¶
- model(self) QgsProcessingModelAlgorithm ¶
Returns the model shown in the dialog.
- Return type:
- mouseDoubleClickEvent(self, QMouseEvent)¶
- mouseMoveEvent(self, QMouseEvent)¶
- mousePressEvent(self, QMouseEvent)¶
- mouseReleaseEvent(self, QMouseEvent)¶
- moveEvent(self, QMoveEvent)¶
- nativeEvent(self, Union[QByteArray, bytes, bytearray], PyQt5.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) bool ¶
- Parameters:
saveAs (bool = False) –
- Return type:
bool
- 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) –
- 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)¶