Class: QgsVectorLayerToolsContext¶
- class qgis.core.QgsVectorLayerToolsContext¶
Bases:
sip.wrapper
Contains settings which reflect the context in which vector layer tool operations should consider.
Added in version 3.38.
QgsVectorLayerToolsContext() Constructor for QgsVectorLayerToolsContext.
QgsVectorLayerToolsContext(other:
QgsVectorLayerToolsContext
) Copy constructor.- Parameters:
other –
source QgsVectorLayerToolsContext
Methods
Returns an additional expression context scope to be made available when calculating expressions.
Returns the optional expression context used by the vector layer tools.
Returns whether the parent widget should be hidden when showing tools' dialogues.
Returns the widget which should be parented to tools dialogues.
Sets an additional expression context scope to be made available when calculating expressions.
Sets the optional expression context used by the vector layer tools.
Sets whether the parent widget should be hidden when showing tools' dialogues.
Sets the widget which should be parented to tools' dialogues.
Sets whether tools' dialogues should be modal.
Returns whether tools' dialogues should be modal.
- additionalExpressionContextScope(self) QgsExpressionContextScope | None ¶
Returns an additional expression context scope to be made available when calculating expressions.
- Return type:
Optional[QgsExpressionContextScope]
- expressionContext(self) QgsExpressionContext | None ¶
Returns the optional expression context used by the vector layer tools.
See also
See also
- Return type:
Optional[QgsExpressionContext]
- hideParent(self) bool ¶
Returns whether the parent widget should be hidden when showing tools’ dialogues.
- Return type:
bool
- parentWidget(self) QWidget | None ¶
Returns the widget which should be parented to tools dialogues.
- Return type:
Optional[QWidget]
- setAdditionalExpressionContextScope(self, scope: QgsExpressionContextScope | None)¶
Sets an additional expression context scope to be made available when calculating expressions.
- Parameters:
scope (Optional[QgsExpressionContextScope]) – additional scope. Ownership is not transferred and a copy will be made.
See also
- setExpressionContext(self, context: QgsExpressionContext | None)¶
Sets the optional expression context used by the vector layer tools.
- Parameters:
context (Optional[QgsExpressionContext]) – expression context pointer. Ownership is not transferred.
See also
- setHideParent(self, hide: bool)¶
Sets whether the parent widget should be hidden when showing tools’ dialogues.
- Parameters:
hide (bool)
- setParentWidget(self, parent: QWidget | None)¶
Sets the widget which should be parented to tools’ dialogues.
- Parameters:
parent (Optional[QWidget]) – the widget actign as parent
- setShowModal(self, modal: bool)¶
Sets whether tools’ dialogues should be modal.
- Parameters:
modal (bool)
- showModal(self) bool ¶
Returns whether tools’ dialogues should be modal.
- Return type:
bool