Class: QgsModelGraphicsView¶
QGraphicsView subclass representing the model designer.
Warning
Not stable API
Added in version 3.14.
Class Hierarchy¶
Base classes¶
Methods
Starts a single undo command |
|
Cuts or copies the a list of items, respecting the specified operation. |
|
Cuts or copies the selected items, respecting the specified operation. |
|
Ends a single undo command |
|
Ends a macro command, containing a group of interactions in the view. |
|
Returns the scene associated with the tool. |
|
Pastes items from clipboard, using the specified mode. |
|
Sets the related scene. |
|
Snaps the selected items to the grid. |
|
Starts a macro command, containing a group of interactions in the view. |
Signals
Emitted when an algorithm is dropped onto the view. |
|
Emitted when an undo command is started in the view. |
|
Emitted when an undo command in the view has ended. |
|
Emitted when the selected items should be deleted; |
|
Emitted when an input parameter is dropped onto the view. |
|
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. |
|
Emitted when a macro command containing a group of interactions in the view has ended. |
|
Emitted when a macro command containing a group of interactions is started in the view. |
|
Emitted in the destructor when the view is about to be deleted, but is still in a perfectly valid state. |
Attributes
- class qgis.gui.QgsModelGraphicsView[source]¶
Bases:
QGraphicsView
- __init__(parent: QWidget | None = None)
Constructor for QgsModelGraphicsView, with the specified
parent
widget.- Parameters:
parent (Optional[QWidget] = None)
- ClipboardCopy = 1¶
- ClipboardCut = 0¶
- class ClipboardOperation¶
Bases:
int
- class PasteMode¶
Bases:
int
- PasteModeCenter = 1¶
- PasteModeCursor = 0¶
- PasteModeInPlace = 2¶
- signal algorithmDropped(algorithmId: str, pos: QPointF)[source]¶
Emitted when an algorithm is dropped onto the view.
- Parameters:
algorithmId (str)
pos (QPointF)
- beginCommand(self, text: str | None)[source]¶
Starts a single undo command
- Parameters:
text (Optional[str])
- signal commandBegun(text: str)[source]¶
Emitted when an undo command is started in the view.
- Parameters:
text (str)
- copyItems(self, items: Iterable[QgsModelComponentGraphicItem], operation: QgsModelGraphicsView.ClipboardOperation)[source]¶
Cuts or copies the a list of
items
, respecting the specifiedoperation
.See also
See also
- Parameters:
items (Iterable[QgsModelComponentGraphicItem])
operation (QgsModelGraphicsView.ClipboardOperation)
- copySelectedItems(self, operation: QgsModelGraphicsView.ClipboardOperation)[source]¶
Cuts or copies the selected items, respecting the specified
operation
.See also
See also
- Parameters:
operation (QgsModelGraphicsView.ClipboardOperation)
- endMacroCommand(self)[source]¶
Ends a macro command, containing a group of interactions in the view.
- signal inputDropped(inputId: str, pos: QPointF)[source]¶
Emitted when an input parameter is dropped onto the view.
- Parameters:
inputId (str)
pos (QPointF)
- signal itemFocused(item: QgsModelComponentGraphicItem)[source]¶
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.- Parameters:
item (QgsModelComponentGraphicItem)
- signal macroCommandEnded[source]¶
Emitted when a macro command containing a group of interactions in the view has ended.
- signal macroCommandStarted(text: str)[source]¶
Emitted when a macro command containing a group of interactions is started in the view.
- Parameters:
text (str)
- modelScene(self) QgsModelGraphicsScene | None [source]¶
Returns the scene associated with the tool.
See also
view()
- Return type:
Optional[QgsModelGraphicsScene]
- pasteItems(self, mode: QgsModelGraphicsView.PasteMode)[source]¶
Pastes items from clipboard, using the specified
mode
.See also
See also
hasItemsInClipboard()
- Parameters:
- setModelScene(self, scene: QgsModelGraphicsScene | None)[source]¶
Sets the related
scene
.- Parameters:
scene (Optional[QgsModelGraphicsScene])