QGIS API Documentation  3.16.0-Hannover (43b64b13f3)
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"
39 #include "qgseditformconfig.h"
41 #include "qgsaggregatecalculator.h"
42 #include "qgsfeatureiterator.h"
45 #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;
83 
84 typedef QList<int> QgsAttributeList;
85 typedef QSet<int> QgsAttributeIds;
86 
87 // TODO QGIS4: Remove virtual from non-inherited methods (like isModified)
88 
387 {
388  Q_OBJECT
389 
390  Q_PROPERTY( QString subsetString READ subsetString WRITE setSubsetString NOTIFY subsetStringChanged )
391  Q_PROPERTY( QString displayExpression READ displayExpression WRITE setDisplayExpression NOTIFY displayExpressionChanged )
392  Q_PROPERTY( QString mapTipTemplate READ mapTipTemplate WRITE setMapTipTemplate NOTIFY mapTipTemplateChanged )
393  Q_PROPERTY( QgsEditFormConfig editFormConfig READ editFormConfig WRITE setEditFormConfig NOTIFY editFormConfigChanged )
394  Q_PROPERTY( bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged )
395  Q_PROPERTY( double opacity READ opacity WRITE setOpacity NOTIFY opacityChanged )
396 
397  public:
398 
401  {
402  Success = 0,
403  EmptyGeometry = 1,
404  EditFailed = 2,
405  FetchFeatureFailed = 3,
406  InvalidLayer = 4,
407  };
408  Q_ENUM( EditResult )
409 
410 
412  {
417  };
418  Q_ENUM( SelectBehavior )
419 
420 
425  {
426 
430  explicit LayerOptions( bool loadDefaultStyle = true,
431  bool readExtentFromXml = false )
432  : loadDefaultStyle( loadDefaultStyle )
433  , readExtentFromXml( readExtentFromXml )
434  {}
435 
440  explicit LayerOptions( const QgsCoordinateTransformContext &transformContext,
441  bool loadDefaultStyle = true,
442  bool readExtentFromXml = false
443  )
444  : loadDefaultStyle( loadDefaultStyle )
445  , readExtentFromXml( readExtentFromXml )
446  , transformContext( transformContext )
447  {}
448 
450  bool loadDefaultStyle = true;
451 
456  bool readExtentFromXml = false;
457 
463 
476 
489 
503  bool skipCrsValidation = false;
504 
505  };
506 
511  struct CORE_EXPORT DeleteContext
512  {
513 
517  explicit DeleteContext( bool cascade = false, QgsProject *project = nullptr ): cascade( cascade ), project( project ) {}
518 
525  QList<QgsVectorLayer *> handledLayers( bool includeAuxiliaryLayers = true ) const;
526 
530  QgsFeatureIds handledFeatures( QgsVectorLayer *layer ) const;
531 
532  QMap<QgsVectorLayer *, QgsFeatureIds> mHandledFeatures SIP_SKIP;
533  bool cascade;
535  };
536 
550  explicit QgsVectorLayer( const QString &path = QString(), const QString &baseName = QString(),
551  const QString &providerLib = "ogr", const QgsVectorLayer::LayerOptions &options = QgsVectorLayer::LayerOptions() );
552 
553  ~QgsVectorLayer() override;
554 
556  QgsVectorLayer( const QgsVectorLayer &rhs ) = delete;
558  QgsVectorLayer &operator=( QgsVectorLayer const &rhs ) = delete;
559 
568  QgsVectorLayer *clone() const override SIP_FACTORY;
569 
574  QString storageType() const;
575 
579  QString capabilitiesString() const;
580 
584  QString dataComment() const;
585 
593  QString displayField() const;
594 
602  void setDisplayExpression( const QString &displayExpression );
603 
610  QString displayExpression() const;
611 
612  QgsVectorDataProvider *dataProvider() FINAL;
613  const QgsVectorDataProvider *dataProvider() const FINAL SIP_SKIP;
614 
618  QgsMapLayerTemporalProperties *temporalProperties() override;
619 
630  void setProviderEncoding( const QString &encoding );
631 
633  void setCoordinateSystem();
634 
640  bool addJoin( const QgsVectorLayerJoinInfo &joinInfo );
641 
646  bool removeJoin( const QString &joinLayerId );
647 
652  QgsVectorLayerJoinBuffer *joinBuffer() { return mJoinBuffer; }
653 
658  const QgsVectorLayerJoinBuffer *joinBuffer() const { return mJoinBuffer; } SIP_SKIP;
659 
660  const QList<QgsVectorLayerJoinInfo> vectorJoins() const;
661 
670  bool setDependencies( const QSet<QgsMapLayerDependency> &layers ) FINAL;
671 
679  QSet<QgsMapLayerDependency> dependencies() const FINAL;
680 
691  int addExpressionField( const QString &exp, const QgsField &fld );
692 
700  void removeExpressionField( int index );
701 
711  QString expressionField( int index ) const;
712 
722  void updateExpressionField( int index, const QString &exp );
723 
730  QgsActionManager *actions() { return mActions; }
731 
737  const QgsActionManager *actions() const SIP_SKIP { return mActions; }
738 
743  QgsVectorLayerServerProperties *serverProperties() const { return mServerProperties.get(); }
744 
750  int selectedFeatureCount() const;
751 
761  Q_INVOKABLE void selectByRect( QgsRectangle &rect, QgsVectorLayer::SelectBehavior behavior = QgsVectorLayer::SetSelection );
762 
772  Q_INVOKABLE void selectByExpression( const QString &expression, QgsVectorLayer::SelectBehavior behavior = QgsVectorLayer::SetSelection );
773 
784  Q_INVOKABLE void selectByIds( const QgsFeatureIds &ids, QgsVectorLayer::SelectBehavior behavior = QgsVectorLayer::SetSelection );
785 
797  Q_INVOKABLE void modifySelection( const QgsFeatureIds &selectIds, const QgsFeatureIds &deselectIds );
798 
800  Q_INVOKABLE void invertSelection();
801 
803  Q_INVOKABLE void selectAll();
804 
812  Q_INVOKABLE void invertSelectionInRectangle( QgsRectangle &rect );
813 
826  Q_INVOKABLE QgsFeatureList selectedFeatures() const;
827 
843  QgsFeatureIterator getSelectedFeatures( QgsFeatureRequest request = QgsFeatureRequest() ) const;
844 
852  Q_INVOKABLE const QgsFeatureIds &selectedFeatureIds() const;
853 
855  Q_INVOKABLE QgsRectangle boundingBoxOfSelected() const;
856 
864  bool labelsEnabled() const;
865 
875  void setLabelsEnabled( bool enabled );
876 
882  bool diagramsEnabled() const;
883 
885  void setDiagramRenderer( QgsDiagramRenderer *r SIP_TRANSFER );
886  const QgsDiagramRenderer *diagramRenderer() const { return mDiagramRenderer; }
887 
888  void setDiagramLayerSettings( const QgsDiagramLayerSettings &s );
889  const QgsDiagramLayerSettings *diagramLayerSettings() const { return mDiagramLayerSettings; }
890 
892  QgsFeatureRenderer *renderer() { return mRenderer; }
893 
898  const QgsFeatureRenderer *renderer() const SIP_SKIP { return mRenderer; }
899 
904  void setRenderer( QgsFeatureRenderer *r SIP_TRANSFER );
905 
907  Q_INVOKABLE QgsWkbTypes::GeometryType geometryType() const;
908 
910  Q_INVOKABLE QgsWkbTypes::Type wkbType() const FINAL;
911 
912  QgsCoordinateReferenceSystem sourceCrs() const FINAL;
913  QString sourceName() const FINAL;
914 
919  bool readXml( const QDomNode &layer_node, QgsReadWriteContext &context ) FINAL;
920 
925  bool writeXml( QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context ) const FINAL;
926 
927  QString encodedSource( const QString &source, const QgsReadWriteContext &context ) const FINAL;
928  QString decodedSource( const QString &source, const QString &provider, const QgsReadWriteContext &context ) const FINAL;
929 
934  void resolveReferences( QgsProject *project ) FINAL;
935 
944  virtual void saveStyleToDatabase( const QString &name, const QString &description,
945  bool useAsDefault, const QString &uiFileContent,
946  QString &msgError SIP_OUT );
947 
957  virtual int listStylesInDatabase( QStringList &ids SIP_OUT, QStringList &names SIP_OUT,
958  QStringList &descriptions SIP_OUT, QString &msgError SIP_OUT );
959 
963  virtual QString getStyleFromDatabase( const QString &styleId, QString &msgError SIP_OUT );
964 
972  virtual bool deleteStyleFromDatabase( const QString &styleId, QString &msgError SIP_OUT );
973 
981  virtual QString loadNamedStyle( const QString &theURI, bool &resultFlag SIP_OUT, bool loadFromLocalDb,
982  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories );
983 
988  QString loadNamedStyle( const QString &theURI, bool &resultFlag SIP_OUT,
989  QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL;
990 
1004  bool loadAuxiliaryLayer( const QgsAuxiliaryStorage &storage, const QString &key = QString() );
1005 
1015  void setAuxiliaryLayer( QgsAuxiliaryLayer *layer SIP_TRANSFER = nullptr );
1016 
1022  QgsAuxiliaryLayer *auxiliaryLayer();
1023 
1029  const QgsAuxiliaryLayer *auxiliaryLayer() const SIP_SKIP;
1030 
1039  bool readSymbology( const QDomNode &layerNode, QString &errorMessage,
1040  QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL;
1041 
1050  bool readStyle( const QDomNode &node, QString &errorMessage,
1051  QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) FINAL;
1052 
1062  bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage,
1063  const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const FINAL;
1064 
1074  bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage,
1075  const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories = QgsMapLayer::AllStyleCategories ) const FINAL;
1076 
1085  bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsStringMap &props = QgsStringMap() ) const;
1086 
1087  bool readSld( const QDomNode &node, QString &errorMessage ) FINAL;
1088 
1094  long featureCount( const QString &legendKey ) const;
1095 
1102  QgsFeatureIds symbolFeatureIds( const QString &legendKey ) const;
1103 
1114  FeatureAvailability hasFeatures() const FINAL;
1115 
1127  Q_DECL_DEPRECATED void setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, bool loadDefaultStyleFlag = false ) SIP_DEPRECATED;
1128 
1141  void setDataSource( const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, bool loadDefaultStyleFlag = false ) override;
1142 
1143  QString loadDefaultStyle( bool &resultFlag SIP_OUT ) FINAL;
1144 
1158  QgsVectorLayerFeatureCounter *countSymbolFeatures( bool storeSymbolFids = false );
1159 
1167  virtual bool setSubsetString( const QString &subset );
1168 
1173  virtual QString subsetString() const;
1174 
1180  QgsFeatureIterator getFeatures( const QgsFeatureRequest &request = QgsFeatureRequest() ) const FINAL;
1181 
1185  inline QgsFeatureIterator getFeatures( const QString &expression )
1186  {
1187  return getFeatures( QgsFeatureRequest( expression ) );
1188  }
1189 
1194  inline QgsFeature getFeature( QgsFeatureId fid ) const
1195  {
1196  QgsFeature feature;
1197  getFeatures( QgsFeatureRequest( fid ) ).nextFeature( feature );
1198  return feature;
1199  }
1200 
1205  QgsGeometry getGeometry( QgsFeatureId fid ) const;
1206 
1211  {
1212  return getFeatures( QgsFeatureRequest( fids ) );
1213  }
1214 
1218  inline QgsFeatureIterator getFeatures( const QgsRectangle &rectangle )
1219  {
1220  return getFeatures( QgsFeatureRequest( rectangle ) );
1221  }
1222 
1223  bool addFeature( QgsFeature &feature, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) FINAL;
1224 
1250  bool updateFeature( QgsFeature &feature, bool skipDefaultValues = false );
1251 
1263  bool insertVertex( double x, double y, QgsFeatureId atFeatureId, int beforeVertex );
1264 
1276  bool insertVertex( const QgsPoint &point, QgsFeatureId atFeatureId, int beforeVertex );
1277 
1288  bool moveVertex( double x, double y, QgsFeatureId atFeatureId, int atVertex );
1289 
1300  bool moveVertex( const QgsPoint &p, QgsFeatureId atFeatureId, int atVertex ) SIP_PYNAME( moveVertexV2 );
1301 
1312  EditResult deleteVertex( QgsFeatureId featureId, int vertex );
1313 
1321  Q_INVOKABLE bool deleteSelectedFeatures( int *deletedCount = nullptr, DeleteContext *context = nullptr );
1322 
1343  Q_DECL_DEPRECATED QgsGeometry::OperationResult addRing( const QVector<QgsPointXY> &ring, QgsFeatureId *featureId = nullptr ) SIP_DEPRECATED;
1344 
1345 
1365  Q_INVOKABLE QgsGeometry::OperationResult addRing( const QgsPointSequence &ring, QgsFeatureId *featureId = nullptr );
1366 
1387  Q_INVOKABLE QgsGeometry::OperationResult addRing( QgsCurve *ring SIP_TRANSFER, QgsFeatureId *featureId = nullptr ) SIP_PYNAME( addCurvedRing );
1388 
1408  Q_DECL_DEPRECATED QgsGeometry::OperationResult addPart( const QList<QgsPointXY> &ring ) SIP_DEPRECATED;
1409 
1430  Q_DECL_DEPRECATED QgsGeometry::OperationResult addPart( const QVector<QgsPointXY> &ring ) SIP_PYNAME( addPartV2 ) SIP_DEPRECATED;
1431 
1451  Q_INVOKABLE QgsGeometry::OperationResult addPart( const QgsPointSequence &ring ) SIP_PYNAME( addPartV2 );
1452 
1460  Q_INVOKABLE QgsGeometry::OperationResult addPart( QgsCurve *ring SIP_TRANSFER ) SIP_PYNAME( addCurvedPart );
1461 
1473  Q_INVOKABLE int translateFeature( QgsFeatureId featureId, double dx, double dy );
1474 
1495  Q_DECL_DEPRECATED QgsGeometry::OperationResult splitParts( const QVector<QgsPointXY> &splitLine, bool topologicalEditing = false ) SIP_DEPRECATED;
1496 
1516  Q_INVOKABLE QgsGeometry::OperationResult splitParts( const QgsPointSequence &splitLine, bool topologicalEditing = false );
1517 
1538  Q_DECL_DEPRECATED QgsGeometry::OperationResult splitFeatures( const QVector<QgsPointXY> &splitLine, bool topologicalEditing = false ) SIP_DEPRECATED;
1539 
1559  Q_INVOKABLE QgsGeometry::OperationResult splitFeatures( const QgsPointSequence &splitLine, bool topologicalEditing = false );
1560 
1583  Q_INVOKABLE QgsGeometry::OperationResult splitFeatures( const QgsCurve *curve, QgsPointSequence &topologyTestPoints SIP_OUT, bool preserveCircular = false, bool topologicalEditing = false );
1584 
1595  int addTopologicalPoints( const QgsGeometry &geom );
1596 
1610  Q_DECL_DEPRECATED int addTopologicalPoints( const QgsPointXY &p ) SIP_DEPRECATED;
1611 
1625  int addTopologicalPoints( const QgsPoint &p );
1626 
1640  int addTopologicalPoints( const QgsPointSequence &ps );
1641 
1648  const QgsAbstractVectorLayerLabeling *labeling() const SIP_SKIP { return mLabeling; }
1649 
1656  QgsAbstractVectorLayerLabeling *labeling() { return mLabeling; }
1657 
1662  void setLabeling( QgsAbstractVectorLayerLabeling *labeling SIP_TRANSFER );
1663 
1665  bool isEditable() const FINAL;
1666 
1668  bool isSpatial() const FINAL;
1669 
1671  virtual bool isModified() const;
1672 
1679  bool isAuxiliaryField( int index, int &srcIndex ) const;
1680 
1682  void reload() FINAL;
1683 
1688  QgsMapLayerRenderer *createMapRenderer( QgsRenderContext &rendererContext ) FINAL SIP_FACTORY;
1689 
1690  QgsRectangle extent() const FINAL;
1691  QgsRectangle sourceExtent() const FINAL;
1692 
1699  QgsFields fields() const FINAL;
1700 
1704  inline QgsAttributeList attributeList() const { return mFields.allAttributesList(); }
1705 
1709  QgsAttributeList primaryKeyAttributes() const;
1710 
1716  long featureCount() const FINAL;
1717 
1722  bool setReadOnly( bool readonly = true );
1723 
1744  bool changeGeometry( QgsFeatureId fid, QgsGeometry &geometry, bool skipDefaultValue = false );
1745 
1776  bool changeAttributeValue( QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue = QVariant(), bool skipDefaultValues = false );
1777 
1813  bool changeAttributeValues( QgsFeatureId fid, const QgsAttributeMap &newValues, const QgsAttributeMap &oldValues = QgsAttributeMap(), bool skipDefaultValues = false );
1814 
1824  bool addAttribute( const QgsField &field );
1825 
1831  void setFieldAlias( int index, const QString &aliasString );
1832 
1838  void removeFieldAlias( int index );
1839 
1850  bool renameAttribute( int index, const QString &newName );
1851 
1858  QString attributeAlias( int index ) const;
1859 
1861  QString attributeDisplayName( int index ) const;
1862 
1864  QgsStringMap attributeAliases() const;
1865 
1870  Q_DECL_DEPRECATED QSet<QString> excludeAttributesWms() const SIP_DEPRECATED { return mExcludeAttributesWMS; }
1871 
1876  Q_DECL_DEPRECATED void setExcludeAttributesWms( const QSet<QString> &att ) SIP_DEPRECATED { mExcludeAttributesWMS = att; }
1877 
1882  Q_DECL_DEPRECATED QSet<QString> excludeAttributesWfs() const SIP_DEPRECATED { return mExcludeAttributesWFS; }
1883 
1888  Q_DECL_DEPRECATED void setExcludeAttributesWfs( const QSet<QString> &att ) SIP_DEPRECATED { mExcludeAttributesWFS = att; }
1889 
1898  virtual bool deleteAttribute( int attr );
1899 
1907  bool deleteAttributes( const QList<int> &attrs );
1908 
1909  bool addFeatures( QgsFeatureList &features, QgsFeatureSink::Flags flags = QgsFeatureSink::Flags() ) FINAL;
1910 
1921  bool deleteFeature( QgsFeatureId fid, DeleteContext *context = nullptr );
1922 
1936  bool deleteFeatures( const QgsFeatureIds &fids, DeleteContext *context = nullptr );
1937 
1961  Q_INVOKABLE bool commitChanges( bool stopEditing = true );
1962 
1968  QStringList commitErrors() const;
1969 
1979  Q_INVOKABLE bool rollBack( bool deleteBuffer = true );
1980 
1987  QList<QgsRelation> referencingRelations( int idx ) const;
1988 
1995  QList<QgsWeakRelation> weakRelations( ) const SIP_SKIP;
1996 
1997 
1999  Q_INVOKABLE QgsVectorLayerEditBuffer *editBuffer() { return mEditBuffer; }
2000 
2005  const QgsVectorLayerEditBuffer *editBuffer() const SIP_SKIP { return mEditBuffer; }
2006 
2011  void beginEditCommand( const QString &text );
2012 
2014  void endEditCommand();
2015 
2017  void destroyEditCommand();
2018 
2021  {
2024  NoMarker
2025  };
2026 
2031  Q_DECL_DEPRECATED static void drawVertexMarker( double x, double y, QPainter &p, QgsVectorLayer::VertexMarkerType type, int vertexSize );
2032 
2041  void updateFields();
2042 
2057  QVariant defaultValue( int index, const QgsFeature &feature = QgsFeature(),
2058  QgsExpressionContext *context = nullptr ) const;
2059 
2071  void setDefaultValueDefinition( int index, const QgsDefaultValue &definition );
2072 
2083  QgsDefaultValue defaultValueDefinition( int index ) const;
2084 
2092  QgsFieldConstraints::Constraints fieldConstraints( int fieldIndex ) const;
2093 
2099  QMap< QgsFieldConstraints::Constraint, QgsFieldConstraints::ConstraintStrength> fieldConstraintsAndStrength( int fieldIndex ) const;
2100 
2110 
2118  void removeFieldConstraint( int index, QgsFieldConstraints::Constraint constraint );
2119 
2127  QString constraintExpression( int index ) const;
2128 
2136  QString constraintDescription( int index ) const;
2137 
2146  void setConstraintExpression( int index, const QString &expression, const QString &description = QString() );
2147 
2153  void setFieldConfigurationFlags( int index, QgsField::ConfigurationFlags flags ) SIP_SKIP;
2154 
2159  void setFieldConfigurationFlag( int index, QgsField::ConfigurationFlag flag, bool active ) SIP_SKIP;
2160 
2166  QgsField::ConfigurationFlags fieldConfigurationFlags( int index ) const SIP_SKIP;
2167 
2171  void setEditorWidgetSetup( int index, const QgsEditorWidgetSetup &setup );
2172 
2179  QgsEditorWidgetSetup editorWidgetSetup( int index ) const;
2180 
2192  QSet<QVariant> uniqueValues( int fieldIndex, int limit = -1 ) const FINAL;
2193 
2207  QStringList uniqueStringsMatching( int index, const QString &substring, int limit = -1,
2208  QgsFeedback *feedback = nullptr ) const;
2209 
2218  QVariant minimumValue( int index ) const FINAL;
2219 
2228  QVariant maximumValue( int index ) const FINAL;
2229 
2242  QVariant aggregate( QgsAggregateCalculator::Aggregate aggregate,
2243  const QString &fieldOrExpression,
2244  const QgsAggregateCalculator::AggregateParameters &parameters = QgsAggregateCalculator::AggregateParameters(),
2245  QgsExpressionContext *context = nullptr,
2246  bool *ok = nullptr,
2247  QgsFeatureIds *fids = nullptr ) const;
2248 
2250  void setFeatureBlendMode( QPainter::CompositionMode blendMode );
2252  QPainter::CompositionMode featureBlendMode() const;
2253 
2261  void setOpacity( double opacity );
2262 
2270  double opacity() const;
2271 
2272  QString htmlMetadata() const FINAL;
2273 
2278  void setSimplifyMethod( const QgsVectorSimplifyMethod &simplifyMethod ) { mSimplifyMethod = simplifyMethod; }
2279 
2284  inline const QgsVectorSimplifyMethod &simplifyMethod() const { return mSimplifyMethod; }
2285 
2291  bool simplifyDrawingCanbeApplied( const QgsRenderContext &renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint ) const;
2292 
2300  QgsConditionalLayerStyles *conditionalStyles() const;
2301 
2306  QgsAttributeTableConfig attributeTableConfig() const;
2307 
2312  void setAttributeTableConfig( const QgsAttributeTableConfig &attributeTableConfig );
2313 
2321  QString mapTipTemplate() const;
2322 
2330  void setMapTipTemplate( const QString &mapTipTemplate );
2331 
2332  QgsExpressionContext createExpressionContext() const FINAL;
2333 
2334  QgsExpressionContextScope *createExpressionContextScope() const FINAL SIP_FACTORY;
2335 
2343  QgsEditFormConfig editFormConfig() const;
2344 
2351  void setEditFormConfig( const QgsEditFormConfig &editFormConfig );
2352 
2360  void setReadExtentFromXml( bool readExtentFromXml );
2361 
2369  bool readExtentFromXml() const;
2370 
2376  bool isEditCommandActive() const { return mEditCommandActive; }
2377 
2383  QgsGeometryOptions *geometryOptions() const;
2384 
2402  bool allowCommit() const SIP_SKIP;
2403 
2421  void setAllowCommit( bool allowCommit ) SIP_SKIP;
2422 
2428  QgsStoredExpressionManager *storedExpressionManager() { return mStoredExpressionManager; }
2429 
2430  public slots:
2431 
2439  void select( QgsFeatureId featureId );
2440 
2448  Q_INVOKABLE void select( const QgsFeatureIds &featureIds );
2449 
2457  void deselect( QgsFeatureId featureId );
2458 
2466  Q_INVOKABLE void deselect( const QgsFeatureIds &featureIds );
2467 
2474  Q_INVOKABLE void removeSelection();
2475 
2486  void reselect();
2487 
2494  virtual void updateExtents( bool force = false );
2495 
2510  Q_INVOKABLE bool startEditing();
2511 
2517  virtual void setTransformContext( const QgsCoordinateTransformContext &transformContext ) override;
2518 
2519  SpatialIndexPresence hasSpatialIndex() const override;
2520 
2521  bool accept( QgsStyleEntityVisitorInterface *visitor ) const override;
2522 
2523  signals:
2524 
2532  void selectionChanged( const QgsFeatureIds &selected, const QgsFeatureIds &deselected, bool clearAndSelect );
2533 
2536 
2543 
2545  void beforeModifiedCheck() const;
2546 
2549 
2552 
2555 
2561  void beforeCommitChanges( bool stopEditing );
2562 
2565 
2571 
2577 
2586  void attributeAdded( int idx );
2587 
2594  void beforeAddingExpressionField( const QString &fieldName );
2595 
2604  void attributeDeleted( int idx );
2605 
2613 
2620 
2630 
2640  void featuresDeleted( const QgsFeatureIds &fids );
2641 
2647 
2653 
2662  void attributeValueChanged( QgsFeatureId fid, int idx, const QVariant &value );
2663 
2671  void geometryChanged( QgsFeatureId fid, const QgsGeometry &geometry );
2672 
2674  void committedAttributesDeleted( const QString &layerId, const QgsAttributeList &deletedAttributes );
2676  void committedAttributesAdded( const QString &layerId, const QList<QgsField> &addedAttributes );
2678  void committedFeaturesAdded( const QString &layerId, const QgsFeatureList &addedFeatures );
2680  void committedFeaturesRemoved( const QString &layerId, const QgsFeatureIds &deletedFeatureIds );
2682  void committedAttributeValuesChanges( const QString &layerId, const QgsChangedAttributesMap &changedAttributesValues );
2684  void committedGeometriesChanges( const QString &layerId, const QgsGeometryMap &changedGeometries );
2685 
2687  void labelingFontNotFound( QgsVectorLayer *layer, const QString &fontfamily );
2688 
2690  void featureBlendModeChanged( QPainter::CompositionMode blendMode );
2691 
2699  void opacityChanged( double opacity );
2700 
2706  void editCommandStarted( const QString &text );
2707 
2714 
2721 
2731  void readCustomSymbology( const QDomElement &element, QString &errorMessage );
2732 
2742  void writeCustomSymbology( QDomElement &element, QDomDocument &doc, QString &errorMessage ) const;
2743 
2750 
2757 
2761  void raiseError( const QString &msg );
2762 
2769 
2777 
2784 
2785  protected:
2787  void setExtent( const QgsRectangle &rect ) FINAL;
2788 
2789  private slots:
2790  void invalidateSymbolCountedFlag();
2791  void onFeatureCounterCompleted();
2792  void onFeatureCounterTerminated();
2793  void onJoinedFieldsChanged();
2794  void onFeatureDeleted( QgsFeatureId fid );
2795  void onRelationsLoaded();
2796  void onSymbolsCounted();
2797  void onDirtyTransaction( const QString &sql, const QString &name );
2798  void emitDataChanged();
2799  void onAfterCommitChangesDependency();
2800 
2801  private:
2802  void updateDefaultValues( QgsFeatureId fid, QgsFeature feature = QgsFeature() );
2803 
2807  bool isReadOnly() const FINAL;
2808 
2815  bool setDataProvider( QString const &provider, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags = QgsDataProvider::ReadFlags() );
2816 
2818  void readSldLabeling( const QDomNode &node );
2819 
2821  bool readSldTextSymbolizer( const QDomNode &node, QgsPalLayerSettings &settings ) const;
2822 
2824  QgsAbstractVectorLayerLabeling *readLabelingFromCustomProperties();
2825 
2826  bool deleteFeatureCascade( QgsFeatureId fid, DeleteContext *context = nullptr );
2827 
2828 #ifdef SIP_RUN
2829  QgsVectorLayer( const QgsVectorLayer &rhs );
2830 #endif
2831  QVariant minimumOrMaximumValue( int index, bool minimum ) const;
2833 
2834  private: // Private attributes
2835  QgsConditionalLayerStyles *mConditionalStyles = nullptr;
2836 
2838  QgsVectorDataProvider *mDataProvider = nullptr;
2839 
2841  QgsVectorLayerTemporalProperties *mTemporalProperties = nullptr;
2842 
2844  QString mDisplayExpression;
2845 
2846  QString mMapTipTemplate;
2847 
2849  QgsActionManager *mActions = nullptr;
2850 
2852  bool mReadOnly = false;
2853 
2859  QgsFeatureIds mSelectedFeatureIds;
2860 
2864  QgsFeatureIds mPreviousSelectedFeatureIds;
2865 
2867  QgsFields mFields;
2868 
2870  QgsStringMap mAttributeAliasMap;
2871 
2873  QMap<QString, QgsDefaultValue> mDefaultExpressionMap;
2874 
2876  QSet<int> mDefaultValueOnUpdateFields;
2877 
2879  QMap< QString, QgsFieldConstraints::Constraints > mFieldConstraints;
2880 
2882  QMap< QPair< QString, QgsFieldConstraints::Constraint >, QgsFieldConstraints::ConstraintStrength > mFieldConstraintStrength;
2883 
2885  QMap< QString, QPair< QString, QString > > mFieldConstraintExpressions;
2886 
2887  QMap< QString, QgsField::ConfigurationFlags > mFieldConfigurationFlags;
2888  QMap< QString, QgsEditorWidgetSetup > mFieldWidgetSetups;
2889 
2891  QgsEditFormConfig mEditFormConfig;
2892 
2894  QSet<QString> mExcludeAttributesWMS;
2895 
2897  QSet<QString> mExcludeAttributesWFS;
2898 
2901 
2903  QgsFeatureRenderer *mRenderer = nullptr;
2904 
2906  QgsVectorSimplifyMethod mSimplifyMethod;
2907 
2909  QgsAbstractVectorLayerLabeling *mLabeling = nullptr;
2910 
2912  bool mLabelsEnabled = false;
2913 
2915  bool mLabelFontNotFoundNotified = false;
2916 
2918  QPainter::CompositionMode mFeatureBlendMode = QPainter::CompositionMode_SourceOver;
2919 
2921  double mLayerOpacity = 1.0;
2922 
2924  bool mVertexMarkerOnlyForSelection = false;
2925 
2926  QStringList mCommitErrors;
2927 
2929  QgsVectorLayerEditBuffer *mEditBuffer = nullptr;
2932 
2933  //stores information about joined layers
2934  QgsVectorLayerJoinBuffer *mJoinBuffer = nullptr;
2935 
2937  std::unique_ptr< QgsVectorLayerServerProperties > mServerProperties;
2938 
2940  QgsExpressionFieldBuffer *mExpressionFieldBuffer = nullptr;
2941 
2942  //diagram rendering object. 0 if diagram drawing is disabled
2943  QgsDiagramRenderer *mDiagramRenderer = nullptr;
2944 
2945  //stores infos about diagram placement (placement type, priority, position distance)
2946  QgsDiagramLayerSettings *mDiagramLayerSettings = nullptr;
2947 
2948  mutable bool mValidExtent = false;
2949  mutable bool mLazyExtent = true;
2950 
2952  std::unique_ptr<QgsAuxiliaryLayer> mAuxiliaryLayer;
2953 
2955  QString mAuxiliaryLayerKey;
2956 
2957  // Features in renderer classes counted
2958  bool mSymbolFeatureCounted = false;
2959 
2960  // Feature counts for each renderer legend key
2961  QHash<QString, long> mSymbolFeatureCountMap;
2962  QHash<QString, QgsFeatureIds> mSymbolFeatureIdMap;
2963 
2965  bool mEditCommandActive = false;
2966 
2967  bool mReadExtentFromXml;
2968  QgsRectangle mXmlExtent;
2969 
2970  QgsFeatureIds mDeletedFids;
2971 
2972  QgsAttributeTableConfig mAttributeTableConfig;
2973 
2974  mutable QMutex mFeatureSourceConstructorMutex;
2975 
2976  QgsVectorLayerFeatureCounter *mFeatureCounter = nullptr;
2977 
2978  std::unique_ptr<QgsGeometryOptions> mGeometryOptions;
2979 
2980  bool mAllowCommit = true;
2981 
2983  QgsStoredExpressionManager *mStoredExpressionManager = nullptr;
2984 
2986 
2988  bool mDataChangedFired = false;
2989 
2990  QList<QgsWeakRelation> mWeakRelations;
2991 
2992  bool mSetLegendFromStyle = false;
2993 };
2994 
2995 
2996 
2997 // clazy:excludeall=qstring-allocations
2998 
2999 #endif
QgsCurve
Abstract base class for curved geometry type.
Definition: qgscurve.h:36
QgsVectorLayerFeatureCounter
Counts the features in a QgsVectorLayer in task.
Definition: qgsvectorlayerfeaturecounter.h:34
QgsVectorLayer::VertexMarkerType
VertexMarkerType
Editing vertex markers.
Definition: qgsvectorlayer.h:2021
QgsExpressionContext
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Definition: qgsexpressioncontext.h:370
QgsVectorLayer::beforeRemovingExpressionField
void beforeRemovingExpressionField(int idx)
Will be emitted, when an expression field is going to be deleted from this vector layer.
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:30
QgsAggregateCalculator
Utility class for calculating aggregates for a field (or expression) over the features from a vector ...
Definition: qgsaggregatecalculator.h:45
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:58
qgsfeaturerequest.h
QgsDefaultValue
The QgsDefaultValue class provides a container for managing client side default values for fields.
Definition: qgsdefaultvalue.h:49
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition: qgsreadwritecontext.h:35
QgsDataProvider
Abstract base class for spatial data provider implementations.
Definition: qgsdataprovider.h:42
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:29
QgsVectorLayer::featuresDeleted
void featuresDeleted(const QgsFeatureIds &fids)
Emitted when features have been deleted.
QgsField::ConfigurationFlag
ConfigurationFlag
Configuration flags for fields These flags are meant to be user-configurable and are not describing a...
Definition: qgsfield.h:82
QgsVectorLayer::layerModified
void layerModified()
Emitted when modifications has been done on layer.
QgsPoint
Point geometry type, with support for z-dimension and m-values.
Definition: qgspoint.h:38
QgsVectorLayer::LayerOptions::LayerOptions
LayerOptions(bool loadDefaultStyle=true, bool readExtentFromXml=false)
Constructor for LayerOptions.
Definition: qgsvectorlayer.h:430
QgsVectorLayer::DeleteContext::cascade
bool cascade
Definition: qgsvectorlayer.h:533
QgsVectorLayer::committedAttributesAdded
void committedAttributesAdded(const QString &layerId, const QList< QgsField > &addedAttributes)
Emitted when attributes are added to the provider.
QgsPalLayerSettings
Definition: qgspallabeling.h:207
QgsVectorLayer::RemoveFromSelection
@ RemoveFromSelection
Remove from current selection.
Definition: qgsvectorlayer.h:416
SIP_OUT
#define SIP_OUT
Definition: qgis_sip.h:58
QgsVectorLayer::beforeRollBack
void beforeRollBack()
Emitted before changes are rolled back.
QgsVectorSimplifyMethod::SimplifyHint
SimplifyHint
Simplification flags for fast rendering of features.
Definition: qgsvectorsimplifymethod.h:38
QgsVectorLayer::DeleteContext
Context for cascade delete features.
Definition: qgsvectorlayer.h:512
QgsVectorLayer::beforeEditingStarted
void beforeEditingStarted()
Emitted before editing on this layer is started.
qgsfeatureiterator.h
QgsFields
Container of fields for a vector layer.
Definition: qgsfields.h:45
QgsVectorLayerServerProperties
Manages QGIS Server properties for a vector layer.
Definition: qgsvectorlayerserverproperties.h:39
QgsVectorLayer::getFeatures
QgsFeatureIterator getFeatures(const QgsRectangle &rectangle)
Queries the layer for the features which intersect the specified rectangle.
Definition: qgsvectorlayer.h:1218
QgsVectorLayer::opacityChanged
void opacityChanged(double opacity)
Emitted when the layer's opacity is changed, where opacity is a value between 0 (transparent) and 1 (...
qgsfeature.h
QgsVectorLayer::attributeDeleted
void attributeDeleted(int idx)
Will be emitted, when an attribute has been deleted from this vector layer.
QgsFeatureSource
An interface for objects which provide features via a getFeatures method.
Definition: qgsfeaturesource.h:38
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:58
QgsVectorLayer::beforeCommitChanges
void beforeCommitChanges(bool stopEditing)
Emitted before changes are committed to the data provider.
QgsStyleEntityVisitorInterface
An interface for classes which can visit style entity (e.g.
Definition: qgsstyleentityvisitor.h:34
QgsSingleSymbolRenderer
Definition: qgssinglesymbolrenderer.h:30
QgsWkbTypes::Type
Type
The WKB type describes the number of dimensions a geometry has.
Definition: qgswkbtypes.h:70
QgsVectorLayer::allowCommitChanged
void allowCommitChanged()
Emitted whenever the allowCommitChanged() property of this layer changes.
QgsExpressionContextScopeGenerator
Abstract interface for generating an expression context scope.
Definition: qgsexpressioncontextscopegenerator.h:29
QgsVectorLayer::featureDeleted
void featureDeleted(QgsFeatureId fid)
Emitted when a feature has been deleted.
QgsVectorLayer::setExcludeAttributesWfs
Q_DECL_DEPRECATED void setExcludeAttributesWfs(const QSet< QString > &att)
A set of attributes that are not advertised in WFS requests with QGIS server.
Definition: qgsvectorlayer.h:1888
QgsChangedAttributesMap
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
Definition: qgsfeature.h:569
QgsVectorLayer::subsetStringChanged
void subsetStringChanged()
Emitted when the layer's subset string has changed.
QgsSymbol
Abstract base class for all rendered symbols.
Definition: qgssymbol.h:64
field
const QgsField & field
Definition: qgsfield.h:456
QgsVectorLayer::diagramRenderer
const QgsDiagramRenderer * diagramRenderer() const
Definition: qgsvectorlayer.h:886
QgsFieldConstraints::Constraint
Constraint
Constraints which may be present on a field.
Definition: qgsfieldconstraints.h:44
QgsVectorLayer::editFormConfigChanged
void editFormConfigChanged()
Will be emitted whenever the edit form configuration of this layer changes.
QgsConditionalLayerStyles
The QgsConditionalLayerStyles class holds conditional style information for a layer.
Definition: qgsconditionalstyle.h:39
FINAL
#define FINAL
Definition: qgis_sip.h:228
QgsVectorLayer::afterCommitChanges
void afterCommitChanges()
Emitted after changes are committed to the data provider.
QgsAttributeList
QList< int > QgsAttributeList
Definition: qgsfield.h:26
QgsRectangle
A rectangle specified with double values.
Definition: qgsrectangle.h:42
QgsVectorLayer::committedFeaturesAdded
void committedFeaturesAdded(const QString &layerId, const QgsFeatureList &addedFeatures)
Emitted when features are added to the provider.
QgsEditorWidgetWrapper
Manages an editor widget Widget and wrapper share the same parent.
Definition: qgseditorwidgetwrapper.h:48
QgsProject
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
Definition: qgsproject.h:95
QgsVectorLayer::LayerOptions::fallbackCrs
QgsCoordinateReferenceSystem fallbackCrs
Fallback layer coordinate reference system.
Definition: qgsvectorlayer.h:488
QgsMapLayerRenderer
Base class for utility classes that encapsulate information necessary for rendering of map layers.
Definition: qgsmaplayerrenderer.h:51
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:517
QgsAttributeTableConfig
This is a container for configuration of the attribute table.
Definition: qgsattributetableconfig.h:37
QgsVectorLayer::setExcludeAttributesWms
Q_DECL_DEPRECATED void setExcludeAttributesWms(const QSet< QString > &att)
A set of attributes that are not advertised in WMS requests with QGIS server.
Definition: qgsvectorlayer.h:1876
QgsFeatureRequest
This class wraps a request for features to a vector layer (or directly its vector data provider).
Definition: qgsfeaturerequest.h:76
QgsVectorLayer::editingStarted
void editingStarted()
Emitted when editing on this layer has started.
QgsVectorLayer::featureBlendModeChanged
void featureBlendModeChanged(QPainter::CompositionMode blendMode)
Signal emitted when setFeatureBlendMode() is called.
qgsexpressioncontext.h
SIP_SKIP
#define SIP_SKIP
Definition: qgis_sip.h:126
QgsVectorLayer::labeling
QgsAbstractVectorLayerLabeling * labeling()
Access to labeling configuration.
Definition: qgsvectorlayer.h:1656
QgsVectorLayer::AddToSelection
@ AddToSelection
Add selection to current selection.
Definition: qgsvectorlayer.h:414
QgsVectorLayer::committedAttributeValuesChanges
void committedAttributeValuesChanges(const QString &layerId, const QgsChangedAttributesMap &changedAttributesValues)
Emitted when attribute value changes are saved to the provider.
QgsVectorLayer::LayerOptions::LayerOptions
LayerOptions(const QgsCoordinateTransformContext &transformContext, bool loadDefaultStyle=true, bool readExtentFromXml=false)
Constructor for LayerOptions.
Definition: qgsvectorlayer.h:440
QgsWkbTypes::Unknown
@ Unknown
Definition: qgswkbtypes.h:71
QgsVectorLayer::writeCustomSymbology
void writeCustomSymbology(QDomElement &element, QDomDocument &doc, QString &errorMessage) const
Signal emitted whenever the symbology (QML-file) for this layer is being written.
QgsVectorLayer::selectionChanged
void selectionChanged(const QgsFeatureIds &selected, const QgsFeatureIds &deselected, bool clearAndSelect)
Emitted when selection was changed.
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:33
QgsVectorLayer::readOnlyChanged
void readOnlyChanged()
Emitted when the read only state of this layer is changed.
qgsmaplayer.h
QgsVectorLayer::attributeValueChanged
void attributeValueChanged(QgsFeatureId fid, int idx, const QVariant &value)
Emitted whenever an attribute value change is done in the edit buffer.
QgsVectorLayerJoinBuffer
Manages joined fields for a vector layer.
Definition: qgsvectorlayerjoinbuffer.h:38
QgsVectorLayer::afterRollBack
void afterRollBack()
Emitted after changes are rolled back.
SIP_TRANSFER
#define SIP_TRANSFER
Definition: qgis_sip.h:36
qgsfeaturesource.h
qgsvectordataprovider.h
QgsFeatureList
QList< QgsFeature > QgsFeatureList
Definition: qgsfeature.h:583
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
QgsVectorLayerTemporalProperties
Implementation of map layer temporal properties for vector layers.
Definition: qgsvectorlayertemporalproperties.h:71
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:43
QgsVectorLayerJoinInfo
Defines left outer join from our vector layer to some other vector layer.
Definition: qgsvectorlayerjoininfo.h:34
QgsExpressionFieldBuffer
Buffers information about expression fields for a vector layer.
Definition: qgsexpressionfieldbuffer.h:36
QgsFieldConstraints::ConstraintStrengthHard
@ ConstraintStrengthHard
Constraint must be honored before feature can be accepted.
Definition: qgsfieldconstraints.h:67
QgsVectorLayer::excludeAttributesWfs
Q_DECL_DEPRECATED QSet< QString > excludeAttributesWfs() const
A set of attributes that are not advertised in WFS requests with QGIS server.
Definition: qgsvectorlayer.h:1882
QgsVectorLayer::SelectBehavior
SelectBehavior
Selection behavior.
Definition: qgsvectorlayer.h:412
QgsVectorLayer::mapTipTemplateChanged
void mapTipTemplateChanged()
Emitted when the map tip changes.
QgsFeatureIds
QSet< QgsFeatureId > QgsFeatureIds
Definition: qgsfeatureid.h:37
QgsEditFormConfig
Definition: qgseditformconfig.h:38
QgsCoordinateReferenceSystem
This class represents a coordinate reference system (CRS).
Definition: qgscoordinatereferencesystem.h:206
QgsAbstractVectorLayerLabeling
Abstract base class - its implementations define different approaches to the labeling of a vector lay...
Definition: qgsvectorlayerlabeling.h:42
QgsExpressionContextScope
Single scope for storing variables and functions for use within a QgsExpressionContext.
Definition: qgsexpressioncontext.h:112
QgsVectorLayer::raiseError
void raiseError(const QString &msg)
Signals an error related to this vector layer.
QgsVectorLayer::simplifyMethod
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings for fast rendering of features.
Definition: qgsvectorlayer.h:2284
QgsVectorLayer::operator=
QgsVectorLayer & operator=(QgsVectorLayer const &rhs)=delete
QgsVectorLayer cannot be copied.
qgsexpressioncontextgenerator.h
QgsAttributeIds
QSet< int > QgsAttributeIds
Definition: qgsvectorlayer.h:85
QgsPointXY
A class to represent a 2D point.
Definition: qgspointxy.h:44
QgsVectorLayer::beforeAddingExpressionField
void beforeAddingExpressionField(const QString &fieldName)
Will be emitted, when an expression field is going to be added to this vector layer.
qgseditformconfig.h
QgsVectorLayer::SetSelection
@ SetSelection
Set selection, removing any existing selection.
Definition: qgsvectorlayer.h:413
QgsVectorLayer::LayerOptions
Setting options for loading vector layers.
Definition: qgsvectorlayer.h:425
QgsVectorLayer::diagramLayerSettings
const QgsDiagramLayerSettings * diagramLayerSettings() const
Definition: qgsvectorlayer.h:889
QgsVectorLayer::serverProperties
QgsVectorLayerServerProperties * serverProperties() const
Returns QGIS Server Properties of the vector layer.
Definition: qgsvectorlayer.h:743
QgsVectorLayer::displayExpressionChanged
void displayExpressionChanged()
Emitted when the display expression changes.
QgsVectorLayer::editCommandDestroyed
void editCommandDestroyed()
Signal emitted, when an edit command is destroyed.
QgsStringMap
QMap< QString, QString > QgsStringMap
Definition: qgis.h:758
QgsVectorLayer::editingStopped
void editingStopped()
Emitted when edited changes have been successfully written to the data provider.
QgsVectorLayer::DeleteContext::project
QgsProject * project
Definition: qgsvectorlayer.h:534
QgsFeatureRenderer
Definition: qgsrenderer.h:103
QgsWkbTypes::GeometryType
GeometryType
The geometry types are used to group QgsWkbTypes::Type in a coarse way.
Definition: qgswkbtypes.h:141
QgsVectorLayerEditPassthrough
Definition: qgsvectorlayereditpassthrough.h:36
QgsVectorLayer::IntersectSelection
@ IntersectSelection
Modify current selection to include only select features which match.
Definition: qgsvectorlayer.h:415
QgsPointSequence
QVector< QgsPoint > QgsPointSequence
Definition: qgsabstractgeometry.h:46
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
QgsVectorLayer
Represents a vector layer which manages a vector based data sets.
Definition: qgsvectorlayer.h:387
QgsVectorLayer::committedAttributesDeleted
void committedAttributesDeleted(const QString &layerId, const QgsAttributeList &deletedAttributes)
Emitted when attributes are deleted from the provider.
QgsVectorLayer::geometryChanged
void geometryChanged(QgsFeatureId fid, const QgsGeometry &geometry)
Emitted whenever a geometry change is done in the edit buffer.
QgsMapLayer
Base class for all map layer types.
Definition: qgsmaplayer.h:83
QgsVectorLayer::editCommandStarted
void editCommandStarted(const QString &text)
Signal emitted when a new edit command has been started.
QgsVectorLayerFeatureSource
Partial snapshot of vector layer's state (only the members necessary for access to features)
Definition: qgsvectorlayerfeatureiterator.h:52
QgsVectorLayer::QgsVectorLayer
QgsVectorLayer(const QgsVectorLayer &rhs)=delete
QgsVectorLayer cannot be copied.
qgsattributetableconfig.h
QgsVectorLayer::renderer
const QgsFeatureRenderer * renderer() const
Returns const renderer.
Definition: qgsvectorlayer.h:898
QgsStoredExpressionManager
Manages stored expressions regarding creation, modification and storing in the project.
Definition: qgsstoredexpressionmanager.h:94
QgsVectorLayer::SemiTransparentCircle
@ SemiTransparentCircle
Definition: qgsvectorlayer.h:2022
QgsVectorLayer::labelingFontNotFound
void labelingFontNotFound(QgsVectorLayer *layer, const QString &fontfamily)
Emitted when the font family defined for labeling layer is not found on system.
QgsVectorLayer::symbolFeatureCountMapChanged
void symbolFeatureCountMapChanged()
Emitted when the feature count for symbols on this layer has been recalculated.
QgsVectorLayer::beforeModifiedCheck
void beforeModifiedCheck() const
Emitted when the layer is checked for modifications. Use for last-minute additions.
QgsRelation
Definition: qgsrelation.h:42
QgsAuxiliaryStorage
Class providing some utility methods to manage auxiliary storage.
Definition: qgsauxiliarystorage.h:260
QgsVectorLayer::Cross
@ Cross
Definition: qgsvectorlayer.h:2023
QgsGeometryMap
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
Definition: qgsfeature.h:578
QgsVectorDataProvider
This is the base class for vector data providers.
Definition: qgsvectordataprovider.h:59
qgsexpressioncontextscopegenerator.h
QgsFeature
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
Definition: qgsfeature.h:56
QgsVectorLayer::editBuffer
const QgsVectorLayerEditBuffer * editBuffer() const
Buffer with uncommitted editing operations.
Definition: qgsvectorlayer.h:2005
QgsActionManager
Storage and management of actions associated with a layer.
Definition: qgsactionmanager.h:52
QgsVectorLayer::updatedFields
void updatedFields()
Emitted whenever the fields available from this layer have been changed.
QgsVectorLayer::getFeature
QgsFeature getFeature(QgsFeatureId fid) const
Queries the layer for the feature with the given id.
Definition: qgsvectorlayer.h:1194
QgsVectorLayer::attributeAdded
void attributeAdded(int idx)
Will be emitted, when a new attribute has been added to this vector layer.
QgsVectorLayer::EditResult
EditResult
Result of an edit operation.
Definition: qgsvectorlayer.h:401
QgsFieldConstraints::ConstraintStrength
ConstraintStrength
Strength of constraints.
Definition: qgsfieldconstraints.h:65
QgsVectorLayer::getFeatures
QgsFeatureIterator getFeatures(const QgsFeatureIds &fids)
Queries the layer for the features with the given ids.
Definition: qgsvectorlayer.h:1210
QgsFeatureIterator
Wrapper for iterator of features from vector data provider or vector layer.
Definition: qgsfeatureiterator.h:265
QgsVectorLayer::joinBuffer
const QgsVectorLayerJoinBuffer * joinBuffer() const
Returns a const pointer on join buffer object.
Definition: qgsvectorlayer.h:658
QgsExpressionContextGenerator
Abstract interface for generating an expression context.
Definition: qgsexpressioncontextgenerator.h:37
QgsWeakRelation
The QgsWeakRelation class represent a QgsRelation with possibly unresolved layers or unmatched fields...
Definition: qgsweakrelation.h:39
QgsFeatureSink
An interface for objects which accept features via addFeature(s) methods.
Definition: qgsfeaturesink.h:34
qgsvectorlayerserverproperties.h
QgsAttributeList
QList< int > QgsAttributeList
Definition: qgsvectorlayer.h:82
QgsVectorLayer::committedFeaturesRemoved
void committedFeaturesRemoved(const QString &layerId, const QgsFeatureIds &deletedFeatureIds)
Emitted when features are deleted from the provider.
QgsVectorLayer::committedGeometriesChanges
void committedGeometriesChanges(const QString &layerId, const QgsGeometryMap &changedGeometries)
Emitted when geometry changes are saved to the provider.
QgsFeatureId
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Definition: qgsfeatureid.h:28
QgsVectorLayer::editCommandEnded
void editCommandEnded()
Signal emitted, when an edit command successfully ended.
QgsVectorLayer::actions
const QgsActionManager * actions() const
Returns all layer actions defined on this layer.
Definition: qgsvectorlayer.h:737
QgsVectorLayer::renderer
QgsFeatureRenderer * renderer()
Returns renderer.
Definition: qgsvectorlayer.h:892
QgsVectorLayer::readCustomSymbology
void readCustomSymbology(const QDomElement &element, QString &errorMessage)
Signal emitted whenever the symbology (QML-file) for this layer is being read.
QgsField
Encapsulate a field in an attribute table or data source.
Definition: qgsfield.h:50
QgsVectorLayer::featureAdded
void featureAdded(QgsFeatureId fid)
Emitted when a new feature has been added to the layer.