QGIS API Documentation 3.41.0-Master (3440c17df1d)
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
57 void clear();
58
64 QSet<QgsVectorLayer *> layers() const;
65
71 QSet<QgsVectorLayer *> modifiedLayers() const;
72
78 bool startEditing();
79
101 bool commitChanges( QStringList &commitErrors SIP_OUT, bool stopEditing = true );
102
112 bool rollBack( QStringList &rollbackErrors SIP_OUT, bool stopEditing = true );
113
117 bool isEditing() const;
118
119 private:
120
121 QList<QgsVectorLayer *> orderLayersParentsToChildren( QSet<QgsVectorLayer *> layers );
122 void editingFinished( bool stopEditing );
123
124 QSet<QgsVectorLayer *> mLayers;
125
126 bool mIsEditing = false;
127};
128
129#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