|
QGIS API Documentation
3.4.15-Madeira (e83d02e274)
|
#include <qgstrackedvectorlayertools.h>

Public Member Functions | |
| QgsTrackedVectorLayerTools ()=default | |
| Constructor for QgsTrackedVectorLayerTools. More... | |
| bool | addFeature (QgsVectorLayer *layer, const QgsAttributeMap &defaultValues, const QgsGeometry &defaultGeometry, QgsFeature *feature) const override |
| This method should/will be called, whenever a new feature will be added to the layer. More... | |
| bool | copyMoveFeatures (QgsVectorLayer *layer, QgsFeatureRequest &request, double dx=0, double dy=0, QString *errorMsg=nullptr) const override |
| Copy and move features with defined translation. More... | |
| void | rollback () |
| Delete all features which have been added via this object. More... | |
| bool | saveEdits (QgsVectorLayer *layer) const override |
| Should be called, when the features should be committed but the editing session is not ended. More... | |
| void | setVectorLayerTools (const QgsVectorLayerTools *tools) |
| Set the vector layer tools that will be used to interact with the data. More... | |
| bool | startEditing (QgsVectorLayer *layer) const override |
| This will be called, whenever a vector layer should be switched to edit mode. More... | |
| bool | stopEditing (QgsVectorLayer *layer, bool allowCancel) const override |
| Will be called, when an editing session is ended and the features should be committed. More... | |
Public Member Functions inherited from QgsVectorLayerTools | |
| QgsVectorLayerTools () | |
Definition at line 26 of file qgstrackedvectorlayertools.h.
|
default |
Constructor for QgsTrackedVectorLayerTools.
|
overridevirtual |
This method should/will be called, whenever a new feature will be added to the layer.
| layer | The layer to which the feature should be added |
| defaultValues | Default values for the feature to add |
| defaultGeometry | A default geometry to add to the feature |
| feature | Updated feature after adding will be written back to this |
TODO QGIS 3: remove const qualifier
Implements QgsVectorLayerTools.
Definition at line 20 of file qgstrackedvectorlayertools.cpp.
|
overridevirtual |
Copy and move features with defined translation.
| layer | The layer |
| request | The request for the features to be moved. It will be assigned to a new feature request with the newly copied features. |
| dx | The translation on x |
| dy | The translation on y |
| errorMsg | If given, it will contain the error message |
TODO QGIS 3: remove const qualifier
Reimplemented from QgsVectorLayerTools.
Definition at line 56 of file qgstrackedvectorlayertools.cpp.
| void QgsTrackedVectorLayerTools::rollback | ( | ) |
Delete all features which have been added via this object.
Definition at line 66 of file qgstrackedvectorlayertools.cpp.
|
overridevirtual |
Should be called, when the features should be committed but the editing session is not ended.
| layer | The layer to commit |
TODO QGIS 3: remove const qualifier
Implements QgsVectorLayerTools.
Definition at line 51 of file qgstrackedvectorlayertools.cpp.
| void QgsTrackedVectorLayerTools::setVectorLayerTools | ( | const QgsVectorLayerTools * | tools | ) |
Set the vector layer tools that will be used to interact with the data.
Definition at line 61 of file qgstrackedvectorlayertools.cpp.
|
overridevirtual |
This will be called, whenever a vector layer should be switched to edit mode.
Check the providers capability to edit in here. If successful layer->startEditing() will be called and true returned.
| layer | The layer on which to start an edit session |
TODO QGIS 3: remove const qualifier
Implements QgsVectorLayerTools.
Definition at line 41 of file qgstrackedvectorlayertools.cpp.
|
overridevirtual |
Will be called, when an editing session is ended and the features should be committed.
Appropriate dialogs should be shown like
| layer | The layer to commit |
| allowCancel | True if a cancel button should be offered |
TODO QGIS 3: remove const qualifier
Implements QgsVectorLayerTools.
Definition at line 46 of file qgstrackedvectorlayertools.cpp.
1.8.11