Class: QgsTrackedVectorLayerTools

class qgis.core.QgsTrackedVectorLayerTools

Bases: QgsVectorLayerTools

Constructor for QgsTrackedVectorLayerTools.

Methods

addFeature

This method calls the addFeature method of the backend QgsVectorLayerTools

childEvent

connectNotify

copyMoveFeatures

param layer:

customEvent

disconnectNotify

isSignalConnected

receivers

rollback

Delete all features which have been added via this object.

saveEdits

param layer:

sender

senderSignalIndex

setVectorLayerTools

Set the vector layer tools that will be used to interact with the data

startEditing

param layer:

stopEditing

param layer:

timerEvent

addFeature(self, layer: QgsVectorLayer, defaultValues: Dict[int, Any], defaultGeometry: QgsGeometry, feature: QgsFeature, parentWidget: QWidget = None, showModal: bool = True, hideParent: bool = False) bool

This method calls the addFeature method of the backend QgsVectorLayerTools

Parameters:
  • layer (QgsVectorLayer) – The layer to which the feature should be added

  • defaultValues (Dict[int) – Default values for the feature to add

  • defaultGeometry (QgsGeometry) – A default geometry to add to the feature

  • feature (QgsFeature) – A pointer to the feature

  • parentWidget (QWidget = None) – The widget calling this function to be passed to the used dialog

  • showModal (bool = True) – If the used dialog should be modal or not

  • hideParent (bool = False) – If the parent widget should be hidden, when the used dialog is opened

Return type:

bool

Returns:

True in case of success, False if the operation failed/was aborted

childEvent(self, QChildEvent)
connectNotify(self, QMetaMethod)
copyMoveFeatures(self, layer: QgsVectorLayer, request: QgsFeatureRequest, dx: float = 0, dy: float = 0, errorMsg: str = '', topologicalEditing: bool = False, topologicalLayer: QgsVectorLayer = None) bool
Parameters:
Return type:

bool

customEvent(self, QEvent)
disconnectNotify(self, QMetaMethod)
isSignalConnected(self, QMetaMethod) bool
receivers(self, PYQT_SIGNAL) int
rollback(self)

Delete all features which have been added via this object.

saveEdits(self, layer: QgsVectorLayer) bool
Parameters:

layer (QgsVectorLayer) –

Return type:

bool

sender(self) QObject
senderSignalIndex(self) int
setVectorLayerTools(self, tools: QgsVectorLayerTools)

Set the vector layer tools that will be used to interact with the data

Parameters:

tools (QgsVectorLayerTools) –

startEditing(self, layer: QgsVectorLayer) bool
Parameters:

layer (QgsVectorLayer) –

Return type:

bool

stopEditing(self, layer: QgsVectorLayer, allowCancel: bool) bool
Parameters:
Return type:

bool

timerEvent(self, QTimerEvent)