@@ -64,7 +64,9 @@ struct CORE_EXPORT QgsVectorJoinInfo
64
64
int joinField;
65
65
/* *True if the join is cached in virtual memory*/
66
66
bool memoryCache;
67
- /* *Cache for joined attributes to provide fast lookup (size is 0 if no memory caching)*/
67
+ /* *Cache for joined attributes to provide fast lookup (size is 0 if no memory caching)
68
+ @note not available in python bindings
69
+ */
68
70
QHash< QString, QgsAttributeMap> cachedAttributes;
69
71
};
70
72
@@ -99,7 +101,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
99
101
CheckBox, /* added in 1.4 */
100
102
FileName,
101
103
Enumeration,
102
- Immutable, /* The attribute value should not be changed in the attribute form*/
104
+ Immutable, /* The attribute value should not be changed in the attribute form */
103
105
Hidden, /* The attribute value should not be shown in the attribute form @added in 1.4 */
104
106
TextEdit, /* multiline edit @added in 1.4*/
105
107
Calendar, /* calendar widget @added in 1.5 */
@@ -122,12 +124,25 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
122
124
struct ValueRelationData
123
125
{
124
126
ValueRelationData () {}
125
- ValueRelationData ( QString layer, QString key, QString value, bool allowNull, bool orderByValue, bool allowMulti = false )
126
- : mLayer ( layer ), mKey ( key ), mValue ( value ), mAllowNull ( allowNull ), mOrderByValue ( orderByValue ), mAllowMulti ( allowMulti ) {}
127
+ ValueRelationData ( QString layer, QString key, QString value, bool allowNull, bool orderByValue,
128
+ bool allowMulti = false ,
129
+ QString filterAttributeColumn = QString::null,
130
+ QString filterAttributeValue = QString::null )
131
+ : mLayer ( layer )
132
+ , mKey ( key )
133
+ , mValue ( value )
134
+ , mFilterAttributeColumn ( filterAttributeColumn )
135
+ , mFilterAttributeValue ( filterAttributeValue )
136
+ , mAllowNull ( allowNull )
137
+ , mOrderByValue ( orderByValue )
138
+ , mAllowMulti ( allowMulti )
139
+ {}
127
140
128
141
QString mLayer ;
129
142
QString mKey ;
130
143
QString mValue ;
144
+ QString mFilterAttributeColumn ;
145
+ QString mFilterAttributeValue ;
131
146
bool mAllowNull ;
132
147
bool mOrderByValue ;
133
148
bool mAllowMulti ; /* allow selection of multiple keys @added in 1.9 */
@@ -158,7 +173,9 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
158
173
/* * Returns the data provider */
159
174
QgsVectorDataProvider* dataProvider ();
160
175
161
- /* * Returns the data provider in a const-correct manner */
176
+ /* * Returns the data provider in a const-correct manner
177
+ @note not available in python bindings
178
+ */
162
179
const QgsVectorDataProvider* dataProvider () const ;
163
180
164
181
/* * Sets the textencoding of the data provider */
@@ -184,7 +201,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
184
201
185
202
const QgsLabel *label () const ;
186
203
187
- QgsAttributeAction* actions () { return mActions ; }
204
+ QgsAttributeAction * actions () { return mActions ; }
188
205
189
206
/* * The number of features that are selected in this layer */
190
207
int selectedFeatureCount ();
@@ -202,10 +219,10 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
202
219
QgsFeatureList selectedFeatures ();
203
220
204
221
/* * Return reference to identifiers of selected features */
205
- const QgsFeatureIds& selectedFeaturesIds () const ;
222
+ const QgsFeatureIds & selectedFeaturesIds () const ;
206
223
207
224
/* * Change selection to the new set of features */
208
- void setSelectedFeatures ( const QgsFeatureIds& ids );
225
+ void setSelectedFeatures ( const QgsFeatureIds & ids );
209
226
210
227
/* * Returns the bounding box of the selected features. If there is no selection, QgsRectangle(0,0,0,0) is returned */
211
228
QgsRectangle boundingBoxOfSelected ();
@@ -259,7 +276,8 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
259
276
QGis::GeometryType geometryType () const ;
260
277
261
278
/* * Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeometry
262
- @note added in 1.7*/
279
+ * @note added in 1.7
280
+ */
263
281
bool hasGeometryType () const ;
264
282
265
283
/* *Returns the WKBType or WKBUnknown in case of error*/
@@ -279,10 +297,10 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
279
297
virtual bool writeXml ( QDomNode & layer_node, QDomDocument & doc );
280
298
281
299
/* * Read the symbology for the current layer from the Dom node supplied.
282
- * @param node node that will contain the symbology definition for this layer.
283
- * @param errorMessage reference to string that will be updated with any error messages
284
- * @return true in case of success.
285
- */
300
+ * @param node node that will contain the symbology definition for this layer.
301
+ * @param errorMessage reference to string that will be updated with any error messages
302
+ * @return true in case of success.
303
+ */
286
304
bool readSymbology ( const QDomNode& node, QString& errorMessage );
287
305
288
306
/* * Write the symbology for the layer into the docment provided.
@@ -308,7 +326,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
308
326
/* * This function does nothing useful, it's kept only for compatibility.
309
327
* @todo to be removed
310
328
*/
311
- virtual long updateFeatureCount () const ;
329
+ Q_DECL_DEPRECATED virtual long updateFeatureCount () const ;
312
330
313
331
/* *
314
332
* Set the string (typically sql) used to define a subset of the layer
@@ -413,37 +431,42 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
413
431
int translateFeature ( QgsFeatureId featureId, double dx, double dy );
414
432
415
433
/* *Splits features cut by the given line
416
- @param splitLine line that splits the layer features
417
- @param topologicalEditing true if topological editing is enabled
418
- @return 0 in case of success, 4 if there is a selection but no feature split*/
434
+ * @param splitLine line that splits the layer features
435
+ * @param topologicalEditing true if topological editing is enabled
436
+ * @return
437
+ * 0 in case of success,
438
+ * 4 if there is a selection but no feature split
439
+ */
419
440
int splitFeatures ( const QList<QgsPoint>& splitLine, bool topologicalEditing = false );
420
441
421
442
/* *Changes the specified geometry such that it has no intersections with other
422
- polygon (or multipolygon) geometries in this vector layer
423
- @param geom geometry to modify
424
- @return 0 in case of success*/
443
+ * polygon (or multipolygon) geometries in this vector layer
444
+ * @param geom geometry to modify
445
+ * @return 0 in case of success
446
+ */
425
447
int removePolygonIntersections ( QgsGeometry* geom );
426
448
427
449
/* * Adds topological points for every vertex of the geometry.
428
- @param geom the geometry where each vertex is added to segments of other features
429
- @note geom is not going to be modified by the function
430
- @return 0 in case of success
431
- @see addTopologicalPoints
432
- */
450
+ * @param geom the geometry where each vertex is added to segments of other features
451
+ * @note geom is not going to be modified by the function
452
+ * @return 0 in case of success
453
+ */
433
454
int addTopologicalPoints ( QgsGeometry* geom );
434
455
435
- /* *Adds a vertex to segments which intersect point p but don't
436
- already have a vertex there. If a feature already has a vertex at position p,
437
- no additional vertex is inserted. This method is useful for topological
438
- editing.
439
- @param p position of the vertex
440
- @return 0 in case of success*/
456
+ /* * Adds a vertex to segments which intersect point p but don't
457
+ * already have a vertex there. If a feature already has a vertex at position p,
458
+ * no additional vertex is inserted. This method is useful for topological
459
+ * editing.
460
+ * @param p position of the vertex
461
+ * @return 0 in case of success
462
+ */
441
463
int addTopologicalPoints ( const QgsPoint& p );
442
464
443
465
/* *Inserts vertices to the snapped segments.
444
- This is useful for topological editing if snap to segment is enabled.
445
- @param snapResults results collected from the snapping operation
446
- @return 0 in case of success*/
466
+ * This is useful for topological editing if snap to segment is enabled.
467
+ * @param snapResults results collected from the snapping operation
468
+ * @return 0 in case of success
469
+ */
447
470
int insertSegmentVerticesForSnap ( const QList<QgsSnappingResult>& snapResults );
448
471
449
472
/* * Set labels on */
@@ -456,26 +479,28 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
456
479
virtual bool isEditable () const ;
457
480
458
481
/* * Returns true if the provider is in read-only mode
459
- * @note added in 1.6 */
482
+ * @note added in 1.6
483
+ */
460
484
virtual bool isReadOnly () const ;
461
485
462
486
/* * Returns true if the provider has been modified since the last commit */
463
487
virtual bool isModified () const ;
464
488
465
489
/* *Snaps a point to the closest vertex if there is one within the snapping tolerance
466
- @param point The point which is set to the position of a vertex if there is one within the snapping tolerance.
467
- If there is no point within this tolerance, point is left unchanged.
468
- @param tolerance The snapping tolerance
469
- @return true if point has been snapped, false if no vertex within search tolerance*/
490
+ * @param point The point which is set to the position of a vertex if there is one within the snapping tolerance.
491
+ * If there is no point within this tolerance, point is left unchanged.
492
+ * @param tolerance The snapping tolerance
493
+ * @return true if the point has been snapped, false if no vertex within search tolerance
494
+ */
470
495
bool snapPoint ( QgsPoint& point, double tolerance );
471
496
472
497
/* *Snaps to segment or vertex within given tolerance
473
- @param startPoint point to snap (in layer coordinates)
474
- @param snappingTolerance distance tolerance for snapping
475
- @param snappingResults snapping results. Key is the distance between startPoint and snapping target
476
- @param snap_to to segment / to vertex
477
- @return 0 in case of success
478
- */
498
+ * @param startPoint point to snap (in layer coordinates)
499
+ * @param snappingTolerance distance tolerance for snapping
500
+ * @param snappingResults snapping results. Key is the distance between startPoint and snapping target
501
+ * @param snap_to to segment / to vertex
502
+ * @return 0 in case of success
503
+ */
479
504
int snapWithContext ( const QgsPoint& startPoint,
480
505
double snappingTolerance,
481
506
QMultiMap < double , QgsSnappingResult > &snappingResults,
@@ -585,7 +610,9 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
585
610
/* * set string representing 'true' for a checkbox (added in 1.4) */
586
611
void setCheckedState ( int idx, QString checked, QString notChecked );
587
612
588
- /* * return string representing 'true' for a checkbox (added in 1.4) */
613
+ /* * return string representing 'true' for a checkbox (added in 1.4)
614
+ * @note not available in python bindings
615
+ */
589
616
QPair<QString, QString> checkedState ( int idx );
590
617
591
618
/* * get edit form (added in 1.4) */
@@ -650,10 +677,14 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
650
677
/* * Destroy active command and reverts all changes in it */
651
678
void destroyEditCommand ();
652
679
653
- /* * Execute undo operation. To be called only from QgsVectorLayerUndoCommand. */
680
+ /* * Execute undo operation. To be called only from QgsVectorLayerUndoCommand.
681
+ * @note not available in python bindings
682
+ */
654
683
void undoEditCommand ( QgsUndoCommand* cmd );
655
684
656
- /* * Execute redo operation. To be called only from QgsVectorLayerUndoCommand. */
685
+ /* * Execute redo operation. To be called only from QgsVectorLayerUndoCommand.
686
+ * @note not available in python bindings
687
+ */
657
688
void redoEditCommand ( QgsUndoCommand* cmd );
658
689
659
690
/* * Returns the index of a field name or -1 if the field does not exist
@@ -690,7 +721,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
690
721
void uniqueValues ( int index, QList<QVariant> &uniqueValues, int limit = -1 );
691
722
692
723
/* *Returns minimum value for an attribute column or invalid variant in case of error
693
- @note added in 1.7*/
724
+ @note added in 1.7*/
694
725
QVariant minimumValue ( int index );
695
726
696
727
/* *Returns maximum value for an attribute column or invalid variant in case of error
@@ -755,7 +786,7 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer
755
786
private: // Private methods
756
787
757
788
/* * vector layers are not copyable */
758
- QgsVectorLayer ( QgsVectorLayer const & rhs );
789
+ QgsVectorLayer ( const QgsVectorLayer & rhs );
759
790
760
791
/* * vector layers are not copyable */
761
792
QgsVectorLayer & operator =( QgsVectorLayer const & rhs );
0 commit comments