Class: QgsVectorLayerEditPassthrough

class qgis.core.QgsVectorLayerEditPassthrough(layer: QgsVectorLayer)

Bases: QgsVectorLayerEditBuffer

Parameters

layer

addAttribute(self, field: QgsField) → bool
Parameters

field (QgsField) –

Return type

bool

addFeature(self, f: QgsFeature) → bool
Parameters

f (QgsFeature) –

Return type

bool

addFeatures(self, features: object) → bool
Parameters

features (object) –

Return type

bool

changeAttributeValue(self, fid: int, field: int, newValue: Any, oldValue: Any = None) → bool
Parameters
  • fid (int) –

  • field (int) –

  • newValue (Any) –

  • oldValue (Any = None) –

Return type

bool

changeAttributeValues(self, fid: int, newValues: Dict[int, Any], oldValues: Dict[int, Any]) → bool

Changes values of attributes (but does not commit it).

Return type

bool

Returns

true if attributes are well updated, false otherwise

New in version 3.0.

Parameters
  • fid (int) –

  • newValues (Dict[int) –

  • oldValues (Dict[int) –

changeGeometry(self, fid: int, geom: QgsGeometry) → bool
Parameters
Return type

bool

childEvent()
commitChanges(self, commitErrors: Iterable[str]) → bool
Parameters

commitErrors (Iterable[str]) –

Return type

bool

connectNotify()
customEvent()
deleteAttribute(self, attr: int) → bool
Parameters

attr (int) –

Return type

bool

deleteFeature(self, fid: int) → bool
Parameters

fid (int) –

Return type

bool

deleteFeatures(self, fids: object) → bool
Parameters

fids (object) –

Return type

bool

disconnectNotify()
handleAttributeAdded()
handleAttributeDeleted()
isModified(self) → bool
Return type

bool

isSignalConnected()
receivers()
renameAttribute(self, attr: int, newName: str) → bool
Parameters
  • attr (int) –

  • newName (str) –

Return type

bool

rollBack(self)
sender()
senderSignalIndex()
timerEvent()
undoIndexChanged()
update(self, transaction: QgsTransaction, sql: str, name: str) → bool

Update underlying data with a SQL query embedded in a transaction.

Parameters
  • transaction (QgsTransaction) – Transaction in which the sql query has been run

  • sql (str) – The SQL query updating data

  • name (str) – The name of the undo/redo command

Return type

bool

Returns

true if the undo/redo command is well added to the stack, false otherwise

New in version 3.0.

updateAttributeMapIndex()
updateChangedAttributes()
updateFeatureGeometry()
updateFields()
updateLayerFields()