Class: QgsTrackedVectorLayerTools¶
Class Hierarchy¶
Base classes¶
Methods in this class are used to handle basic operations on vector layers. With an implementation of this class, parts of the application can ask for an operation to be done and the implementation will then take care of it. |
|
Methods
This method calls the addFeature method of the backend |
|
Delete all features which have been added via this object. |
|
Set the vector layer tools that will be used to interact with the data |
- class qgis.core.QgsTrackedVectorLayerTools[source]¶
Bases:
QgsVectorLayerTools
- addFeatureV2(self, layer: QgsVectorLayer | None, defaultValues: Dict[int, Any], defaultGeometry: QgsGeometry, context: QgsVectorLayerToolsContext)[source]¶
This method calls the addFeature method of the backend
QgsVectorLayerTools
- Parameters:
layer (Optional[QgsVectorLayer]) – The layer to which the feature should be added
defaultValues (Dict[int, Any]) – Default values for the feature to add
defaultGeometry (QgsGeometry) – A default geometry to add to the feature
context (
QgsVectorLayerToolsContext
) -> (bool) – A context object to be used for e.g. to calculate feature expression-based values (since QGIS 3.38)
- Returns:
True
in case of success,False
if the operation failed/was abortedfeature: A pointer to the feature
- setVectorLayerTools(self, tools: QgsVectorLayerTools | None)[source]¶
Set the vector layer tools that will be used to interact with the data
- Parameters:
tools (Optional[QgsVectorLayerTools])