1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/vector/qgsvectorlayereditbuffergroup.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
class QgsVectorLayerEditBufferGroup : QObject
{
%Docstring(signature="appended")
The edit buffer group manages a group of edit buffers.
Commands like commit and rollback are managed by the group invokes
individual :py:func:`~addFeature`, :py:func:`~deleteFeature`, ... in the
correct order across all contained edit buffers.
.. versionadded:: 3.26
%End
%TypeHeaderCode
#include "qgsvectorlayereditbuffergroup.h"
%End
public:
explicit QgsVectorLayerEditBufferGroup( QObject *parent = 0 );
%Docstring
Constructor for :py:class:`QgsEditBufferGroup`
%End
void addLayer( QgsVectorLayer *layer );
%Docstring
Add a layer to this edit buffer group.
%End
void removeLayer( QgsVectorLayer *layer );
%Docstring
Remove a layer from this edit buffer group.
.. versionadded:: 3.42
%End
void clear();
%Docstring
Remove all layers from this edit buffer group.
%End
QSet<QgsVectorLayer *> layers() const;
%Docstring
Gets the set of layers currently managed by this edit buffer group.
:return: Layer set
%End
QSet<QgsVectorLayer *> modifiedLayers() const;
%Docstring
Gets the set of modified layers currently managed by this edit buffer
group.
:return: Layer set
%End
bool startEditing();
%Docstring
Start editing
:return: ``True`` on success
%End
bool commitChanges( QStringList &commitErrors /Out/, bool stopEditing = true );
%Docstring
Attempts to commit any changes to disk. Returns the result of the
attempt. If a commit fails, the in-memory changes are left alone.
This allows editing to continue if the commit failed on e.g. a
disallowed value in a Postgres database - the user can re-edit and try
again.
The commits occur in distinct stages, (add attributes, add features,
change attribute values, change geometries, delete features, delete
attributes) so if a stage fails, it's difficult to roll back cleanly.
Therefore any error message also includes which stage failed so that the
user has some chance of repairing the damage cleanly.
:param stopEditing: if set to ``False``, the layer will stay in editing
mode. Otherwise the layer editing mode will be
disabled if the commit is successful.
:return: - ``True`` on success
- commitErrors: a list of descriptive errors if the commit
fails.
%End
bool rollBack( QStringList &rollbackErrors /Out/, bool stopEditing = true );
%Docstring
Stop editing and discard the edits
:param stopEditing: if set to ``False``, the layer will stay in editing
mode. Otherwise the layer editing mode will be
disabled if the rollback is successful.
:return: - ``False`` if errors occurred during rollback
- rollbackErrors: a list of descriptive errors if the rollback
fails.
%End
bool isEditing() const;
%Docstring
Returns ``True`` if the layers are in editing mode
%End
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/vector/qgsvectorlayereditbuffergroup.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
|