Class: QgsVectorLayerEditPassthrough¶
-
class
qgis.core.
QgsVectorLayerEditPassthrough
(layer: QgsVectorLayer)¶ Bases:
QgsVectorLayerEditBuffer
- Parameters
layer –
-
addFeature
(self, f: QgsFeature) → bool¶ - Parameters
f (QgsFeature) –
- Return type
bool
-
addFeatures
(self, features: Iterable[QgsFeature]) → bool¶ - Parameters
features (Iterable[QgsFeature]) –
- 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
fid (int) –
geom (QgsGeometry) –
- Return type
bool
-
childEvent
(self, QChildEvent)¶
-
commitChanges
(self, commitErrors: Iterable[str]) → bool¶ - Parameters
commitErrors (Iterable[str]) –
- Return type
bool
-
connectNotify
(self, QMetaMethod)¶
-
customEvent
(self, QEvent)¶
-
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
(self, QMetaMethod)¶
-
handleAttributeAdded
(self, index: int)¶ Update added and changed features after addition of an attribute
-
handleAttributeDeleted
(self, index: int)¶ Update added and changed features after removal of an attribute
-
isModified
(self) → bool¶ - Return type
bool
-
isSignalConnected
(self, QMetaMethod) → bool¶
-
receivers
(self, PYQT_SIGNAL) → int¶
-
renameAttribute
(self, attr: int, newName: str) → bool¶ - Parameters
attr (int) –
newName (str) –
- Return type
bool
-
rollBack
(self)¶
-
sender
(self) → QObject¶
-
senderSignalIndex
(self) → int¶
-
timerEvent
(self, QTimerEvent)¶
-
undoIndexChanged
(self, index: int)¶
-
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
(self, attrs: Dict[int, Any], index: int, offset: int)¶ Updates an index in an attribute map to a new value (for updates of changed attributes)
-
updateChangedAttributes
(self, f: QgsFeature)¶ Update feature with uncommitted attribute updates
-
updateFeatureGeometry
(self, f: QgsFeature)¶ Update feature with uncommitted geometry updates
-
updateLayerFields
(self)¶