13
13
14
14
15
15
16
+
16
17
typedef QList<int> QgsAttributeList;
17
18
typedef QSet<int> QgsAttributeIds;
18
19
@@ -404,7 +405,8 @@ Uses :py:class:`QgsExpression`
404
405
:return: The expression which will be used to preview features for this layer
405
406
%End
406
407
407
- QgsVectorDataProvider *dataProvider() ${SIP_FINAL};
408
+ virtual QgsVectorDataProvider *dataProvider() ${SIP_FINAL};
409
+
408
410
409
411
void setProviderEncoding( const QString &encoding );
410
412
%Docstring
@@ -442,7 +444,8 @@ Returns the join buffer object.
442
444
%End
443
445
const QList<QgsVectorLayerJoinInfo> vectorJoins() const;
444
446
445
- bool setDependencies( const QSet<QgsMapLayerDependency> &layers ) ${SIP_FINAL};
447
+ virtual bool setDependencies( const QSet<QgsMapLayerDependency> &layers ) ${SIP_FINAL};
448
+
446
449
%Docstring
447
450
Sets the list of dependencies.
448
451
@@ -455,7 +458,8 @@ Sets the list of dependencies.
455
458
.. versionadded:: 3.0
456
459
%End
457
460
458
- QSet<QgsMapLayerDependency> dependencies() const ${SIP_FINAL};
461
+ virtual QSet<QgsMapLayerDependency> dependencies() const ${SIP_FINAL};
462
+
459
463
%Docstring
460
464
Gets the list of dependencies. This includes data dependencies set by the user (:py:func:`setDataDependencies`)
461
465
as well as dependencies given by the provider
@@ -721,7 +725,8 @@ Ownership is transferred.
721
725
Returns point, line or polygon
722
726
%End
723
727
724
- QgsWkbTypes::Type wkbType() const ${SIP_FINAL};
728
+ virtual QgsWkbTypes::Type wkbType() const ${SIP_FINAL};
729
+
725
730
%Docstring
726
731
Returns the WKBType or WKBUnknown in case of error
727
732
%End
@@ -731,10 +736,13 @@ Returns the WKBType or WKBUnknown in case of error
731
736
Returns the provider type for this layer
732
737
%End
733
738
734
- QgsCoordinateReferenceSystem sourceCrs() const ${SIP_FINAL};
735
- QString sourceName() const ${SIP_FINAL};
739
+ virtual QgsCoordinateReferenceSystem sourceCrs() const ${SIP_FINAL};
740
+
741
+ virtual QString sourceName() const ${SIP_FINAL};
742
+
743
+
744
+ virtual bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) ${SIP_FINAL};
736
745
737
- bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) ${SIP_FINAL};
738
746
%Docstring
739
747
Reads vector layer specific state from project file Dom node.
740
748
@@ -743,7 +751,8 @@ Reads vector layer specific state from project file Dom node.
743
751
Called by :py:func:`QgsMapLayer.readXml()`
744
752
%End
745
753
746
- bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const ${SIP_FINAL};
754
+ virtual bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const ${SIP_FINAL};
755
+
747
756
%Docstring
748
757
Write vector layer specific state to project file Dom node.
749
758
@@ -752,10 +761,13 @@ Write vector layer specific state to project file Dom node.
752
761
Called by :py:func:`QgsMapLayer.writeXml()`
753
762
%End
754
763
755
- QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const ${SIP_FINAL};
756
- QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const ${SIP_FINAL};
764
+ virtual QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const ${SIP_FINAL};
765
+
766
+ virtual QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const ${SIP_FINAL};
767
+
768
+
769
+ virtual void resolveReferences( QgsProject *project ) ${SIP_FINAL};
757
770
758
- void resolveReferences( QgsProject *project ) ${SIP_FINAL};
759
771
%Docstring
760
772
Resolve references to other layers (kept as layer IDs after reading XML) into layer objects.
761
773
@@ -820,7 +832,7 @@ Load a named style from file/local db/datasource db
820
832
:param categories: the style categories to be loaded.
821
833
%End
822
834
823
- QString loadNamedStyle( const QString &theURI, bool &resultFlag /Out/,
835
+ virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag /Out/,
824
836
QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) ${SIP_FINAL};
825
837
%Docstring
826
838
Calls loadNamedStyle( theURI, resultFlag, false );
@@ -861,7 +873,7 @@ Returns the current auxiliary layer.
861
873
%End
862
874
863
875
864
- bool readSymbology( const QDomNode &layerNode, QString &errorMessage,
876
+ virtual bool readSymbology( const QDomNode &layerNode, QString &errorMessage,
865
877
QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) ${SIP_FINAL};
866
878
%Docstring
867
879
Read the symbology for the current layer from the Dom node supplied.
@@ -874,7 +886,7 @@ Read the symbology for the current layer from the Dom node supplied.
874
886
:return: true in case of success.
875
887
%End
876
888
877
- bool readStyle( const QDomNode &node, QString &errorMessage,
889
+ virtual bool readStyle( const QDomNode &node, QString &errorMessage,
878
890
QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) ${SIP_FINAL};
879
891
%Docstring
880
892
Read the style for the current layer from the Dom node supplied.
@@ -887,7 +899,7 @@ Read the style for the current layer from the Dom node supplied.
887
899
:return: true in case of success.
888
900
%End
889
901
890
- bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage,
902
+ virtual bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage,
891
903
const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const ${SIP_FINAL};
892
904
%Docstring
893
905
Write the symbology for the layer into the docment provided.
@@ -901,7 +913,7 @@ Write the symbology for the layer into the docment provided.
901
913
:return: true in case of success.
902
914
%End
903
915
904
- bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage,
916
+ virtual bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage,
905
917
const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const ${SIP_FINAL};
906
918
%Docstring
907
919
Write just the style information for the layer into the document
@@ -927,7 +939,8 @@ Writes the symbology of the layer into the document provided in SLD 1.1 format
927
939
:return: true in case of success
928
940
%End
929
941
930
- bool readSld( const QDomNode &node, QString &errorMessage ) ${SIP_FINAL};
942
+ virtual bool readSld( const QDomNode &node, QString &errorMessage ) ${SIP_FINAL};
943
+
931
944
932
945
long featureCount( const QString &legendKey ) const;
933
946
%Docstring
@@ -937,7 +950,8 @@ calculated by countSymbolFeatures()
937
950
:return: number of features rendered by symbol or -1 if failed or counts are not available
938
951
%End
939
952
940
- FeatureAvailability hasFeatures() const ${SIP_FINAL};
953
+ virtual FeatureAvailability hasFeatures() const ${SIP_FINAL};
954
+
941
955
%Docstring
942
956
Determines if this vector layer has features.
943
957
@@ -984,7 +998,8 @@ if the geometry type of the new data source matches the current geometry type of
984
998
.. versionadded:: 3.2
985
999
%End
986
1000
987
- QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL};
1001
+ virtual QString loadDefaultStyle( bool &resultFlag /Out/ ) ${SIP_FINAL};
1002
+
988
1003
989
1004
QgsVectorLayerFeatureCounter *countSymbolFeatures();
990
1005
%Docstring
@@ -1020,7 +1035,8 @@ Returns the string (typically sql) used to define a subset of the layer.
1020
1035
:return: The subset string or null QString if not implemented by the provider
1021
1036
%End
1022
1037
1023
- QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const ${SIP_FINAL};
1038
+ virtual QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const ${SIP_FINAL};
1039
+
1024
1040
%Docstring
1025
1041
Query the layer for features specified in request.
1026
1042
@@ -1050,7 +1066,8 @@ Query the layer for the features with the given ids.
1050
1066
Query the layer for the features which intersect the specified rectangle.
1051
1067
%End
1052
1068
1053
- bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 ) ${SIP_FINAL};
1069
+ virtual bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = 0 ) ${SIP_FINAL};
1070
+
1054
1071
1055
1072
bool updateFeature( QgsFeature &feature, bool skipDefaultValues = false );
1056
1073
%Docstring
@@ -1412,12 +1429,14 @@ Set labeling configuration. Takes ownership of the object.
1412
1429
.. versionadded:: 3.0
1413
1430
%End
1414
1431
1415
- bool isEditable() const ${SIP_FINAL};
1432
+ virtual bool isEditable() const ${SIP_FINAL};
1433
+
1416
1434
%Docstring
1417
1435
Returns true if the provider is in editing mode
1418
1436
%End
1419
1437
1420
- bool isSpatial() const ${SIP_FINAL};
1438
+ virtual bool isSpatial() const ${SIP_FINAL};
1439
+
1421
1440
%Docstring
1422
1441
Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeometry
1423
1442
%End
@@ -1435,22 +1454,27 @@ false otherwise.
1435
1454
.. versionadded:: 3.0
1436
1455
%End
1437
1456
1438
- void reload() ${SIP_FINAL};
1457
+ virtual void reload() ${SIP_FINAL};
1458
+
1439
1459
%Docstring
1440
1460
Synchronises with changes in the datasource
1441
1461
%End
1442
1462
1443
- QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) ${SIP_FINAL} /Factory/;
1463
+ virtual QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) ${SIP_FINAL} /Factory/;
1464
+
1444
1465
%Docstring
1445
1466
Returns new instance of QgsMapLayerRenderer that will be used for rendering of given context
1446
1467
1447
1468
.. versionadded:: 2.4
1448
1469
%End
1449
1470
1450
- QgsRectangle extent() const ${SIP_FINAL};
1451
- QgsRectangle sourceExtent() const ${SIP_FINAL};
1471
+ virtual QgsRectangle extent() const ${SIP_FINAL};
1472
+
1473
+ virtual QgsRectangle sourceExtent() const ${SIP_FINAL};
1474
+
1475
+
1476
+ virtual QgsFields fields() const ${SIP_FINAL};
1452
1477
1453
- QgsFields fields() const ${SIP_FINAL};
1454
1478
%Docstring
1455
1479
Returns the list of fields of this layer.
1456
1480
This also includes fields which have not yet been saved to the provider.
@@ -1468,7 +1492,8 @@ Returns list of attribute indexes. i.e. a list from 0 ... fieldCount()
1468
1492
Returns the list of attributes which make up the layer's primary keys.
1469
1493
%End
1470
1494
1471
- long featureCount() const ${SIP_FINAL};
1495
+ virtual long featureCount() const ${SIP_FINAL};
1496
+
1472
1497
%Docstring
1473
1498
Returns feature count including changes which have not yet been committed
1474
1499
If you need only the count of committed features call this method on this layer's provider.
@@ -1692,7 +1717,8 @@ Deletes a list of attribute fields (but does not commit it)
1692
1717
:return: true if at least one attribute has been deleted
1693
1718
%End
1694
1719
1695
- bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 ) ${SIP_FINAL};
1720
+ virtual bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = 0 ) ${SIP_FINAL};
1721
+
1696
1722
1697
1723
bool deleteFeature( QgsFeatureId fid );
1698
1724
%Docstring
@@ -1975,7 +2001,8 @@ for the field at `index`.
1975
2001
.. versionadded:: 3.0
1976
2002
%End
1977
2003
1978
- QSet<QVariant> uniqueValues( int fieldIndex, int limit = -1 ) const ${SIP_FINAL};
2004
+ virtual QSet<QVariant> uniqueValues( int fieldIndex, int limit = -1 ) const ${SIP_FINAL};
2005
+
1979
2006
%Docstring
1980
2007
Calculates a list of unique values contained within an attribute in the layer. Note that
1981
2008
in some circumstances when unsaved changes are present for the layer then the returned list
@@ -2009,7 +2036,8 @@ returned list).
2009
2036
:return: list of unique strings containing substring
2010
2037
%End
2011
2038
2012
- QVariant minimumValue( int index ) const ${SIP_FINAL};
2039
+ virtual QVariant minimumValue( int index ) const ${SIP_FINAL};
2040
+
2013
2041
%Docstring
2014
2042
Returns the minimum value for an attribute column or an invalid variant in case of error.
2015
2043
Note that in some circumstances when unsaved changes are present for the layer then the
@@ -2021,7 +2049,8 @@ been changed inside the edit buffer then the previous saved value may be returne
2021
2049
.. seealso:: :py:func:`uniqueValues`
2022
2050
%End
2023
2051
2024
- QVariant maximumValue( int index ) const ${SIP_FINAL};
2052
+ virtual QVariant maximumValue( int index ) const ${SIP_FINAL};
2053
+
2025
2054
%Docstring
2026
2055
Returns the maximum value for an attribute column or an invalid variant in case of error.
2027
2056
Note that in some circumstances when unsaved changes are present for the layer then the
@@ -2085,7 +2114,8 @@ and 1.0 (fully opaque).
2085
2114
.. versionadded:: 3.0
2086
2115
%End
2087
2116
2088
- QString htmlMetadata() const ${SIP_FINAL};
2117
+ virtual QString htmlMetadata() const ${SIP_FINAL};
2118
+
2089
2119
2090
2120
void setSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod );
2091
2121
%Docstring
@@ -2153,9 +2183,11 @@ It may also contain embedded expressions.
2153
2183
.. versionadded:: 3.0
2154
2184
%End
2155
2185
2156
- QgsExpressionContext createExpressionContext() const ${SIP_FINAL};
2186
+ virtual QgsExpressionContext createExpressionContext() const ${SIP_FINAL};
2187
+
2188
+
2189
+ virtual QgsExpressionContextScope *createExpressionContextScope() const ${SIP_FINAL} /Factory/;
2157
2190
2158
- QgsExpressionContextScope *createExpressionContextScope() const ${SIP_FINAL} /Factory/;
2159
2191
2160
2192
QgsEditFormConfig editFormConfig() const;
2161
2193
%Docstring
@@ -2566,7 +2598,8 @@ Emitted when the feature count for symbols on this layer has been recalculated.
2566
2598
%End
2567
2599
2568
2600
protected:
2569
- void setExtent( const QgsRectangle &rect ) ${SIP_FINAL};
2601
+ virtual void setExtent( const QgsRectangle &rect ) ${SIP_FINAL};
2602
+
2570
2603
%Docstring
2571
2604
Sets the extent
2572
2605
%End
0 commit comments