QGIS API Documentation 3.41.0-Master (af5edcb665c)
Loading...
Searching...
No Matches
qgsvectorlayereditbuffergroup.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvectorlayereditbuffergroup.h - QgsVectorLayerEditBufferGroup
3
4 ---------------------
5 begin : 22.12.2021
6 copyright : (C) 2021 by Damiano Lombardi
8 ***************************************************************************
9 * *
10 * This program is free software; you can redistribute it and/or modify *
11 * it under the terms of the GNU General Public License as published by *
12 * the Free Software Foundation; either version 2 of the License, or *
13 * (at your option) any later version. *
14 * *
15 ***************************************************************************/
16
17#ifndef QGSVECTORLAYEREDITBUFFERGROUP_H
18#define QGSVECTORLAYEREDITBUFFERGROUP_H
19
20#include "qgis_core.h"
21#include "qgis_sip.h"
22
23#include <QObject>
24#include <QSet>
25
26class QgsVectorLayer;
27
40class CORE_EXPORT QgsVectorLayerEditBufferGroup : public QObject
41{
42 Q_OBJECT
43
44 public:
45
47 explicit QgsVectorLayerEditBufferGroup( QObject *parent = nullptr );
48
52 void addLayer( QgsVectorLayer *layer );
53
59 void removeLayer( QgsVectorLayer *layer );
60
64 void clear();
65
71 QSet<QgsVectorLayer *> layers() const;
72
78 QSet<QgsVectorLayer *> modifiedLayers() const;
79
85 bool startEditing();
86
108 bool commitChanges( QStringList &commitErrors SIP_OUT, bool stopEditing = true );
109
119 bool rollBack( QStringList &rollbackErrors SIP_OUT, bool stopEditing = true );
120
124 bool isEditing() const;
125
126 private:
127
128 QList<QgsVectorLayer *> orderLayersParentsToChildren( QSet<QgsVectorLayer *> layers );
129 void editingFinished( bool stopEditing );
130
131 QSet<QgsVectorLayer *> mLayers;
132
133 bool mIsEditing = false;
134};
135
136#endif // QGSVECTORLAYEREDITBUFFERGROUP_H
The edit buffer group manages a group of edit buffers.
Represents a vector layer which manages a vector based data sets.
#define SIP_OUT
Definition qgis_sip.h:58