QGIS API Documentation
4.3.0-Master (16eddb2670e)
Toggle main menu visibility
Loading...
Searching...
No Matches
src
core
vector
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
7
email : damiano@opengis.ch
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
26
class
QgsVectorLayer
;
27
40
class
CORE_EXPORT
QgsVectorLayerEditBufferGroup
:
public
QObject
41
{
42
Q_OBJECT
43
44
public
:
46
explicit
QgsVectorLayerEditBufferGroup
( QObject *parent =
nullptr
);
47
51
void
addLayer
(
QgsVectorLayer
*layer );
52
58
void
removeLayer
(
QgsVectorLayer
*layer );
59
63
void
clear
();
64
70
QSet<QgsVectorLayer *>
layers
()
const
;
71
77
QSet<QgsVectorLayer *>
modifiedLayers
()
const
;
78
84
bool
startEditing
();
85
107
bool
commitChanges
( QStringList &commitErrors
SIP_OUT
,
bool
stopEditing =
true
);
108
118
bool
rollBack
( QStringList &rollbackErrors
SIP_OUT
,
bool
stopEditing =
true
);
119
123
bool
isEditing
()
const
;
124
125
private
:
126
QList<QgsVectorLayer *> orderLayersParentsToChildren( QSet<QgsVectorLayer *>
layers
);
127
void
editingFinished(
bool
stopEditing );
128
129
QSet<QgsVectorLayer *> mLayers;
130
131
bool
mIsEditing =
false
;
132
};
133
134
#endif
// QGSVECTORLAYEREDITBUFFERGROUP_H
QgsVectorLayerEditBufferGroup::commitChanges
bool commitChanges(QStringList &commitErrors, bool stopEditing=true)
Attempts to commit any changes to disk.
Definition
qgsvectorlayereditbuffergroup.cpp:120
QgsVectorLayerEditBufferGroup::startEditing
bool startEditing()
Start editing.
Definition
qgsvectorlayereditbuffergroup.cpp:63
QgsVectorLayerEditBufferGroup::clear
void clear()
Remove all layers from this edit buffer group.
Definition
qgsvectorlayereditbuffergroup.cpp:42
QgsVectorLayerEditBufferGroup::rollBack
bool rollBack(QStringList &rollbackErrors, bool stopEditing=true)
Stop editing and discard the edits.
Definition
qgsvectorlayereditbuffergroup.cpp:338
QgsVectorLayerEditBufferGroup::removeLayer
void removeLayer(QgsVectorLayer *layer)
Remove a layer from this edit buffer group.
Definition
qgsvectorlayereditbuffergroup.cpp:37
QgsVectorLayerEditBufferGroup::addLayer
void addLayer(QgsVectorLayer *layer)
Add a layer to this edit buffer group.
Definition
qgsvectorlayereditbuffergroup.cpp:32
QgsVectorLayerEditBufferGroup::layers
QSet< QgsVectorLayer * > layers() const
Gets the set of layers currently managed by this edit buffer group.
Definition
qgsvectorlayereditbuffergroup.cpp:47
QgsVectorLayerEditBufferGroup::modifiedLayers
QSet< QgsVectorLayer * > modifiedLayers() const
Gets the set of modified layers currently managed by this edit buffer group.
Definition
qgsvectorlayereditbuffergroup.cpp:52
QgsVectorLayerEditBufferGroup::QgsVectorLayerEditBufferGroup
QgsVectorLayerEditBufferGroup(QObject *parent=nullptr)
Constructor for QgsEditBufferGroup.
Definition
qgsvectorlayereditbuffergroup.cpp:28
QgsVectorLayerEditBufferGroup::isEditing
bool isEditing() const
Returns true if the layers are in editing mode.
Definition
qgsvectorlayereditbuffergroup.cpp:388
QgsVectorLayer
Represents a vector layer which manages a vector based dataset.
Definition
qgsvectorlayer.h:414
qgis_sip.h
SIP_OUT
#define SIP_OUT
Definition
qgis_sip.h:57
Generated on
for QGIS API Documentation by
1.17.0