1
+ /******************************************************************
2
+ * This file has been generated automatically by sipify.pl *
3
+ * Do not edit manually ! Edit header file and generate it again. *
4
+ *****************************************************************/
5
+
6
+
7
+
8
+
9
+
10
+
11
+
1
12
2
13
typedef QList<int> QgsAttributeList;
3
14
typedef QSet<int> QgsAttributeIds;
15
+ typedef QList<QgsPointV2> QgsPointSequence;
16
+
4
17
5
18
6
- /** \ingroup core
7
- * Represents a vector layer which manages a vector based data sets.
8
- *
9
- * The QgsVectorLayer is instantiated by specifying the name of a data provider,
10
- * such as postgres or wfs, and url defining the specific data set to connect to.
11
- * The vector layer constructor in turn instantiates a QgsVectorDataProvider subclass
12
- * corresponding to the provider type, and passes it the url. The data provider
13
- * connects to the data source.
14
- *
15
- * The QgsVectorLayer provides a common interface to the different data types. It also
16
- * manages editing transactions.
17
- *
18
- * Sample usage of the QgsVectorLayer class:
19
- *
20
- * \code
21
- * QString uri = "point?crs=epsg:4326&field=id:integer";
22
- * QgsVectorLayer *scratchLayer = new QgsVectorLayer(uri, "Scratch point layer", "memory");
23
- * \endcode
24
- *
25
- * The main data providers supported by QGIS are listed below.
26
- *
27
- * \section providers Vector data providers
28
- *
29
- * \subsection memory Memory data providerType (memory)
30
- *
31
- * The memory data provider is used to construct in memory data, for example scratch
32
- * data or data generated from spatial operations such as contouring. There is no
33
- * inherent persistent storage of the data. The data source uri is constructed. The
34
- * url specifies the geometry type ("point", "linestring", "polygon",
35
- * "multipoint","multilinestring","multipolygon"), optionally followed by url parameters
36
- * as follows:
37
- *
38
- * - crs=definition
39
- * Defines the coordinate reference system to use for the layer.
40
- * definition is any string accepted by QgsCoordinateReferenceSystem::createFromString()
41
- *
42
- * - index=yes
43
- * Specifies that the layer will be constructed with a spatial index
44
- *
45
- * - field=name:type(length,precision)
46
- * Defines an attribute of the layer. Multiple field parameters can be added
47
- * to the data provider definition. type is one of "integer", "double", "string".
48
- *
49
- * An example url is "Point?crs=epsg:4326&field=id:integer&field=name:string(20)&index=yes"
50
- *
51
- * \subsection ogr OGR data provider (ogr)
52
- *
53
- * Accesses data using the OGR drivers (http://www.gdal.org/ogr/ogr_formats.html). The url
54
- * is the OGR connection string. A wide variety of data formats can be accessed using this
55
- * driver, including file based formats used by many GIS systems, database formats, and
56
- * web services. Some of these formats are also supported by custom data providers listed
57
- * below.
58
- *
59
- * \subsection spatialite Spatialite data provider (spatialite)
60
- *
61
- * Access data in a spatialite database. The url defines the connection parameters, table,
62
- * geometry column, and other attributes. The url can be constructed using the
63
- * QgsDataSourceUri class.
64
- *
65
- * \subsection postgres Postgresql data provider (postgres)
66
- *
67
- * Connects to a postgresql database. The url defines the connection parameters, table,
68
- * geometry column, and other attributes. The url can be constructed using the
69
- * QgsDataSourceUri class.
70
- *
71
- * \subsection mssql Microsoft SQL server data provider (mssql)
72
- *
73
- * Connects to a Microsoft SQL server database. The url defines the connection parameters, table,
74
- * geometry column, and other attributes. The url can be constructed using the
75
- * QgsDataSourceUri class.
76
- *
77
- * \subsection wfs WFS (web feature service) data provider (wfs)
78
- *
79
- * Used to access data provided by a web feature service.
80
- *
81
- * The url can be a HTTP url to a WFS server (legacy, e.g. http://foobar/wfs?TYPENAME=xxx&SRSNAME=yyy[&FILTER=zzz]), or,
82
- * starting with QGIS 2.16, a URI constructed using the QgsDataSourceUri class with the following parameters :
83
- * - url=string (mandatory): HTTP url to a WFS server endpoint. e.g http://foobar/wfs
84
- * - typename=string (mandatory): WFS typename
85
- * - srsname=string (recommended): SRS like 'EPSG:XXXX'
86
- * - username=string
87
- * - password=string
88
- * - authcfg=string
89
- * - version=auto/1.0.0/1.1.0/2.0.0
90
- * -sql=string: full SELECT SQL statement with optional WHERE, ORDER BY and possibly with JOIN if supported on server
91
- * - filter=string: QGIS expression or OGC/FES filter
92
- * - retrictToRequestBBOX=1: to download only features in the view extent (or more generally
93
- * in the bounding box of the feature iterator)
94
- * - maxNumFeatures=number
95
- * - IgnoreAxisOrientation=1: to ignore EPSG axis order for WFS 1.1 or 2.0
96
- * - InvertAxisOrientation=1: to invert axis order
97
- * - hideDownloadProgressDialog=1: to hide the download progress dialog
98
- *
99
- * The ‘FILTER’ query string parameter can be used to filter
100
- * the WFS feature type. The ‘FILTER’ key value can either be a QGIS expression
101
- * or an OGC XML filter. If the value is set to a QGIS expression the driver will
102
- * turn it into OGC XML filter before passing it to the WFS server. Beware the
103
- * QGIS expression filter only supports” =, !=, <, >, <=, >=, AND, OR, NOT, LIKE, IS NULL”
104
- * attribute operators, “BBOX, Disjoint, Intersects, Touches, Crosses, Contains, Overlaps, Within”
105
- * spatial binary operators and the QGIS local “geomFromWKT, geomFromGML”
106
- * geometry constructor functions.
107
- *
108
- * Also note:
109
- *
110
- * - You can use various functions available in the QGIS Expression list,
111
- * however the function must exist server side and have the same name and arguments to work.
112
- *
113
- * - Use the special $geometry parameter to provide the layer geometry column as input
114
- * into the spatial binary operators e.g intersects($geometry, geomFromWKT('POINT (5 6)'))
115
- *
116
- * \subsection delimitedtext Delimited text file data provider (delimitedtext)
117
- *
118
- * Accesses data in a delimited text file, for example CSV files generated by
119
- * spreadsheets. The contents of the file are split into columns based on specified
120
- * delimiter characters. Each record may be represented spatially either by an
121
- * X and Y coordinate column, or by a WKT (well known text) formatted columns.
122
- *
123
- * The url defines the filename, the formatting options (how the
124
- * text in the file is divided into data fields, and which fields contain the
125
- * X,Y coordinates or WKT text definition. The options are specified as url query
126
- * items.
127
- *
128
- * At its simplest the url can just be the filename, in which case it will be loaded
129
- * as a CSV formatted file.
130
- *
131
- * The url may include the following items:
132
- *
133
- * - encoding=UTF-8
134
- *
135
- * Defines the character encoding in the file. The default is UTF-8. To use
136
- * the default encoding for the operating system use "System".
137
- *
138
- * - type=(csv|regexp|whitespace|plain)
139
- *
140
- * Defines the algorithm used to split records into columns. Records are
141
- * defined by new lines, except for csv format files for which quoted fields
142
- * may span multiple records. The default type is csv.
143
- *
144
- * - "csv" splits the file based on three sets of characters:
145
- * delimiter characters, quote characters,
146
- * and escape characters. Delimiter characters mark the end
147
- * of a field. Quote characters enclose a field which can contain
148
- * delimiter characters, and newlines. Escape characters cause the
149
- * following character to be treated literally (including delimiter,
150
- * quote, and newline characters). Escape and quote characters must
151
- * be different from delimiter characters. Escape characters that are
152
- * also quote characters are treated specially - they can only
153
- * escape themselves within quotes. Elsewhere they are treated as
154
- * quote characters. The defaults for delimiter, quote, and escape
155
- * are ',', '"', '"'.
156
- * - "regexp" splits each record using a regular expression (see QRegExp
157
- * documentation for details).
158
- * - "whitespace" splits each record based on whitespace (on or more whitespace
159
- * characters. Leading whitespace in the record is ignored.
160
- * - "plain" is provided for backwards compatibility. It is equivalent to
161
- * CSV except that the default quote characters are single and double quotes,
162
- * and there is no escape characters.
163
- *
164
- * - delimiter=characters
165
- *
166
- * Defines the delimiter characters used for csv and plain type files, or the
167
- * regular expression for regexp type files. It is a literal string of characters
168
- * except that "\t" may be used to represent a tab character.
169
- *
170
- * - quote=characters
171
- *
172
- * Defines the characters that are used as quote characters for csv and plain type
173
- * files.
174
- *
175
- * - escape=characters
176
- *
177
- * Defines the characters used to escape delimiter, quote, and newline characters.
178
- *
179
- * - skipLines=n
180
- *
181
- * Defines the number of lines to ignore at the beginning of the file (default 0)
182
- *
183
- * - useHeader=(yes|no)
184
- *
185
- * Defines whether the first record in the file (after skipped lines) contains
186
- * column names (default yes)
187
- *
188
- * - trimFields=(yes|no)
189
- *
190
- * If yes then leading and trailing whitespace will be removed from fields
191
- *
192
- * - skipEmptyFields=(yes|no)
193
- *
194
- * If yes then empty fields will be discarded (equivalent to concatenating consecutive
195
- * delimiters)
196
- *
197
- * - maxFields=#
198
- *
199
- * Specifies the maximum number of fields to load for each record. Additional
200
- * fields will be discarded. Default is 0 - load all fields.
201
- *
202
- * - decimalPoint=c
203
- *
204
- * Defines a character that is used as a decimal point in the numeric columns
205
- * The default is '.'.
206
- *
207
- * - xField=column yField=column
208
- *
209
- * Defines the name of the columns holding the x and y coordinates for XY point geometries.
210
- * If the useHeader is no (ie there are no column names), then this is the column
211
- * number (with the first column as 1).
212
- *
213
- * - xyDms=(yes|no)
214
- *
215
- * If yes then the X and Y coordinates are interpreted as
216
- * degrees/minutes/seconds format (fairly permissively),
217
- * or degree/minutes format.
218
- *
219
- * - wktField=column
220
- *
221
- * Defines the name of the columns holding the WKT geometry definition for WKT geometries.
222
- * If the useHeader is no (ie there are no column names), then this is the column
223
- * number (with the first column as 1).
224
- *
225
- * - geomType=(point|line|polygon|none)
226
- *
227
- * Defines the geometry type for WKT type geometries. QGIS will only display one
228
- * type of geometry for the layer - any others will be ignored when the file is
229
- * loaded. By default the provider uses the type of the first geometry in the file.
230
- * Use geomType to override this type.
231
- *
232
- * geomType can also be set to none, in which case the layer is loaded without
233
- * geometries.
234
- *
235
- * - subset=expression
236
- *
237
- * Defines an expression that will identify a subset of records to display
238
- *
239
- * - crs=crsstring
240
- *
241
- * Defines the coordinate reference system used for the layer. This can be
242
- * any string accepted by QgsCoordinateReferenceSystem::createFromString()
243
- *
244
- * -subsetIndex=(yes|no)
245
- *
246
- * Determines whether the provider generates an index to improve the efficiency
247
- * of subsets. The default is yes
248
- *
249
- * -spatialIndex=(yes|no)
250
- *
251
- * Determines whether the provider generates a spatial index. The default is no.
252
- *
253
- * -watchFile=(yes|no)
254
- *
255
- * Defines whether the file will be monitored for changes. The default is
256
- * to monitor for changes.
257
- *
258
- * - quiet
259
- *
260
- * Errors encountered loading the file will not be reported in a user dialog if
261
- * quiet is included (They will still be shown in the output log).
262
- *
263
- * \subsection gpx GPX data provider (gpx)
264
- *
265
- * Provider reads tracks, routes, and waypoints from a GPX file. The url
266
- * defines the name of the file, and the type of data to retrieve from it
267
- * ("track", "route", or "waypoint").
268
- *
269
- * An example url is "/home/user/data/holiday.gpx?type=route"
270
- *
271
- * \subsection grass Grass data provider (grass)
272
- *
273
- * Provider to display vector data in a GRASS GIS layer.
274
- *
275
- * TODO QGIS3: Remove virtual from non-inherited methods (like isModified)
276
- */
277
19
278
20
279
21
class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
280
22
{
23
+ %Docstring
24
+ Represents a vector layer which manages a vector based data sets.
25
+
26
+ The QgsVectorLayer is instantiated by specifying the name of a data provider,
27
+ such as postgres or wfs, and url defining the specific data set to connect to.
28
+ The vector layer constructor in turn instantiates a QgsVectorDataProvider subclass
29
+ corresponding to the provider type, and passes it the url. The data provider
30
+ connects to the data source.
31
+
32
+ The QgsVectorLayer provides a common interface to the different data types. It also
33
+ manages editing transactions.
34
+
35
+ Sample usage of the QgsVectorLayer class:
36
+
37
+ \code
38
+ QString uri = "point?crs=epsg:4326&field=id:integer";
39
+ QgsVectorLayer *scratchLayer = new QgsVectorLayer(uri, "Scratch point layer", "memory");
40
+ \endcode
41
+
42
+ The main data providers supported by QGIS are listed below.
43
+
44
+ \section providers Vector data providers
45
+
46
+ \subsection memory Memory data providerType (memory)
47
+
48
+ The memory data provider is used to construct in memory data, for example scratch
49
+ data or data generated from spatial operations such as contouring. There is no
50
+ inherent persistent storage of the data. The data source uri is constructed. The
51
+ url specifies the geometry type ("point", "linestring", "polygon",
52
+ "multipoint","multilinestring","multipolygon"), optionally followed by url parameters
53
+ as follows:
54
+
55
+ - crs=definition
56
+ Defines the coordinate reference system to use for the layer.
57
+ definition is any string accepted by QgsCoordinateReferenceSystem::createFromString()
58
+
59
+ - index=yes
60
+ Specifies that the layer will be constructed with a spatial index
61
+
62
+ - field=name:type(length,precision)
63
+ Defines an attribute of the layer. Multiple field parameters can be added
64
+ to the data provider definition. type is one of "integer", "double", "string".
65
+
66
+ An example url is "Point?crs=epsg:4326&field=id:integer&field=name:string(20)&index=yes"
67
+
68
+ \subsection ogr OGR data provider (ogr)
69
+
70
+ Accesses data using the OGR drivers (http://www.gdal.org/ogr/ogr_formats.html). The url
71
+ is the OGR connection string. A wide variety of data formats can be accessed using this
72
+ driver, including file based formats used by many GIS systems, database formats, and
73
+ web services. Some of these formats are also supported by custom data providers listed
74
+ below.
75
+
76
+ \subsection spatialite Spatialite data provider (spatialite)
77
+
78
+ Access data in a spatialite database. The url defines the connection parameters, table,
79
+ geometry column, and other attributes. The url can be constructed using the
80
+ QgsDataSourceUri class.
81
+
82
+ \subsection postgres Postgresql data provider (postgres)
83
+
84
+ Connects to a postgresql database. The url defines the connection parameters, table,
85
+ geometry column, and other attributes. The url can be constructed using the
86
+ QgsDataSourceUri class.
87
+
88
+ \subsection mssql Microsoft SQL server data provider (mssql)
89
+
90
+ Connects to a Microsoft SQL server database. The url defines the connection parameters, table,
91
+ geometry column, and other attributes. The url can be constructed using the
92
+ QgsDataSourceUri class.
93
+
94
+ \subsection wfs WFS (web feature service) data provider (wfs)
95
+
96
+ Used to access data provided by a web feature service.
97
+
98
+ The url can be a HTTP url to a WFS server (legacy, e.g. http://foobar/wfs?TYPENAME=xxx&SRSNAME=yyy[&FILTER=zzz]), or,
99
+ starting with QGIS 2.16, a URI constructed using the QgsDataSourceUri class with the following parameters :
100
+ - url=string (mandatory): HTTP url to a WFS server endpoint. e.g http://foobar/wfs
101
+ - typename=string (mandatory): WFS typename
102
+ - srsname=string (recommended): SRS like 'EPSG:XXXX'
103
+ - username=string
104
+ - password=string
105
+ - authcfg=string
106
+ - version=auto/1.0.0/1.1.0/2.0.0
107
+ -sql=string: full SELECT SQL statement with optional WHERE, ORDER BY and possibly with JOIN if supported on server
108
+ - filter=string: QGIS expression or OGC/FES filter
109
+ - restrictToRequestBBOX=1: to download only features in the view extent (or more generally
110
+ in the bounding box of the feature iterator)
111
+ - maxNumFeatures=number
112
+ - IgnoreAxisOrientation=1: to ignore EPSG axis order for WFS 1.1 or 2.0
113
+ - InvertAxisOrientation=1: to invert axis order
114
+ - hideDownloadProgressDialog=1: to hide the download progress dialog
115
+
116
+ The ‘FILTER’ query string parameter can be used to filter
117
+ the WFS feature type. The ‘FILTER’ key value can either be a QGIS expression
118
+ or an OGC XML filter. If the value is set to a QGIS expression the driver will
119
+ turn it into OGC XML filter before passing it to the WFS server. Beware the
120
+ QGIS expression filter only supports” =, !=, <, >, <=, >=, AND, OR, NOT, LIKE, IS NULL”
121
+ attribute operators, “BBOX, Disjoint, Intersects, Touches, Crosses, Contains, Overlaps, Within”
122
+ spatial binary operators and the QGIS local “geomFromWKT, geomFromGML”
123
+ geometry constructor functions.
124
+
125
+ Also note:
126
+
127
+ - You can use various functions available in the QGIS Expression list,
128
+ however the function must exist server side and have the same name and arguments to work.
129
+
130
+ - Use the special $geometry parameter to provide the layer geometry column as input
131
+ into the spatial binary operators e.g intersects($geometry, geomFromWKT('POINT (5 6)'))
132
+
133
+ \subsection delimitedtext Delimited text file data provider (delimitedtext)
134
+
135
+ Accesses data in a delimited text file, for example CSV files generated by
136
+ spreadsheets. The contents of the file are split into columns based on specified
137
+ delimiter characters. Each record may be represented spatially either by an
138
+ X and Y coordinate column, or by a WKT (well known text) formatted columns.
139
+
140
+ The url defines the filename, the formatting options (how the
141
+ text in the file is divided into data fields, and which fields contain the
142
+ X,Y coordinates or WKT text definition. The options are specified as url query
143
+ items.
144
+
145
+ At its simplest the url can just be the filename, in which case it will be loaded
146
+ as a CSV formatted file.
147
+
148
+ The url may include the following items:
149
+
150
+ - encoding=UTF-8
151
+
152
+ Defines the character encoding in the file. The default is UTF-8. To use
153
+ the default encoding for the operating system use "System".
154
+
155
+ - type=(csv|regexp|whitespace|plain)
156
+
157
+ Defines the algorithm used to split records into columns. Records are
158
+ defined by new lines, except for csv format files for which quoted fields
159
+ may span multiple records. The default type is csv.
160
+
161
+ - "csv" splits the file based on three sets of characters:
162
+ delimiter characters, quote characters,
163
+ and escape characters. Delimiter characters mark the end
164
+ of a field. Quote characters enclose a field which can contain
165
+ delimiter characters, and newlines. Escape characters cause the
166
+ following character to be treated literally (including delimiter,
167
+ quote, and newline characters). Escape and quote characters must
168
+ be different from delimiter characters. Escape characters that are
169
+ also quote characters are treated specially - they can only
170
+ escape themselves within quotes. Elsewhere they are treated as
171
+ quote characters. The defaults for delimiter, quote, and escape
172
+ are ',', '"', '"'.
173
+ - "regexp" splits each record using a regular expression (see QRegExp
174
+ documentation for details).
175
+ - "whitespace" splits each record based on whitespace (on or more whitespace
176
+ characters. Leading whitespace in the record is ignored.
177
+ - "plain" is provided for backwards compatibility. It is equivalent to
178
+ CSV except that the default quote characters are single and double quotes,
179
+ and there is no escape characters.
180
+
181
+ - delimiter=characters
182
+
183
+ Defines the delimiter characters used for csv and plain type files, or the
184
+ regular expression for regexp type files. It is a literal string of characters
185
+ except that "\t" may be used to represent a tab character.
186
+
187
+ - quote=characters
188
+
189
+ Defines the characters that are used as quote characters for csv and plain type
190
+ files.
191
+
192
+ - escape=characters
193
+
194
+ Defines the characters used to escape delimiter, quote, and newline characters.
195
+
196
+ - skipLines=n
197
+
198
+ Defines the number of lines to ignore at the beginning of the file (default 0)
199
+
200
+ - useHeader=(yes|no)
201
+
202
+ Defines whether the first record in the file (after skipped lines) contains
203
+ column names (default yes)
204
+
205
+ - trimFields=(yes|no)
206
+
207
+ If yes then leading and trailing whitespace will be removed from fields
208
+
209
+ - skipEmptyFields=(yes|no)
210
+
211
+ If yes then empty fields will be discarded (equivalent to concatenating consecutive
212
+ delimiters)
213
+
214
+ - maxFields=#
215
+
216
+ Specifies the maximum number of fields to load for each record. Additional
217
+ fields will be discarded. Default is 0 - load all fields.
218
+
219
+ - decimalPoint=c
220
+
221
+ Defines a character that is used as a decimal point in the numeric columns
222
+ The default is '.'.
223
+
224
+ - xField=column yField=column
225
+
226
+ Defines the name of the columns holding the x and y coordinates for XY point geometries.
227
+ If the useHeader is no (ie there are no column names), then this is the column
228
+ number (with the first column as 1).
229
+
230
+ - xyDms=(yes|no)
231
+
232
+ If yes then the X and Y coordinates are interpreted as
233
+ degrees/minutes/seconds format (fairly permissively),
234
+ or degree/minutes format.
235
+
236
+ - wktField=column
237
+
238
+ Defines the name of the columns holding the WKT geometry definition for WKT geometries.
239
+ If the useHeader is no (ie there are no column names), then this is the column
240
+ number (with the first column as 1).
241
+
242
+ - geomType=(point|line|polygon|none)
243
+
244
+ Defines the geometry type for WKT type geometries. QGIS will only display one
245
+ type of geometry for the layer - any others will be ignored when the file is
246
+ loaded. By default the provider uses the type of the first geometry in the file.
247
+ Use geomType to override this type.
248
+
249
+ geomType can also be set to none, in which case the layer is loaded without
250
+ geometries.
251
+
252
+ - subset=expression
253
+
254
+ Defines an expression that will identify a subset of records to display
255
+
256
+ - crs=crsstring
257
+
258
+ Defines the coordinate reference system used for the layer. This can be
259
+ any string accepted by QgsCoordinateReferenceSystem::createFromString()
260
+
261
+ -subsetIndex=(yes|no)
262
+
263
+ Determines whether the provider generates an index to improve the efficiency
264
+ of subsets. The default is yes
265
+
266
+ -spatialIndex=(yes|no)
267
+
268
+ Determines whether the provider generates a spatial index. The default is no.
269
+
270
+ -watchFile=(yes|no)
271
+
272
+ Defines whether the file will be monitored for changes. The default is
273
+ to monitor for changes.
274
+
275
+ - quiet
276
+
277
+ Errors encountered loading the file will not be reported in a user dialog if
278
+ quiet is included (They will still be shown in the output log).
279
+
280
+ \subsection gpx GPX data provider (gpx)
281
+
282
+ Provider reads tracks, routes, and waypoints from a GPX file. The url
283
+ defines the name of the file, and the type of data to retrieve from it
284
+ ("track", "route", or "waypoint").
285
+
286
+ An example url is "/home/user/data/holiday.gpx?type=route"
287
+
288
+ \subsection grass Grass data provider (grass)
289
+
290
+ Provider to display vector data in a GRASS GIS layer.
291
+
292
+ TODO QGIS3: Remove virtual from non-inherited methods (like isModified)
293
+ @see QgsVectorLayerUtils()
294
+
295
+
296
+ %End
297
+
281
298
%TypeHeaderCode
282
299
#include "qgsvectorlayer.h"
283
300
%End
284
301
302
+
285
303
public:
286
304
287
- //! Result of an edit operation
288
305
enum EditResult
289
306
{
290
307
Success,
@@ -294,7 +311,6 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
294
311
InvalidLayer,
295
312
};
296
313
297
- //! Selection behavior
298
314
enum SelectBehavior
299
315
{
300
316
SetSelection,
@@ -306,8 +322,12 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
306
322
QgsVectorLayer( const QString &path = QString::null, const QString &baseName = QString::null,
307
323
const QString &providerLib = "ogr", bool loadDefaultStyleFlag = true );
308
324
325
+
309
326
virtual ~QgsVectorLayer();
310
327
328
+ // QgsVectorLayer( const QgsVectorLayer &rhs ) = delete;
329
+ // QgsVectorLayer &operator=( QgsVectorLayer const &rhs ) = delete;
330
+
311
331
QString storageType() const;
312
332
313
333
QString capabilitiesString() const;
@@ -322,7 +342,8 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
322
342
323
343
QgsVectorDataProvider *dataProvider();
324
344
325
- // const QgsVectorDataProvider *dataProvider() const;
345
+ // const QgsVectorDataProvider *dataProvider() const; // SIP_SKIP
346
+
326
347
327
348
void setProviderEncoding( const QString &encoding );
328
349
@@ -387,7 +408,8 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
387
408
388
409
QgsFeatureRenderer *renderer();
389
410
390
- // const QgsFeatureRenderer *renderer() const { return mRendererV2; }
411
+ // const QgsFeatureRenderer *renderer() const { return mRenderer; } // SIP_SKIP
412
+
391
413
392
414
void setRenderer( QgsFeatureRenderer *r /Transfer/ );
393
415
@@ -420,15 +442,16 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
420
442
421
443
virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag /Out/ );
422
444
423
- bool readSymbology( const QDomNode &node , QString &errorMessage );
445
+ bool readSymbology( const QDomNode &layerNode , QString &errorMessage );
424
446
425
447
bool readStyle( const QDomNode &node, QString &errorMessage );
426
448
427
449
bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage ) const;
428
450
429
451
bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage ) const;
430
452
431
- bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsStringMap &props ) const;
453
+ bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsStringMap &props = QgsStringMap() ) const;
454
+
432
455
bool readSld( const QDomNode &node, QString &errorMessage );
433
456
434
457
long featureCount( const QString &legendKey ) const;
@@ -447,7 +470,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
447
470
448
471
QgsFeature getFeature( QgsFeatureId fid );
449
472
450
- QgsFeatureIterator getFeatures( QgsFeatureIds fids );
473
+ QgsFeatureIterator getFeatures( const QgsFeatureIds & fids );
451
474
452
475
QgsFeatureIterator getFeatures( const QgsRectangle &rectangle );
453
476
@@ -473,7 +496,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
473
496
474
497
int addPart( const QList<QgsPoint> &ring );
475
498
476
- int addPart( const QList<QgsPointV2> &ring ) /PyName=addPartV2/;
499
+ int addPart( const QgsPointSequence &ring ) /PyName=addPartV2/;
477
500
478
501
int addPart( QgsCurve *ring /Transfer/ ) /PyName=addCurvedPart/;
479
502
@@ -489,9 +512,11 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
489
512
490
513
int insertSegmentVerticesForSnap( const QList<QgsSnappingResult> &snapResults );
491
514
492
- // const QgsAbstractVectorLayerLabeling *labeling() const { return mLabeling; }
515
+ // const QgsAbstractVectorLayerLabeling *labeling() const { return mLabeling; } // SIP_SKIP
516
+
517
+
518
+ // void setLabeling( QgsAbstractVectorLayerLabeling *labeling ); // SIP_SKIP
493
519
494
- // void setLabeling( QgsAbstractVectorLayerLabeling *labeling );
495
520
496
521
virtual bool isEditable() const;
497
522
@@ -546,19 +571,21 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
546
571
547
572
QString attributeDisplayName( int index ) const;
548
573
549
- const QMap< QString, QString > & attributeAliases() const;
574
+ QgsStringMap attributeAliases() const;
550
575
551
576
QSet<QString> excludeAttributesWms() const;
577
+
552
578
void setExcludeAttributesWms( const QSet<QString> &att );
553
579
554
580
QSet<QString> excludeAttributesWfs() const;
581
+
555
582
void setExcludeAttributesWfs( const QSet<QString> &att );
556
583
557
584
bool deleteAttribute( int attr );
558
585
559
586
bool deleteAttributes( QList<int> attrs );
560
587
561
- bool addFeatures( QList<QgsFeature> features, bool makeSelected = true );
588
+ bool addFeatures( QgsFeatureList features, bool makeSelected = true );
562
589
563
590
bool deleteFeature( QgsFeatureId fid );
564
591
@@ -578,6 +605,9 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
578
605
579
606
QgsVectorLayerEditBuffer *editBuffer();
580
607
608
+ // const QgsVectorLayerEditBuffer *editBuffer() const { return mEditBuffer; } // SIP_SKIP
609
+
610
+
581
611
void beginEditCommand( const QString &text );
582
612
583
613
void endEditCommand();
@@ -596,7 +626,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
596
626
void updateFields();
597
627
598
628
QVariant defaultValue( int index, const QgsFeature &feature = QgsFeature(),
599
- QgsExpressionContext *context = nullptr ) const;
629
+ QgsExpressionContext *context = 0 ) const;
600
630
601
631
void setDefaultValueExpression( int index, const QString &expression );
602
632
@@ -613,13 +643,15 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
613
643
QString constraintDescription( int index ) const;
614
644
615
645
void setConstraintExpression( int index, const QString &expression, const QString &description = QString() );
646
+
616
647
void setEditorWidgetSetup( int index, const QgsEditorWidgetSetup &setup );
648
+
617
649
QgsEditorWidgetSetup editorWidgetSetup( int index ) const;
618
650
619
651
void uniqueValues( int index, QList<QVariant> &uniqueValues /Out/, int limit = -1 ) const;
620
652
621
653
QStringList uniqueStringsMatching( int index, const QString &substring, int limit = -1,
622
- QgsFeedback *feedback = nullptr ) const;
654
+ QgsFeedback *feedback = 0 ) const;
623
655
624
656
QVariant minimumValue( int index ) const;
625
657
@@ -628,8 +660,8 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
628
660
QVariant aggregate( QgsAggregateCalculator::Aggregate aggregate,
629
661
const QString &fieldOrExpression,
630
662
const QgsAggregateCalculator::AggregateParameters ¶meters = QgsAggregateCalculator::AggregateParameters(),
631
- QgsExpressionContext *context = nullptr ,
632
- bool *ok = nullptr ) const;
663
+ QgsExpressionContext *context = 0 ,
664
+ bool *ok = 0 ) const;
633
665
634
666
QList< QVariant > getValues( const QString &fieldOrExpression, bool &ok, bool selectedOnly = false, QgsFeedback *feedback = 0 ) const;
635
667
@@ -643,7 +675,8 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
643
675
644
676
QString metadata() const;
645
677
646
- // inline QgsGeometryCache *cache();
678
+ // inline QgsGeometryCache *cache() { return mCache; } // SIP_SKIP
679
+
647
680
648
681
void setSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod );
649
682
@@ -668,6 +701,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
668
701
void setEditFormConfig( const QgsEditFormConfig &editFormConfig );
669
702
670
703
public slots:
704
+
671
705
void select( QgsFeatureId featureId );
672
706
673
707
void select( const QgsFeatureIds &featureIds );
@@ -720,6 +754,7 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
720
754
721
755
void updatedFields();
722
756
757
+
723
758
void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant &value );
724
759
725
760
void geometryChanged( QgsFeatureId fid, const QgsGeometry &geometry );
@@ -756,12 +791,12 @@ class QgsVectorLayer : QgsMapLayer, QgsExpressionContextGenerator
756
791
void editFormConfigChanged();
757
792
758
793
void readOnlyChanged();
759
- protected:
760
- void setExtent( const QgsRectangle &rect );
761
-
762
- private: // Private methods
763
794
764
- QgsVectorLayer( const QgsVectorLayer &rhs );
765
795
796
+ protected:
797
+ void setExtent( const QgsRectangle &rect );
766
798
799
+ private: // Private methods
800
+ QgsVectorLayer( const QgsVectorLayer &rhs );
767
801
};
802
+
0 commit comments