QGIS API Documentation 3.41.0-Master (cea29feecf2)
Loading...
Searching...
No Matches
qgsvectordataproviderfeaturepool.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsvectordataproviderfeaturepool.h
3 --------------------------------------
4Date : 3.9.2018
5Copyright : (C) 2018 by Matthias Kuhn
7 ***************************************************************************
8 * *
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
13 * *
14 ***************************************************************************/
15
16#ifndef QGSVECTORDATAPROVIDERFEATUREPOOL_H
17#define QGSVECTORDATAPROVIDERFEATUREPOOL_H
18
19#include "qgsfeaturepool.h"
20#include "qgsvectorlayer.h"
21
22#define SIP_NO_FILE
23
31{
32 public:
37 QgsVectorDataProviderFeaturePool( QgsVectorLayer *layer, bool selectedOnly = false );
38
39 bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) override;
40 bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) override;
41 void updateFeature( QgsFeature &feature ) override;
42 void deleteFeature( QgsFeatureId fid ) override;
43
44 private:
45 bool mSelectedOnly = false;
46};
47
48#endif // QGSVECTORDATAPROVIDERFEATUREPOOL_H
A feature pool is based on a vector layer and caches features.
virtual void updateFeature(QgsFeature &feature)=0
Updates a feature in this pool.
virtual void deleteFeature(QgsFeatureId fid)=0
Removes a feature from this pool.
virtual bool addFeature(QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())
Adds a single feature to the sink.
virtual bool addFeatures(QgsFeatureList &features, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())=0
Adds a list of features to the sink.
QFlags< Flag > Flags
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition qgsfeature.h:58
A feature pool based on a vector data provider.
Represents a vector layer which manages a vector based data sets.
QList< QgsFeature > QgsFeatureList
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features