QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
qgsmemoryproviderutils.h
Go to the documentation of this file.
1/***************************************************************************
2 qgsmemoryproviderutils.h
3 ------------------------
4 begin : May 2017
5 copyright : (C) 2017 by Nyall Dawson
6 email : nyall dot dawson at gmail dot com
7 ***************************************************************************/
8
9/***************************************************************************
10 * *
11 * This program is free software; you can redistribute it and/or modify *
12 * it under the terms of the GNU General Public License as published by *
13 * the Free Software Foundation; either version 2 of the License, or *
14 * (at your option) any later version. *
15 * *
16 ***************************************************************************/
17
18#ifndef QGSMEMORYPROVIDERUTILS_H
19#define QGSMEMORYPROVIDERUTILS_H
20
21#include "qgis_core.h"
23#include "qgswkbtypes.h"
24
25#include <QString>
26#include <QVariant>
27
28class QgsVectorLayer;
29class QgsFields;
30
36class CORE_EXPORT QgsMemoryProviderUtils
37{
38
39 public:
40
50 static QgsVectorLayer *createMemoryLayer( const QString &name,
51 const QgsFields &fields,
54 bool loadDefaultStyle = true ) SIP_FACTORY;
55};
56
57#endif // QGSMEMORYPROVIDERUTILS_H
58
59
WkbType
The WKB type describes the number of dimensions a geometry has.
Definition qgis.h:277
@ NoGeometry
No geometry.
Definition qgis.h:294
Represents a coordinate reference system (CRS).
Container of fields for a vector layer.
Definition qgsfields.h:46
Utility functions for use with the memory vector data provider.
static QgsVectorLayer * createMemoryLayer(const QString &name, const QgsFields &fields, Qgis::WkbType geometryType=Qgis::WkbType::NoGeometry, const QgsCoordinateReferenceSystem &crs=QgsCoordinateReferenceSystem(), bool loadDefaultStyle=true) SIP_FACTORY
Creates a new memory layer using the specified parameters.
Represents a vector layer which manages a vector based dataset.
#define SIP_FACTORY
Definition qgis_sip.h:84