QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsvectorlayer.h
Go to the documentation of this file.
1 
2 /***************************************************************************
3  -------------------
4  begin : Oct 29, 2003
5  copyright : (C) 2003 by Gary E.Sherman
6  email : sherman at mrcc.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 QGSVECTORLAYER_H
19 #define QGSVECTORLAYER_H
20 
21 
22 #include "qgis_core.h"
23 #include <QMap>
24 #include <QSet>
25 #include <QList>
26 #include <QStringList>
27 #include <QFont>
28 #include <QMutex>
29 
30 #include "qgis.h"
31 #include "qgsmaplayer.h"
32 #include "qgsfeature.h"
33 #include "qgsfeaturerequest.h"
34 #include "qgsfeaturesource.h"
35 #include "qgsfields.h"
36 #include "qgsvectordataprovider.h"
38 #include "qgseditformconfig.h"
40 #include "qgsaggregatecalculator.h"
41 #include "qgsfeatureiterator.h"
44 #include "qgsexpressioncontext.h"
46 
47 class QPainter;
48 class QImage;
49 
51 class QgsActionManager;
53 class QgsCurve;
55 class QgsDiagramRenderer;
58 class QgsFeatureRenderer;
59 class QgsGeometry;
60 class QgsGeometryVertexIndex;
61 class QgsMapToPixel;
62 class QgsRectangle;
63 class QgsRectangle;
64 class QgsRelation;
65 class QgsWeakRelation;
66 class QgsRelationManager;
69 class QgsSymbol;
76 class QgsPoint;
77 class QgsFeedback;
79 class QgsAuxiliaryLayer;
80 class QgsGeometryOptions;
85 
86 typedef QList<int> QgsAttributeList;
87 typedef QSet<int> QgsAttributeIds;
88 
89 // TODO QGIS4: Remove virtual from non-inherited methods (like isModified)
90 
392 {
393  Q_OBJECT
394 
395  Q_PROPERTY( QString subsetString READ subsetString WRITE setSubsetString NOTIFY subsetStringChanged )
396  Q_PROPERTY( QString displayExpression READ displayExpression WRITE setDisplayExpression NOTIFY displayExpressionChanged )
397  Q_PROPERTY( QString mapTipTemplate READ mapTipTemplate WRITE setMapTipTemplate NOTIFY mapTipTemplateChanged )
398  Q_PROPERTY( QgsEditFormConfig editFormConfig READ editFormConfig WRITE setEditFormConfig NOTIFY editFormConfigChanged )
399  Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged )
400  Q_PROPERTY( bool supportsEditing READ supportsEditing NOTIFY supportsEditingChanged )
401 
402  public:
403 
409  {
410 
414  explicit LayerOptions( bool loadDefaultStyle = true,
415  bool readExtentFromXml = false )
416  : loadDefaultStyle( loadDefaultStyle )
417  , readExtentFromXml( readExtentFromXml )
418  {}
419 
424  explicit LayerOptions( const QgsCoordinateTransformContext &transformContext,
425  bool loadDefaultStyle = true,
426  bool readExtentFromXml = false
427  )
428  : loadDefaultStyle( loadDefaultStyle )
429  , readExtentFromXml( readExtentFromXml )
430  , transformContext( transformContext )
431  {}
432 
434  bool loadDefaultStyle = true;
435 
440  bool readExtentFromXml = false;
441 
447 
460 
473 
487  bool skipCrsValidation = false;
488 
489  };
490 
495  struct CORE_EXPORT DeleteContext
496  {
497 
501  explicit DeleteContext( bool cascade = false, QgsProject *project = nullptr ): cascade( cascade ), project( project ) {}
502 
509  QList<QgsVectorLayer *> handledLayers( bool includeAuxiliaryLayers = true ) const;
510 
514  QgsFeatureIds handledFeatures( QgsVectorLayer *layer ) const;
515 
516  QMap<QgsVectorLayer *, QgsFeatureIds> mHandledFeatures SIP_SKIP;
517  bool cascade;
519  };
520 
534  explicit QgsVectorLayer( const QString &path = QString(), const QString &baseName = QString(),
535  const QString &providerLib = "ogr", const QgsVectorLayer::LayerOptions &options = QgsVectorLayer::LayerOptions() );
536 
537  ~QgsVectorLayer() override;
538 
540  QgsVectorLayer( const QgsVectorLayer &rhs ) = delete;
542  QgsVectorLayer &operator=( QgsVectorLayer const &rhs ) = delete;
543 
544 #ifdef SIP_RUN
545  SIP_PYOBJECT __repr__();
546  % MethodCode
547  QString str = QStringLiteral( "<QgsVectorLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral( "Invalid" ) );
548  sipRes = PyUnicode_FromString( str.toUtf8().constData() );
549  % End
550 #endif
551 
560  QgsVectorLayer *clone() const override SIP_FACTORY;
561 
566  QString storageType() const;
567 
571  QString capabilitiesString() const;
572 
573 
583  bool isSqlQuery() const;
584 
591  Qgis::VectorLayerTypeFlags vectorLayerTypeFlags() const;
592 
593 
597  QString dataComment() const;
598 
606  QString displayField() const;
607 
615  void setDisplayExpression( const QString &displayExpression );
616 
623  QString displayExpression() const;
624 
625  QgsVectorDataProvider *dataProvider() FINAL;
626  const QgsVectorDataProvider *dataProvider() const FINAL SIP_SKIP;
627  QgsMapLayerTemporalProperties *temporalProperties() override;
628  QgsMapLayerElevationProperties *elevationProperties() override;
629  QgsAbstractProfileGenerator *createProfileGenerator( const QgsProfileRequest &request ) override SIP_FACTORY;
630 
641  void setProviderEncoding( const QString &encoding );
642 
644  void setCoordinateSystem();
645 
651  bool addJoin( const QgsVectorLayerJoinInfo &joinInfo );
652 
657  bool removeJoin( const QString &joinLayerId );
658 
663  QgsVectorLayerJoinBuffer *joinBuffer() { return mJoinBuffer; }
664 
669  const QgsVectorLayerJoinBuffer *joinBuffer() const { return mJoinBuffer; } SIP_SKIP;
670 
671  const QList<QgsVectorLayerJoinInfo> vectorJoins() const;
672 
681  bool setDependencies( const QSet<QgsMapLayerDependency> &layers ) FINAL;
682 
690  QSet<QgsMapLayerDependency> dependencies() const FINAL;
691 
702  int addExpressionField( const QString &exp, const QgsField &fld );
703 
711  void removeExpressionField( int index );
712 
722  QString expressionField( int index ) const;
723 
733  void updateExpressionField( int index, const QString &exp );
734 
741  QgsActionManager *actions() { return mActions; }
742 
748  const QgsActionManager *actions() const SIP_SKIP { return mActions; }
749 
755  int selectedFeatureCount() const;
756 
766  Q_INVOKABLE void selectByRect( QgsRectangle &rect, Qgis::SelectBehavior behavior = Qgis::SelectBehavior::SetSelection );
767 
778  Q_INVOKABLE void selectByExpression( const QString &expression, Qgis::SelectBehavior behavior = Qgis::SelectBehavior::SetSelection, QgsExpressionContext *context = nullptr );
779 
790  Q_INVOKABLE void selectByIds( const QgsFeatureIds &ids, Qgis::SelectBehavior behavior = Qgis::SelectBehavior::SetSelection );
791 
803  Q_INVOKABLE void modifySelection( const QgsFeatureIds &selectIds, const QgsFeatureIds &deselectIds );
804 
806  Q_INVOKABLE void invertSelection();
807 
809  Q_INVOKABLE void selectAll();
810 
818  Q_INVOKABLE void invertSelectionInRectangle( QgsRectangle &rect );
819 
832  Q_INVOKABLE QgsFeatureList selectedFeatures() const;
833 
849  QgsFeatureIterator getSelectedFeatures( QgsFeatureRequest request = QgsFeatureRequest() ) const;
850 
858  Q_INVOKABLE const QgsFeatureIds &selectedFeatureIds() const;
859 
861  Q_INVOKABLE QgsRectangle boundingBoxOfSelected() const;
862 
870  bool labelsEnabled() const;
871 
881  void setLabelsEnabled( bool enabled );
882 
888  bool diagramsEnabled() const;
889 
891  void setDiagramRenderer( QgsDiagramRenderer *r SIP_TRANSFER );
892  const QgsDiagramRenderer *diagramRenderer() const { return mDiagramRenderer; }
893 
894  void setDiagramLayerSettings( const QgsDiagramLayerSettings &s );
895  const QgsDiagramLayerSettings *diagramLayerSettings() const { return mDiagramLayerSettings; }
896 
903  QgsFeatureRenderer *renderer() { return mRenderer; }
904 
912  const QgsFeatureRenderer *renderer() const SIP_SKIP { return mRenderer; }
913 
920  void setRenderer( QgsFeatureRenderer *r SIP_TRANSFER );
921 
931  void addFeatureRendererGenerator( QgsFeatureRendererGenerator *generator SIP_TRANSFER );
932 
942  void removeFeatureRendererGenerator( const QString &id );
943 
951  QList< const QgsFeatureRendererGenerator * > featureRendererGenerators() const;
952 
954  Q_INVOKABLE QgsWkbTypes::GeometryType geometryType() const;
955 
957  Q_INVOKABLE QgsWkbTypes::Type wkbType() const FINAL;
958 
959  QgsCoordinateReferenceSystem sourceCrs() const FINAL;
960  QString sourceName() const FINAL;
961 
966  bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) FINAL;
967 
972  bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const FINAL;
973 
974  QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const FINAL;
975  QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const FINAL;
976 
981  void resolveReferences( QgsProject *project ) FINAL;
982 
999  virtual void saveStyleToDatabase( const QString &name, const QString &description,
1000  bool useAsDefault, const QString &uiFileContent,
1001  QString &msgError SIP_OUT,
1002  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
1003 
1013  virtual int listStylesInDatabase( QStringList &ids SIP_OUT, QStringList &names SIP_OUT,
1014  QStringList &descriptions SIP_OUT, QString &msgError SIP_OUT );
1015 
1019  virtual QString getStyleFromDatabase( const QString &styleId, QString &msgError SIP_OUT );
1020 
1028  virtual bool deleteStyleFromDatabase( const QString &styleId, QString &msgError SIP_OUT );
1029 
1037  virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag SIP_OUT, bool loadFromLocalDb,
1038  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
1039 
1044  QString loadNamedStyle( const QString &theURI, bool &resultFlag SIP_OUT,
1045  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL;
1046 
1060  bool loadAuxiliaryLayer( const QgsAuxiliaryStorage &storage, const QString &key = QString() );
1061 
1071  void setAuxiliaryLayer( QgsAuxiliaryLayer *layer SIP_TRANSFER = nullptr );
1072 
1078  QgsAuxiliaryLayer *auxiliaryLayer();
1079 
1085  const QgsAuxiliaryLayer *auxiliaryLayer() const SIP_SKIP;
1086 
1087  bool readSymbology( const QDomNode &layerNode, QString &errorMessage,
1088  QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL;
1089  bool readStyle( const QDomNode &node, QString &errorMessage,
1090  QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL;
1091  bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage,
1092  const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const FINAL;
1093  bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage,
1094  const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const FINAL;
1095 
1104  bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QVariantMap &props = QVariantMap() ) const;
1105 
1106  bool readSld( const QDomNode &node, QString &errorMessage ) FINAL;
1107 
1113  long long featureCount( const QString &legendKey ) const;
1114 
1121  QgsFeatureIds symbolFeatureIds( const QString &legendKey ) const;
1122 
1133  FeatureAvailability hasFeatures() const FINAL;
1134 
1135 
1136  QString loadDefaultStyle( bool &resultFlag SIP_OUT ) FINAL;
1137 
1151  QgsVectorLayerFeatureCounter *countSymbolFeatures( bool storeSymbolFids = false );
1152 
1160  virtual bool setSubsetString( const QString &subset );
1161 
1166  virtual QString subsetString() const;
1167 
1173  QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const FINAL;
1174 
1178  inline QgsFeatureIterator getFeatures( const QString &expression )
1179  {
1180  return getFeatures( QgsFeatureRequest( expression ) );
1181  }
1182 
1187  inline QgsFeature getFeature( QgsFeatureId fid ) const
1188  {
1189  QgsFeature feature;
1190  getFeatures( QgsFeatureRequest( fid ) ).nextFeature( feature );
1191  return feature;
1192  }
1193 
1198  QgsGeometry getGeometry( QgsFeatureId fid ) const;
1199 
1204  {
1205  return getFeatures( QgsFeatureRequest( fids ) );
1206  }
1207 
1211  inline QgsFeatureIterator getFeatures( const QgsRectangle &rectangle )
1212  {
1213  return getFeatures( QgsFeatureRequest( rectangle ) );
1214  }
1215 
1216  bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) FINAL;
1217 
1243  bool updateFeature( QgsFeature &feature, bool skipDefaultValues = false );
1244 
1256  bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );
1257 
1269  bool insertVertex( const QgsPoint &point, QgsFeatureId atFeatureId, int beforeVertex );
1270 
1281  bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVertex );
1282 
1293  bool moveVertex( const QgsPoint &p, QgsFeatureId atFeatureId, int atVertex ) SIP_PYNAME( moveVertexV2 );
1294 
1305  Qgis::VectorEditResult deleteVertex( QgsFeatureId featureId, int vertex );
1306 
1314  Q_INVOKABLE bool deleteSelectedFeatures( int *deletedCount = nullptr, QgsVectorLayer::DeleteContext *context = nullptr );
1315 
1336  Q_DECL_DEPRECATED Qgis::GeometryOperationResult addRing( const QVector<QgsPointXY> &ring, QgsFeatureId *featureId = nullptr ) SIP_DEPRECATED;
1337 
1338 
1358  Q_INVOKABLE Qgis::GeometryOperationResult addRing( const QgsPointSequence &ring, QgsFeatureId *featureId = nullptr );
1359 
1380  Q_INVOKABLE Qgis::GeometryOperationResult addRing( QgsCurve *ring SIP_TRANSFER, QgsFeatureId *featureId = nullptr ) SIP_PYNAME( addCurvedRing );
1381 
1401  Q_DECL_DEPRECATED Qgis::GeometryOperationResult addPart( const QList<QgsPointXY> &ring ) SIP_DEPRECATED;
1402 
1403 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
1404 
1425  Q_DECL_DEPRECATED Qgis::GeometryOperationResult addPart( const QVector<QgsPointXY> &ring ) SIP_PYNAME( addPartV2 ) SIP_DEPRECATED;
1426 #endif
1427 
1447  Q_INVOKABLE Qgis::GeometryOperationResult addPart( const QgsPointSequence &ring ) SIP_PYNAME( addPartV2 );
1448 
1456  Q_INVOKABLE Qgis::GeometryOperationResult addPart( QgsCurve *ring SIP_TRANSFER ) SIP_PYNAME( addCurvedPart );
1457 
1469  Q_INVOKABLE int translateFeature( QgsFeatureId featureId, double dx, double dy );
1470 
1491  Q_DECL_DEPRECATED Qgis::GeometryOperationResult splitParts( const QVector<QgsPointXY> &splitLine, bool topologicalEditing = false ) SIP_DEPRECATED;
1492 
1512  Q_INVOKABLE Qgis::GeometryOperationResult splitParts( const QgsPointSequence &splitLine, bool topologicalEditing = false );
1513 
1534  Q_DECL_DEPRECATED Qgis::GeometryOperationResult splitFeatures( const QVector<QgsPointXY> &splitLine, bool topologicalEditing = false ) SIP_DEPRECATED;
1535 
1555  Q_INVOKABLE Qgis::GeometryOperationResult splitFeatures( const QgsPointSequence &splitLine, bool topologicalEditing = false );
1556 
1579  Q_INVOKABLE Qgis::GeometryOperationResult splitFeatures( const QgsCurve *curve, QgsPointSequence &topologyTestPoints SIP_OUT, bool preserveCircular = false, bool topologicalEditing = false );
1580 
1594  int addTopologicalPoints( const QgsGeometry &geom );
1595 
1612  Q_DECL_DEPRECATED int addTopologicalPoints( const QgsPointXY &p ) SIP_DEPRECATED;
1613 
1630  int addTopologicalPoints( const QgsPoint &p );
1631 
1648  int addTopologicalPoints( const QgsPointSequence &ps );
1649 
1656  const QgsAbstractVectorLayerLabeling *labeling() const SIP_SKIP { return mLabeling; }
1657 
1664  QgsAbstractVectorLayerLabeling *labeling() { return mLabeling; }
1665 
1670  void setLabeling( QgsAbstractVectorLayerLabeling *labeling SIP_TRANSFER );
1671 
1673  bool isEditable() const FINAL;
1674 
1676  bool isSpatial() const FINAL;
1677 
1679  bool isModified() const override;
1680 
1687  bool isAuxiliaryField( int index, int &srcIndex ) const;
1688 
1690  void reload() FINAL;
1691 
1696  QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) FINAL SIP_FACTORY;
1697 
1698  QgsRectangle extent() const FINAL;
1699  QgsRectangle sourceExtent() const FINAL;
1700 
1707  QgsFields fields() const FINAL;
1708 
1712  inline QgsAttributeList attributeList() const { return mFields.allAttributesList(); }
1713 
1717  QgsAttributeList primaryKeyAttributes() const;
1718 
1724  long long featureCount() const FINAL;
1725 
1730  bool setReadOnly( bool readonly = true );
1731 
1737  bool supportsEditing() const override;
1738 
1759  bool changeGeometry( QgsFeatureId fid, QgsGeometry &geometry, bool skipDefaultValue = false );
1760 
1791  bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant(), bool skipDefaultValues = false );
1792 
1828  bool changeAttributeValues( QgsFeatureId fid, const QgsAttributeMap &newValues, const QgsAttributeMap &oldValues = QgsAttributeMap(), bool skipDefaultValues = false );
1829 
1839  bool addAttribute( const QgsField &field );
1840 
1846  void setFieldAlias( int index, const QString &aliasString );
1847 
1853  void removeFieldAlias( int index );
1854 
1865  bool renameAttribute( int index, const QString &newName );
1866 
1873  QString attributeAlias( int index ) const;
1874 
1876  QString attributeDisplayName( int index ) const;
1877 
1879  QgsStringMap attributeAliases() const;
1880 
1885  Q_DECL_DEPRECATED QSet<QString> excludeAttributesWms() const SIP_DEPRECATED;
1886 
1891  Q_DECL_DEPRECATED void setExcludeAttributesWms( const QSet<QString> &att ) SIP_DEPRECATED;
1892 
1897  Q_DECL_DEPRECATED QSet<QString> excludeAttributesWfs() const SIP_DEPRECATED;
1898 
1903  Q_DECL_DEPRECATED void setExcludeAttributesWfs( const QSet<QString> &att ) SIP_DEPRECATED;
1904 
1913  virtual bool deleteAttribute( int attr );
1914 
1922  bool deleteAttributes( const QList<int> &attrs );
1923 
1924  bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) FINAL;
1925 
1936  bool deleteFeature( QgsFeatureId fid, DeleteContext *context = nullptr );
1937 
1951  bool deleteFeatures( const QgsFeatureIds &fids, DeleteContext *context = nullptr );
1952 
1976  Q_INVOKABLE bool commitChanges( bool stopEditing = true );
1977 
1983  QStringList commitErrors() const;
1984 
1994  Q_INVOKABLE bool rollBack( bool deleteBuffer = true );
1995 
2002  QList<QgsRelation> referencingRelations( int idx ) const;
2003 
2010  QList<QgsWeakRelation> weakRelations( ) const SIP_SKIP;
2011 
2012 
2014  Q_INVOKABLE QgsVectorLayerEditBuffer *editBuffer() { return mEditBuffer; }
2015 
2020  const QgsVectorLayerEditBuffer *editBuffer() const SIP_SKIP { return mEditBuffer; }
2021 
2026  void beginEditCommand( const QString &text );
2027 
2029  void endEditCommand();
2030 
2032  void destroyEditCommand();
2033 
2038  Q_DECL_DEPRECATED static void drawVertexMarker( double x, double y, QPainter &p, Qgis::VertexMarkerType type, int vertexSize );
2039 
2048  void updateFields();
2049 
2064  QVariant defaultValue( int index, const QgsFeature &feature = QgsFeature(),
2065  QgsExpressionContext *context = nullptr ) const;
2066 
2078  void setDefaultValueDefinition( int index, const QgsDefaultValue &definition );
2079 
2090  QgsDefaultValue defaultValueDefinition( int index ) const;
2091 
2099  QgsFieldConstraints::Constraints fieldConstraints( int fieldIndex ) const;
2100 
2106  QMap< QgsFieldConstraints::Constraint, QgsFieldConstraints::ConstraintStrength> fieldConstraintsAndStrength( int fieldIndex ) const;
2107 
2117 
2125  void removeFieldConstraint( int index, QgsFieldConstraints::Constraint constraint );
2126 
2134  QString constraintExpression( int index ) const;
2135 
2143  QString constraintDescription( int index ) const;
2144 
2153  void setConstraintExpression( int index, const QString &expression, const QString &description = QString() );
2154 
2160  void setFieldConfigurationFlags( int index, QgsField::ConfigurationFlags flags ) SIP_SKIP;
2161 
2166  void setFieldConfigurationFlag( int index, QgsField::ConfigurationFlag flag, bool active ) SIP_SKIP;
2167 
2173  QgsField::ConfigurationFlags fieldConfigurationFlags( int index ) const SIP_SKIP;
2174 
2178  void setEditorWidgetSetup( int index, const QgsEditorWidgetSetup &setup );
2179 
2186  QgsEditorWidgetSetup editorWidgetSetup( int index ) const;
2187 
2199  QSet<QVariant> uniqueValues( int fieldIndex, int limit = -1 ) const FINAL;
2200 
2214  QStringList uniqueStringsMatching( int index, const QString &substring, int limit = -1,
2215  QgsFeedback *feedback = nullptr ) const;
2216 
2231  QVariant minimumValue( int index ) const FINAL;
2232 
2247  QVariant maximumValue( int index ) const FINAL;
2248 
2249 
2269  void minimumAndMaximumValue( int index, QVariant &minimum SIP_OUT, QVariant &maximum SIP_OUT ) const;
2270 
2285  QVariant aggregate( QgsAggregateCalculator::Aggregate aggregate,
2286  const QString &fieldOrExpression,
2287  const QgsAggregateCalculator::AggregateParameters &parameters = QgsAggregateCalculator::AggregateParameters(),
2288  QgsExpressionContext *context = nullptr,
2289  bool *ok = nullptr,
2290  QgsFeatureIds *fids = nullptr,
2291  QgsFeedback *feedback = nullptr,
2292  QString *error SIP_PYARGREMOVE = nullptr ) const;
2293 
2295  void setFeatureBlendMode( QPainter::CompositionMode blendMode );
2297  QPainter::CompositionMode featureBlendMode() const;
2298 
2299  QString htmlMetadata() const FINAL;
2300 
2305  void setSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod ) { mSimplifyMethod = simplifyMethod; }
2306 
2311  inline const QgsVectorSimplifyMethod &simplifyMethod() const { return mSimplifyMethod; }
2312 
2318  bool simplifyDrawingCanbeApplied( const QgsRenderContext &renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const;
2319 
2327  QgsConditionalLayerStyles *conditionalStyles() const;
2328 
2333  QgsAttributeTableConfig attributeTableConfig() const;
2334 
2339  void setAttributeTableConfig( const QgsAttributeTableConfig &attributeTableConfig );
2340 
2348  QString mapTipTemplate() const;
2349 
2357  void setMapTipTemplate( const QString &mapTipTemplate );
2358 
2359  QgsExpressionContext createExpressionContext() const FINAL;
2360 
2361  QgsExpressionContextScope *createExpressionContextScope() const FINAL SIP_FACTORY;
2362 
2370  QgsEditFormConfig editFormConfig() const;
2371 
2378  void setEditFormConfig( const QgsEditFormConfig &editFormConfig );
2379 
2387  void setReadExtentFromXml( bool readExtentFromXml );
2388 
2396  bool readExtentFromXml() const;
2397 
2403  bool isEditCommandActive() const { return mEditCommandActive; }
2404 
2410  QgsGeometryOptions *geometryOptions() const;
2411 
2429  bool allowCommit() const SIP_SKIP;
2430 
2448  void setAllowCommit( bool allowCommit ) SIP_SKIP;
2449 
2455  QgsStoredExpressionManager *storedExpressionManager() { return mStoredExpressionManager; }
2456 
2457  public slots:
2458 
2466  void select( QgsFeatureId featureId );
2467 
2475  Q_INVOKABLE void select( const QgsFeatureIds &featureIds );
2476 
2484  void deselect( QgsFeatureId featureId );
2485 
2493  Q_INVOKABLE void deselect( const QgsFeatureIds &featureIds );
2494 
2501  Q_INVOKABLE void removeSelection();
2502 
2513  void reselect();
2514 
2521  virtual void updateExtents( bool force = false );
2522 
2537  Q_INVOKABLE bool startEditing();
2538 
2544  virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext ) override;
2545 
2546  QgsFeatureSource::SpatialIndexPresence hasSpatialIndex() const override;
2547 
2548  bool accept( QgsStyleEntityVisitorInterface *visitor ) const override;
2549 
2550  signals:
2551 
2559  void selectionChanged( const QgsFeatureIds &selected, const QgsFeatureIds &deselected, bool clearAndSelect );
2560 
2566  void allowCommitChanged();
2567 
2569  void beforeModifiedCheck() const;
2570 
2572  void beforeEditingStarted();
2573 
2579  void beforeCommitChanges( bool stopEditing );
2580 
2582  void beforeRollBack();
2583 
2588  void afterCommitChanges();
2589 
2594  void afterRollBack();
2595 
2604  void attributeAdded( int idx );
2605 
2612  void beforeAddingExpressionField( const QString &fieldName );
2613 
2622  void attributeDeleted( int idx );
2623 
2630  void beforeRemovingExpressionField( int idx );
2631 
2637  void featureAdded( QgsFeatureId fid );
2638 
2647  void featureDeleted( QgsFeatureId fid );
2648 
2658  void featuresDeleted( const QgsFeatureIds &fids );
2659 
2664  void updatedFields();
2665 
2670  void subsetStringChanged();
2671 
2680  void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant &value );
2681 
2689  void geometryChanged( QgsFeatureId fid, const QgsGeometry &geometry );
2690 
2692  void committedAttributesDeleted( const QString &layerId, const QgsAttributeList &deletedAttributes );
2694  void committedAttributesAdded( const QString &layerId, const QList<QgsField> &addedAttributes );
2696  void committedFeaturesAdded( const QString &layerId, const QgsFeatureList &addedFeatures );
2698  void committedFeaturesRemoved( const QString &layerId, const QgsFeatureIds &deletedFeatureIds );
2700  void committedAttributeValuesChanges( const QString &layerId, const QgsChangedAttributesMap &changedAttributesValues );
2702  void committedGeometriesChanges( const QString &layerId, const QgsGeometryMap &changedGeometries );
2703 
2705  void labelingFontNotFound( QgsVectorLayer *layer, const QString &fontfamily );
2706 
2708  void featureBlendModeChanged( QPainter::CompositionMode blendMode );
2709 
2715  void editCommandStarted( const QString &text );
2716 
2722  void editCommandEnded();
2723 
2729  void editCommandDestroyed();
2730 
2740  void readCustomSymbology( const QDomElement &element, QString &errorMessage );
2741 
2751  void writeCustomSymbology( QDomElement &element, QDomDocument &doc, QString &errorMessage ) const;
2752 
2758  void mapTipTemplateChanged();
2759 
2765  void displayExpressionChanged();
2766 
2770  void raiseError( const QString &msg );
2771 
2777  void editFormConfigChanged();
2778 
2785  void readOnlyChanged();
2786 
2792  void supportsEditingChanged();
2793 
2799  void symbolFeatureCountMapChanged();
2800 
2801  protected:
2803  void setExtent( const QgsRectangle &rect ) FINAL;
2804 
2805  private slots:
2806  void invalidateSymbolCountedFlag();
2807  void onFeatureCounterCompleted();
2808  void onFeatureCounterTerminated();
2809  void onJoinedFieldsChanged();
2810  void onFeatureDeleted( QgsFeatureId fid );
2811  void onRelationsLoaded();
2812  void onSymbolsCounted();
2813  void onDirtyTransaction( const QString &sql, const QString &name );
2814  void emitDataChanged();
2815  void onAfterCommitChangesDependency();
2816 
2817  private:
2818  void updateDefaultValues( QgsFeatureId fid, QgsFeature feature = QgsFeature() );
2819 
2823  bool isReadOnly() const FINAL;
2824 
2831  bool setDataProvider( QString const &provider, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
2832 
2844  void setDataSourcePrivate( const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags ) override;
2845 
2847  void readSldLabeling( const QDomNode &node );
2848 
2850  bool readSldTextSymbolizer( const QDomNode &node, QgsPalLayerSettings &settings ) const;
2851 
2853  QgsAbstractVectorLayerLabeling *readLabelingFromCustomProperties();
2854 
2855  bool deleteFeatureCascade( QgsFeatureId fid, DeleteContext *context = nullptr );
2856 
2857 #ifdef SIP_RUN
2858  QgsVectorLayer( const QgsVectorLayer &rhs );
2859 #endif
2860  void minimumOrMaximumValue( int index, QVariant *minimum, QVariant *maximum ) const;
2862 
2863  void createEditBuffer();
2864  void clearEditBuffer();
2865 
2866  QgsConditionalLayerStyles *mConditionalStyles = nullptr;
2867 
2869  QgsVectorDataProvider *mDataProvider = nullptr;
2870 
2872  QgsVectorLayerTemporalProperties *mTemporalProperties = nullptr;
2873 
2874  QgsVectorLayerElevationProperties *mElevationProperties = nullptr;
2875 
2877  QString mDisplayExpression;
2878 
2879  QString mMapTipTemplate;
2880 
2882  QgsActionManager *mActions = nullptr;
2883 
2885  bool mReadOnly = false;
2886 
2892  QgsFeatureIds mSelectedFeatureIds;
2893 
2897  QgsFeatureIds mPreviousSelectedFeatureIds;
2898 
2900  QgsFields mFields;
2901 
2903  QgsStringMap mAttributeAliasMap;
2904 
2906  QMap<QString, QgsDefaultValue> mDefaultExpressionMap;
2907 
2909  QSet<int> mDefaultValueOnUpdateFields;
2910 
2912  QMap< QString, QgsFieldConstraints::Constraints > mFieldConstraints;
2913 
2915  QMap< QPair< QString, QgsFieldConstraints::Constraint >, QgsFieldConstraints::ConstraintStrength > mFieldConstraintStrength;
2916 
2918  QMap< QString, QPair< QString, QString > > mFieldConstraintExpressions;
2919 
2920  QMap< QString, QgsField::ConfigurationFlags > mFieldConfigurationFlags;
2921  QMap< QString, QgsEditorWidgetSetup > mFieldWidgetSetups;
2922 
2924  QgsEditFormConfig mEditFormConfig;
2925 
2928 
2930  QgsFeatureRenderer *mRenderer = nullptr;
2931 
2933  QgsVectorSimplifyMethod mSimplifyMethod;
2934 
2936  QgsAbstractVectorLayerLabeling *mLabeling = nullptr;
2937 
2939  bool mLabelsEnabled = false;
2940 
2942  bool mLabelFontNotFoundNotified = false;
2943 
2945  QPainter::CompositionMode mFeatureBlendMode = QPainter::CompositionMode_SourceOver;
2946 
2948  bool mVertexMarkerOnlyForSelection = false;
2949 
2950  QStringList mCommitErrors;
2951 
2953  QgsVectorLayerEditBuffer *mEditBuffer = nullptr;
2957 
2958  //stores information about joined layers
2959  QgsVectorLayerJoinBuffer *mJoinBuffer = nullptr;
2960 
2962  QgsExpressionFieldBuffer *mExpressionFieldBuffer = nullptr;
2963 
2964  //diagram rendering object. 0 if diagram drawing is disabled
2965  QgsDiagramRenderer *mDiagramRenderer = nullptr;
2966 
2967  //stores infos about diagram placement (placement type, priority, position distance)
2968  QgsDiagramLayerSettings *mDiagramLayerSettings = nullptr;
2969 
2970  mutable bool mValidExtent = false;
2971  mutable bool mLazyExtent = true;
2972 
2974  std::unique_ptr<QgsAuxiliaryLayer> mAuxiliaryLayer;
2975 
2977  QString mAuxiliaryLayerKey;
2978 
2979  // Features in renderer classes counted
2980  bool mSymbolFeatureCounted = false;
2981 
2982  // Feature counts for each renderer legend key
2983  QHash<QString, long long> mSymbolFeatureCountMap;
2984  QHash<QString, QgsFeatureIds> mSymbolFeatureIdMap;
2985 
2987  bool mEditCommandActive = false;
2988 
2990  bool mCommitChangesActive = false;
2991 
2992  bool mReadExtentFromXml;
2993  QgsRectangle mXmlExtent;
2994 
2995  QgsFeatureIds mDeletedFids;
2996 
2997  QgsAttributeTableConfig mAttributeTableConfig;
2998 
2999  mutable QMutex mFeatureSourceConstructorMutex;
3000 
3001  QgsVectorLayerFeatureCounter *mFeatureCounter = nullptr;
3002 
3003  std::unique_ptr<QgsGeometryOptions> mGeometryOptions;
3004 
3005  bool mAllowCommit = true;
3006 
3008  QgsStoredExpressionManager *mStoredExpressionManager = nullptr;
3009 
3011 
3013  bool mDataChangedFired = false;
3014 
3015  QList<QgsWeakRelation> mWeakRelations;
3016 
3017  bool mSetLegendFromStyle = false;
3018 
3019  QList< QgsFeatureRendererGenerator * > mRendererGenerators;
3020 
3022  QTimer *mRefreshRendererTimer = nullptr;
3023 };
3024 
3025 
3026 
3027 // clazy:excludeall=qstring-allocations
3028 
3029 #endif
QgsCurve
Abstract base class for curved geometry type.
Definition: qgscurve.h:35
QgsVectorLayerFeatureCounter
Counts the features in a QgsVectorLayer in task. You should most likely not use this directly and ins...
Definition: qgsvectorlayerfeaturecounter.h:33
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition: qgsexpressioncontext.h:406
SIP_PYNAME
#define SIP_PYNAME(name)
Definition: qgis_sip.h:81
qgsfields.h
QgsVectorSimplifyMethod
This class contains information how to simplify geometries fetched from a vector layer.
Definition: qgsvectorsimplifymethod.h:29
QgsAggregateCalculator
Utility class for calculating aggregates for a field (or expression) over the features from a vector ...
Definition: qgsaggregatecalculator.h:44
QgsRelationManager
This class manages a set of relations between layers.
Definition: qgsrelationmanager.h:35
QgsCoordinateTransformContext
Contains information about the context in which a coordinate transform is executed.
Definition: qgscoordinatetransformcontext.h:57
qgsfeaturerequest.h
QgsDefaultValue
The QgsDefaultValue class provides a container for managing client side default values for fields.
Definition: qgsdefaultvalue.h:48
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition: qgsreadwritecontext.h:34
QgsDataProvider
Abstract base class for spatial data provider implementations.
Definition: qgsdataprovider.h:40
QgsAuxiliaryLayer
Class allowing to manage the auxiliary storage for a vector layer.
Definition: qgsauxiliarystorage.h:61
QgsEditorWidgetSetup
Holder for the widget type and its configuration for a field.
Definition: qgseditorwidgetsetup.h:28
QgsField::ConfigurationFlag
ConfigurationFlag
Configuration flags for fields These flags are meant to be user-configurable and are not describing a...
Definition: qgsfield.h:79
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:48
QgsVectorLayer::LayerOptions::LayerOptions
LayerOptions(bool loadDefaultStyle=true, bool readExtentFromXml=false)
Constructor for LayerOptions.
Definition: qgsvectorlayer.h:414
QgsVectorLayer::DeleteContext::cascade
bool cascade
Definition: qgsvectorlayer.h:517
QgsPalLayerSettings
Contains settings for how a map layer will be labeled.
Definition: qgspallabeling.h:86
QgsMapLayerElevationProperties
Base class for storage of map layer elevation properties.
Definition: qgsmaplayerelevationproperties.h:41
SIP_OUT
#define SIP_OUT
Definition: qgis_sip.h:58
QgsVectorLayerEditBufferGroup
The edit buffer group manages a group of edit buffers.
Definition: qgsvectorlayereditbuffergroup.h:38
QgsVectorSimplifyMethod::SimplifyHint
SimplifyHint
Simplification flags for fast rendering of features.
Definition: qgsvectorsimplifymethod.h:50
QgsVectorLayer::DeleteContext
Context for cascade delete features.
Definition: qgsvectorlayer.h:495
qgsfeatureiterator.h
QgsFields
Container of fields for a vector layer.
Definition: qgsfields.h:44
QgsVectorLayer::getFeatures
QgsFeatureIterator getFeatures(const QgsRectangle &rectangle)
Queries the layer for the features which intersect the specified rectangle.
Definition: qgsvectorlayer.h:1211
qgsfeature.h
QgsAbstractProfileGenerator
Abstract base class for objects which generate elevation profiles.
Definition: qgsabstractprofilegenerator.h:392
QgsFeatureSource
An interface for objects which provide features via a getFeatures method.
Definition: qgsfeaturesource.h:37
qgis.h
QgsGeometryOptions
The QgsGeometryOptions class contains options to automatically adjust geometries to constraints on a ...
Definition: qgsgeometryoptions.h:36
QgsRenderContext
Contains information about the context of a rendering operation.
Definition: qgsrendercontext.h:59
QgsStyleEntityVisitorInterface
An interface for classes which can visit style entity (e.g. symbol) nodes (using the visitor pattern)...
Definition: qgsstyleentityvisitor.h:33
QgsSingleSymbolRenderer
Definition: qgssinglesymbolrenderer.h:29
QgsWkbTypes::Type
Type
The WKB type describes the number of dimensions a geometry has.
Definition: qgswkbtypes.h:69
QgsExpressionContextScopeGenerator
Abstract interface for generating an expression context scope.
Definition: qgsexpressioncontextscopegenerator.h:28
QgsChangedAttributesMap
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
Definition: qgsfeature.h:868
SIP_PYARGREMOVE
#define SIP_PYARGREMOVE
Definition: qgis_sip.h:151
qgsabstractprofilesource.h
QgsSymbol
Abstract base class for all rendered symbols.
Definition: qgssymbol.h:92
field
const QgsField & field
Definition: qgsfield.h:463
QgsVectorLayer::diagramRenderer
const QgsDiagramRenderer * diagramRenderer() const
Definition: qgsvectorlayer.h:892
QgsFieldConstraints::Constraint
Constraint
Constraints which may be present on a field.
Definition: qgsfieldconstraints.h:43
QgsConditionalLayerStyles
The QgsConditionalLayerStyles class holds conditional style information for a layer....
Definition: qgsconditionalstyle.h:40
FINAL
#define FINAL
Definition: qgis_sip.h:237
QgsAttributeList
QList< int > QgsAttributeList
Definition: qgsfield.h:26
QgsFeatureRendererGenerator
An interface for objects which generate feature renderers for vector layers.
Definition: qgsfeaturerenderergenerator.h:31
QgsRectangle
A rectangle specified with double values.
Definition: qgsrectangle.h:41
QgsEditorWidgetWrapper
Manages an editor widget Widget and wrapper share the same parent.
Definition: qgseditorwidgetwrapper.h:47
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:103
QgsVectorLayer::LayerOptions::fallbackCrs
QgsCoordinateReferenceSystem fallbackCrs
Fallback layer coordinate reference system.
Definition: qgsvectorlayer.h:472
QgsMapLayerRenderer
Base class for utility classes that encapsulate information necessary for rendering of map layers.
Definition: qgsmaplayerrenderer.h:54
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
qgsaggregatecalculator.h
SIP_DEPRECATED
#define SIP_DEPRECATED
Definition: qgis_sip.h:106
QgsVectorLayer::DeleteContext::DeleteContext
DeleteContext(bool cascade=false, QgsProject *project=nullptr)
Constructor for DeleteContext.
Definition: qgsvectorlayer.h:501
QgsAttributeTableConfig
This is a container for configuration of the attribute table. The configuration is specific for one v...
Definition: qgsattributetableconfig.h:36
QgsFeatureRequest
This class wraps a request for features to a vector layer (or directly its vector data provider).
Definition: qgsfeaturerequest.h:83
qgsexpressioncontext.h
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsVectorLayer::labeling
QgsAbstractVectorLayerLabeling * labeling()
Access to labeling configuration.
Definition: qgsvectorlayer.h:1664
QgsVectorLayer::LayerOptions::LayerOptions
LayerOptions(const QgsCoordinateTransformContext &transformContext, bool loadDefaultStyle=true, bool readExtentFromXml=false)
Constructor for LayerOptions.
Definition: qgsvectorlayer.h:424
QgsWkbTypes::Unknown
@ Unknown
Definition: qgswkbtypes.h:71
Qgis::VertexMarkerType
VertexMarkerType
Editing vertex markers, used for showing vertices during a edit operation.
Definition: qgis.h:806
QgsFeedback
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Definition: qgsfeedback.h:44
QgsAbstractGeometrySimplifier
Abstract base class for simplify geometries using a specific algorithm.
Definition: qgsgeometrysimplifier.h:34
qgsmaplayer.h
QgsFeatureSource::SpatialIndexPresence
SpatialIndexPresence
Enumeration of spatial index presence states.
Definition: qgsfeaturesource.h:187
QgsVectorLayerJoinBuffer
Manages joined fields for a vector layer.
Definition: qgsvectorlayerjoinbuffer.h:37
Qgis::GeometryOperationResult
GeometryOperationResult
Success or failure of a geometry operation.
Definition: qgis.h:901
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
qgsfeaturesource.h
qgsvectordataprovider.h
QgsFeatureList
QList< QgsFeature > QgsFeatureList
Definition: qgsfeature.h:882
QgsAttributeMap
QMap< int, QVariant > QgsAttributeMap
Definition: qgsattributes.h:38
QgsDiagramLayerSettings
Stores the settings for rendering of all diagrams for a layer.
Definition: qgsdiagramrenderer.h:61
qgsvectorsimplifymethod.h
QgsVectorLayerElevationProperties
Vector layer specific subclass of QgsMapLayerElevationProperties.
Definition: qgsvectorlayerelevationproperties.h:38
QgsVectorLayerTemporalProperties
Implementation of map layer temporal properties for vector layers.
Definition: qgsvectorlayertemporalproperties.h:70
QgsProfileRequest
Encapsulates properties and constraints relating to fetching elevation profiles from different source...
Definition: qgsprofilerequest.h:37
QgsDiagramRenderer
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
Definition: qgsdiagramrenderer.h:684
QgsMapLayerTemporalProperties
Base class for storage of map layer temporal properties.
Definition: qgsmaplayertemporalproperties.h:42
QgsVectorLayerJoinInfo
Defines left outer join from our vector layer to some other vector layer. The join is done based on [...
Definition: qgsvectorlayerjoininfo.h:33
QgsExpressionFieldBuffer
Buffers information about expression fields for a vector layer.
Definition: qgsexpressionfieldbuffer.h:35
QgsFieldConstraints::ConstraintStrengthHard
@ ConstraintStrengthHard
Constraint must be honored before feature can be accepted.
Definition: qgsfieldconstraints.h:67
QgsFeatureIds
QSet< QgsFeatureId > QgsFeatureIds
Definition: qgsfeatureid.h:37
QgsEditFormConfig
Contains configuration settings for an editor form.
Definition: qgseditformconfig.h:39
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:211
QgsAbstractVectorLayerLabeling
Abstract base class - its implementations define different approaches to the labeling of a vector lay...
Definition: qgsvectorlayerlabeling.h:41
QgsExpressionContextScope
Single scope for storing variables and functions for use within a QgsExpressionContext....
Definition: qgsexpressioncontext.h:113
QgsVectorLayer::simplifyMethod
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings for fast rendering of features.
Definition: qgsvectorlayer.h:2311
qgsexpressioncontextgenerator.h
QgsAttributeIds
QSet< int > QgsAttributeIds
Definition: qgsvectorlayer.h:87
QgsPointXY
A class to represent a 2D point.
Definition: qgspointxy.h:58
qgseditformconfig.h
Qgis::SelectBehavior
SelectBehavior
Specifies how a selection should be applied.
Definition: qgis.h:777
QgsVectorLayer::LayerOptions
Setting options for loading vector layers.
Definition: qgsvectorlayer.h:408
QgsVectorLayer::diagramLayerSettings
const QgsDiagramLayerSettings * diagramLayerSettings() const
Definition: qgsvectorlayer.h:895
QgsStringMap
QMap< QString, QString > QgsStringMap
Definition: qgis.h:2781
QgsVectorLayer::DeleteContext::project
QgsProject * project
Definition: qgsvectorlayer.h:518
QgsFeatureRenderer
Definition: qgsrenderer.h:101
QgsWkbTypes::GeometryType
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Definition: qgswkbtypes.h:140
QgsVectorLayerEditPassthrough
Definition: qgsvectorlayereditpassthrough.h:35
QgsPointSequence
QVector< QgsPoint > QgsPointSequence
Definition: qgsabstractgeometry.h:52
QgsGeometry
A geometry is the spatial representation of a feature.
Definition: qgsgeometry.h:124
QgsMapToPixel
Perform transforms between map coordinates and device coordinates.
Definition: qgsmaptopixel.h:38
QgsVectorLayerEditBuffer
Definition: qgsvectorlayereditbuffer.h:37
str
#define str(x)
Definition: qgis.cpp:37
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:391
QgsMapLayer
Base class for all map layer types. This is the base class for all map layer types (vector,...
Definition: qgsmaplayer.h:72
QgsVectorLayerFeatureSource
Partial snapshot of vector layer's state (only the members necessary for access to features)
Definition: qgsvectorlayerfeatureiterator.h:52
qgsattributetableconfig.h
QgsVectorLayer::renderer
const QgsFeatureRenderer * renderer() const
Returns the feature renderer used for rendering the features in the layer in 2D map views.
Definition: qgsvectorlayer.h:912
QgsStoredExpressionManager
Manages stored expressions regarding creation, modification and storing in the project.
Definition: qgsstoredexpressionmanager.h:93
QgsRelation
Definition: qgsrelation.h:42
QgsAuxiliaryStorage
Class providing some utility methods to manage auxiliary storage.
Definition: qgsauxiliarystorage.h:291
Qgis
The Qgis class provides global constants for use throughout the application.
Definition: qgis.h:71
QgsGeometryMap
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
Definition: qgsfeature.h:877
QgsVectorDataProvider
This is the base class for vector data providers.
Definition: qgsvectordataprovider.h:58
Qgis::SelectBehavior::SetSelection
@ SetSelection
Set selection, removing any existing selection.
qgsexpressioncontextscopegenerator.h
QgsFeature
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Definition: qgsfeature.h:55
QgsVectorLayer::editBuffer
const QgsVectorLayerEditBuffer * editBuffer() const
Buffer with uncommitted editing operations.
Definition: qgsvectorlayer.h:2020
QgsActionManager
Storage and management of actions associated with a layer.
Definition: qgsactionmanager.h:52
QgsVectorLayer::getFeature
QgsFeature getFeature(QgsFeatureId fid) const
Queries the layer for the feature with the given id.
Definition: qgsvectorlayer.h:1187
QgsFieldConstraints::ConstraintStrength
ConstraintStrength
Strength of constraints.
Definition: qgsfieldconstraints.h:64
QgsVectorLayer::getFeatures
QgsFeatureIterator getFeatures(const QgsFeatureIds &fids)
Queries the layer for the features with the given ids.
Definition: qgsvectorlayer.h:1203
QgsFeatureIterator
Wrapper for iterator of features from vector data provider or vector layer.
Definition: qgsfeatureiterator.h:289
QgsVectorLayer::joinBuffer
const QgsVectorLayerJoinBuffer * joinBuffer() const
Returns a const pointer on join buffer object.
Definition: qgsvectorlayer.h:669
QgsExpressionContextGenerator
Abstract interface for generating an expression context.
Definition: qgsexpressioncontextgenerator.h:36
QgsWeakRelation
The QgsWeakRelation class represent a QgsRelation with possibly unresolved layers or unmatched fields...
Definition: qgsweakrelation.h:38
QgsFeatureSink
An interface for objects which accept features via addFeature(s) methods.
Definition: qgsfeaturesink.h:33
QgsAbstractProfileSource
Interface for classes which can generate elevation profiles.
Definition: qgsabstractprofilesource.h:33
QgsAttributeList
QList< int > QgsAttributeList
Definition: qgsvectorlayer.h:84
QgsFeatureId
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Definition: qgsfeatureid.h:28
QgsVectorLayer::actions
const QgsActionManager * actions() const
Returns all layer actions defined on this layer.
Definition: qgsvectorlayer.h:748
QgsVectorLayer::renderer
QgsFeatureRenderer * renderer()
Returns the feature renderer used for rendering the features in the layer in 2D map views.
Definition: qgsvectorlayer.h:903
QgsField
Encapsulate a field in an attribute table or data source.
Definition: qgsfield.h:50