18#ifndef QGSVECTORLAYER_H 
   19#define QGSVECTORLAYER_H 
   60class QgsGeometryVertexIndex;
 
  404    Q_PROPERTY( QString subsetString READ subsetString WRITE setSubsetString NOTIFY subsetStringChanged )
 
  405    Q_PROPERTY( QString displayExpression READ displayExpression WRITE setDisplayExpression NOTIFY displayExpressionChanged )
 
  406    Q_PROPERTY( 
QgsEditFormConfig editFormConfig READ editFormConfig WRITE setEditFormConfig NOTIFY editFormConfigChanged )
 
  407    Q_PROPERTY( 
bool readOnly READ isReadOnly WRITE setReadOnly NOTIFY readOnlyChanged )
 
  408    Q_PROPERTY( 
bool supportsEditing READ supportsEditing NOTIFY supportsEditingChanged )
 
  409    Q_PROPERTY( 
QgsFields fields READ fields NOTIFY updatedFields )
 
  430                             bool readExtentFromXml = 
false )
 
  431        : loadDefaultStyle( loadDefaultStyle )
 
  432        , readExtentFromXml( readExtentFromXml )
 
 
  440                             bool loadDefaultStyle = 
true,
 
  441                             bool readExtentFromXml = 
false 
  443        : loadDefaultStyle( loadDefaultStyle )
 
  444        , readExtentFromXml( readExtentFromXml )
 
  445        , transformContext( transformContext )
 
 
  449      bool loadDefaultStyle = 
true;
 
  455      bool readExtentFromXml = 
false;
 
  502      bool skipCrsValidation = 
false;
 
  515      bool forceReadOnly = 
false;
 
  529      bool loadAllStoredStyles = 
false;
 
 
  550      QList<QgsVectorLayer *> handledLayers( 
bool includeAuxiliaryLayers = 
true ) 
const;
 
  557      QMap<QgsVectorLayer *, QgsFeatureIds> mHandledFeatures 
SIP_SKIP;
 
 
  575    explicit QgsVectorLayer( 
const QString &path = QString(), 
const QString &baseName = QString(),
 
  586    SIP_PYOBJECT __repr__();
 
  588    QString 
str = QStringLiteral( 
"<QgsVectorLayer: '%1' (%2)>" ).arg( sipCpp->name(), sipCpp->dataProvider() ? sipCpp->dataProvider()->name() : QStringLiteral( 
"Invalid" ) );
 
  589    sipRes = PyUnicode_FromString( 
str.toUtf8().constData() );
 
  606    QString storageType() const;
 
  611    QString capabilitiesString() const;
 
  623    bool isSqlQuery() const;
 
  631    Qgis::VectorLayerTypeFlags vectorLayerTypeFlags() const;
 
  637    QString dataComment() const;
 
  646    QString displayField() const;
 
  655    void setDisplayExpression( const QString &displayExpression );
 
  663    QString displayExpression() const;
 
  665    bool hasMapTips() const 
FINAL;
 
  684    void setProviderEncoding( const QString &encoding );
 
  687    void setCoordinateSystem();
 
  700    bool removeJoin( const QString &joinLayerId );
 
  713    const QList<QgsVectorLayerJoinInfo> vectorJoins() 
const;
 
  741    int addExpressionField( const QString &exp, const 
QgsField &fld );
 
  749    void removeExpressionField( 
int index );
 
  759    QString expressionField( 
int index ) const;
 
  769    void updateExpressionField( 
int index, const QString &exp );
 
  791    int selectedFeatureCount() 
const;
 
  840    Q_INVOKABLE 
void invertSelection();
 
  843    Q_INVOKABLE 
void selectAll();
 
  852    Q_INVOKABLE 
void invertSelectionInRectangle( 
QgsRectangle &rect );
 
  903    bool labelsEnabled() 
const;
 
  914    void setLabelsEnabled( 
bool enabled );
 
  920    bool diagramsEnabled() 
const;
 
  974    void removeFeatureRendererGenerator( 
const QString &
id );
 
  983    QList< const QgsFeatureRendererGenerator * > featureRendererGenerators() 
const;
 
  992    QString sourceName() const 
FINAL;
 
 1007    QString decodedSource( const QString &source, const QString &provider, const 
QgsReadWriteContext &context ) const 
FINAL;
 
 1026    bool loadAuxiliaryLayer( const 
QgsAuxiliaryStorage &storage, const QString &key = QString() );
 
 1050    bool readSymbology( const QDomNode &layerNode, QString &errorMessage,
 
 1052    bool readStyle( const QDomNode &node, QString &errorMessage,
 
 1054    bool writeSymbology( QDomNode &node, QDomDocument &doc, QString &errorMessage,
 
 1056    bool writeStyle( QDomNode &node, QDomDocument &doc, QString &errorMessage,
 
 1067    bool writeSld( QDomNode &node, QDomDocument &doc, QString &errorMessage, const QVariantMap &props = QVariantMap() ) const;
 
 1069    bool readSld( const QDomNode &node, QString &errorMessage ) 
FINAL;
 
 1076    long long featureCount( const QString &legendKey ) const;
 
 1084    QgsFeatureIds symbolFeatureIds( const QString &legendKey ) const;
 
 1096    Qgis::FeatureAvailability hasFeatures() const 
FINAL;
 
 1098    QString loadDefaultStyle( 
bool &resultFlag 
SIP_OUT ) 
FINAL;
 
 1121    virtual 
bool setSubsetString( const QString &subset );
 
 1127    virtual QString subsetString() const;
 
 1204    bool updateFeature( 
QgsFeature &feature, 
bool skipDefaultValues = false );
 
 1217    bool insertVertex( 
double x, 
double y, 
QgsFeatureId atFeatureId, 
int beforeVertex );
 
 1242    bool moveVertex( 
double x, 
double y, 
QgsFeatureId atFeatureId, 
int atVertex );
 
 1274    Q_INVOKABLE 
bool deleteSelectedFeatures( 
int *deletedCount = 
nullptr, 
QgsVectorLayer::DeleteContext *context = 
nullptr );
 
 1363#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) 
 1429    Q_INVOKABLE 
int translateFeature( 
QgsFeatureId featureId, 
double dx, 
double dy );
 
 1472    Q_INVOKABLE 
Qgis::GeometryOperationResult splitParts( const 
QgsPointSequence &splitLine, 
bool topologicalEditing = false );
 
 1494    Q_DECL_DEPRECATED 
Qgis::GeometryOperationResult splitFeatures( const QVector<
QgsPointXY> &splitLine, 
bool topologicalEditing = false ) 
SIP_DEPRECATED;
 
 1515    Q_INVOKABLE 
Qgis::GeometryOperationResult splitFeatures( const 
QgsPointSequence &splitLine, 
bool topologicalEditing = false );
 
 1539    Q_INVOKABLE 
Qgis::GeometryOperationResult splitFeatures( const 
QgsCurve *curve, 
QgsPointSequence &topologyTestPoints 
SIP_OUT, 
bool preserveCircular = false, 
bool topologicalEditing = false );
 
 1554    int addTopologicalPoints( const 
QgsGeometry &geom );
 
 1590    int addTopologicalPoints( const 
QgsPoint &p );
 
 1633    bool isSpatial() const 
FINAL;
 
 1636    bool isModified() const override;
 
 1643    bool isAuxiliaryField( 
int index, 
int &srcIndex ) const;
 
 1646    void reload() 
FINAL;
 
 1690    bool setReadOnly( 
bool readonly = true );
 
 1697    bool supportsEditing() const override;
 
 1753    Q_INVOKABLE 
bool changeAttributeValue( 
QgsFeatureId fid, 
int field, const QVariant &newValue, const QVariant &oldValue = QVariant(), 
bool skipDefaultValues = false,  
QgsVectorLayerToolsContext *context = 
nullptr );
 
 1802    bool addAttribute( const 
QgsField &field );
 
 1808    void setFieldAlias( 
int index, const QString &aliasString );
 
 1814    void removeFieldAlias( 
int index );
 
 1825    bool renameAttribute( 
int index, const QString &newName );
 
 1833    QString attributeAlias( 
int index ) const;
 
 1836    QString attributeDisplayName( 
int index ) const;
 
 1867    if ( a0 < 0 || a0 >= sipCpp->fields().count() )
 
 1869      PyErr_SetString( PyExc_KeyError, QByteArray::number( a0 ) );
 
 1874      sipCpp->setFieldSplitPolicy( a0, a1 );
 
 1887    if ( a0 < 0 || a0 >= sipCpp->fields().count() )
 
 1889      PyErr_SetString( PyExc_KeyError, QByteArray::number( a0 ) );
 
 1894      sipCpp->setFieldDuplicatePolicy( a0, a1 );
 
 1903    Q_DECL_DEPRECATED QSet<QString> excludeAttributesWms() const 
SIP_DEPRECATED;
 
 1909    Q_DECL_DEPRECATED 
void setExcludeAttributesWms( const QSet<QString> &att ) 
SIP_DEPRECATED;
 
 1915    Q_DECL_DEPRECATED QSet<QString> excludeAttributesWfs() const 
SIP_DEPRECATED;
 
 1921    Q_DECL_DEPRECATED 
void setExcludeAttributesWfs( const QSet<QString> &att ) 
SIP_DEPRECATED;
 
 1931    virtual 
bool deleteAttribute( 
int attr );
 
 1940    bool deleteAttributes( const QList<
int> &attrs );
 
 1994    Q_INVOKABLE 
bool commitChanges( 
bool stopEditing = true );
 
 2001    QStringList commitErrors() const;
 
 2012    Q_INVOKABLE 
bool rollBack( 
bool deleteBuffer = true );
 
 2020    QList<
QgsRelation> referencingRelations( 
int idx ) const;
 
 2056    void beginEditCommand( 
const QString &text );
 
 2059    void endEditCommand();
 
 2062    void destroyEditCommand();
 
 2068    Q_DECL_DEPRECATED 
static void drawVertexMarker( 
double x, 
double y, QPainter &p, 
Qgis::VertexMarkerType type, 
int vertexSize );
 
 2078    void updateFields();
 
 2106    void setDefaultValueDefinition( 
int index, 
const QgsDefaultValue &definition );
 
 2131    QMap< QgsFieldConstraints::Constraint, QgsFieldConstraints::ConstraintStrength> fieldConstraintsAndStrength( 
int fieldIndex ) 
const;
 
 2156    QString constraintExpression( 
int index ) 
const;
 
 2164    QString constraintDescription( 
int index ) 
const;
 
 2173    void setConstraintExpression( 
int index, 
const QString &expression, 
const QString &description = QString() );
 
 2233    QStringList uniqueStringsMatching( 
int index, const QString &substring, 
int limit = -1,
 
 2250    QVariant minimumValue( 
int index ) const 
FINAL;
 
 2266    QVariant maximumValue( 
int index ) const 
FINAL;
 
 2288    void minimumAndMaximumValue( 
int index, QVariant &minimum 
SIP_OUT, QVariant &maximum 
SIP_OUT ) const;
 
 2303    QVariant aggregate( 
Qgis::Aggregate aggregate,
 
 2304                        const QString &fieldOrExpression,
 
 2313    void setFeatureBlendMode( QPainter::CompositionMode blendMode );
 
 2315    QPainter::CompositionMode featureBlendMode() const;
 
 2317    QString htmlMetadata() const 
FINAL;
 
 2380    void setReadExtentFromXml( 
bool readExtentFromXml );
 
 2388    bool readExtentFromXml() const;
 
 2394    bool isEditCommandActive()
 const { 
return mEditCommandActive; }
 
 2439    void setAllowCommit( 
bool allowCommit ) 
SIP_SKIP;
 
 2484    Q_INVOKABLE 
void deselect( 
const QgsFeatureIds &featureIds );
 
 2492    Q_INVOKABLE 
void removeSelection();
 
 2512    virtual void updateExtents( 
bool force = 
false );
 
 2528    Q_INVOKABLE 
bool startEditing();
 
 2790    void invalidateSymbolCountedFlag();
 
 2791    void onFeatureCounterCompleted();
 
 2792    void onFeatureCounterTerminated();
 
 2793    void onJoinedFieldsChanged();
 
 2795    void onRelationsLoaded();
 
 2796    void onSymbolsCounted();
 
 2797    void onDirtyTransaction( 
const QString &sql, 
const QString &name );
 
 2798    void emitDataChanged();
 
 2799    void onAfterCommitChangesDependency();
 
 2813    bool isReadOnly() const 
FINAL;
 
 2834    void setDataSourcePrivate( const QString &dataSource, const QString &baseName, const QString &provider, const 
QgsDataProvider::ProviderOptions &options, 
QgsDataProvider::
ReadFlags flags ) override;
 
 2837    void readSldLabeling( const QDomNode &node );
 
 2851    void minimumOrMaximumValue( 
int index, QVariant *minimum, QVariant *maximum ) 
const;
 
 2853    void createEditBuffer();
 
 2854    void clearEditBuffer();
 
 2863    QString mDisplayExpression;
 
 2869    bool mDataSourceReadOnly = 
false;
 
 2877    bool mReadOnly = 
false;
 
 2898    QMap<QString, QgsDefaultValue> mDefaultExpressionMap;
 
 2901    QMap< QString, Qgis::FieldDomainSplitPolicy > mAttributeSplitPolicy;
 
 2904    QMap< QString, Qgis::FieldDuplicatePolicy > mAttributeDuplicatePolicy;
 
 2907    QSet<int> mDefaultValueOnUpdateFields;
 
 2910    QMap< QString, QgsFieldConstraints::Constraints > mFieldConstraints;
 
 2916    QMap< QString, QPair< QString, QString > > mFieldConstraintExpressions;
 
 2918    QMap< QString, Qgis::FieldConfigurationFlags > mFieldConfigurationFlags;
 
 2919    QMap< QString, QgsEditorWidgetSetup > mFieldWidgetSetups;
 
 2937    bool mLabelsEnabled = 
false;
 
 2940    bool mLabelFontNotFoundNotified = 
false;
 
 2943    QPainter::CompositionMode mFeatureBlendMode = QPainter::CompositionMode_SourceOver;
 
 2946    bool mVertexMarkerOnlyForSelection = 
false;
 
 2948    QStringList mCommitErrors;
 
 2968    mutable bool mValidExtent2D = 
false;
 
 2969    mutable bool mLazyExtent2D = 
true;
 
 2970    mutable bool mValidExtent3D = 
false;
 
 2971    mutable bool mLazyExtent3D = 
true;
 
 2974    std::unique_ptr<QgsAuxiliaryLayer> mAuxiliaryLayer;
 
 2977    QString mAuxiliaryLayerKey;
 
 2980    bool mSymbolFeatureCounted = 
false;
 
 2983    QHash<QString, long long> mSymbolFeatureCountMap;
 
 2984    QHash<QString, QgsFeatureIds> mSymbolFeatureIdMap;
 
 2987    bool mEditCommandActive = 
false;
 
 2990    bool mCommitChangesActive = 
false;
 
 2992    bool mReadExtentFromXml;
 
 3000    mutable QMutex mFeatureSourceConstructorMutex;
 
 3004    std::unique_ptr<QgsGeometryOptions> mGeometryOptions;
 
 3006    bool mAllowCommit = 
true;
 
 3014    bool mDataChangedFired = 
false;
 
 3016    QList<QgsWeakRelation> mWeakRelations;
 
 3018    bool mSetLegendFromStyle = 
false;
 
 3020    QList< QgsFeatureRendererGenerator * > mRendererGenerators;
 
 3023    QTimer *mRefreshRendererTimer = 
nullptr;
 
 3028    bool mLoadAllStoredStyle = 
false;
 
 
The Qgis class provides global constants for use throughout the application.
 
GeometryOperationResult
Success or failure of a geometry operation.
 
SpatialIndexPresence
Enumeration of spatial index presence states.
 
VectorRenderingSimplificationFlag
Simplification flags for vector feature rendering.
 
FieldDomainSplitPolicy
Split policy for field domains.
 
GeometryType
The geometry types are used to group Qgis::WkbType in a coarse way.
 
FieldDuplicatePolicy
Duplicate policy for fields.
 
VertexMarkerType
Editing vertex markers, used for showing vertices during a edit operation.
 
WkbType
The WKB type describes the number of dimensions a geometry has.
 
FieldConfigurationFlag
Configuration flags for fields These flags are meant to be user-configurable and are not describing a...
 
QFlags< FieldConfigurationFlag > FieldConfigurationFlags
Configuration flags for fields These flags are meant to be user-configurable and are not describing a...
 
SelectBehavior
Specifies how a selection should be applied.
 
@ SetSelection
Set selection, removing any existing selection.
 
Abstract base class for simplify geometries using a specific algorithm.
 
Abstract base class for objects which generate elevation profiles.
 
Interface for classes which can generate elevation profiles.
 
Abstract base class - its implementations define different approaches to the labeling of a vector lay...
 
Storage and management of actions associated with a layer.
 
Utility class for calculating aggregates for a field (or expression) over the features from a vector ...
 
This is a container for configuration of the attribute table.
 
Class allowing to manage the auxiliary storage for a vector layer.
 
Class providing some utility methods to manage auxiliary storage.
 
A 3-dimensional box composed of x, y, z coordinates.
 
The QgsConditionalLayerStyles class holds conditional style information for a layer.
 
This class represents a coordinate reference system (CRS).
 
Contains information about the context in which a coordinate transform is executed.
 
Abstract base class for curved geometry type.
 
Abstract base class for spatial data provider implementations.
 
The QgsDefaultValue class provides a container for managing client side default values for fields.
 
Stores the settings for rendering of all diagrams for a layer.
 
Evaluates and returns the diagram settings relating to a diagram for a specific feature.
 
Abstract interface for generating an expression context.
 
virtual QgsExpressionContext createExpressionContext() const =0
This method needs to be reimplemented in all classes which implement this interface and return an exp...
 
Abstract interface for generating an expression context scope.
 
Single scope for storing variables and functions for use within a QgsExpressionContext.
 
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
 
Buffers information about expression fields for a vector layer.
 
Wrapper for iterator of features from vector data provider or vector layer.
 
bool nextFeature(QgsFeature &f)
Fetch next feature and stores in f, returns true on success.
 
An interface for objects which generate feature renderers for vector layers.
 
This class wraps a request for features to a vector layer (or directly its vector data provider).
 
An interface for objects which accept features via addFeature(s) methods.
 
virtual bool addFeature(QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags())
Adds a single feature to the sink.
 
An interface for objects which provide features via a getFeatures method.
 
virtual QSet< QVariant > uniqueValues(int fieldIndex, int limit=-1) const
Returns the set of unique values contained within the specified fieldIndex from this source.
 
virtual Qgis::WkbType wkbType() const =0
Returns the geometry type for features returned by this source.
 
virtual Qgis::SpatialIndexPresence hasSpatialIndex() const
Returns an enum value representing the presence of a valid spatial index on the source,...
 
virtual QgsFeatureIterator getFeatures(const QgsFeatureRequest &request=QgsFeatureRequest()) const =0
Returns an iterator for the features in the source.
 
virtual long long featureCount() const =0
Returns the number of features contained in the source, or -1 if the feature count is unknown.
 
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
 
Base class for feedback objects to be used for cancellation of something running in a worker thread.
 
ConstraintStrength
Strength of constraints.
 
@ ConstraintStrengthHard
Constraint must be honored before feature can be accepted.
 
Constraint
Constraints which may be present on a field.
 
QFlags< Constraint > Constraints
 
Encapsulate a field in an attribute table or data source.
 
Container of fields for a vector layer.
 
QgsAttributeList allAttributesList() const
Utility function to get list of attribute indexes.
 
The QgsGeometryOptions class contains options to automatically adjust geometries to constraints on a ...
 
A geometry is the spatial representation of a feature.
 
Base class for storage of map layer elevation properties.
 
Base class for utility classes that encapsulate information necessary for rendering of map layers.
 
Base class for storage of map layer selection properties.
 
Base class for storage of map layer temporal properties.
 
Base class for all map layer types.
 
virtual bool accept(QgsStyleEntityVisitorInterface *visitor) const
Accepts the specified symbology visitor, causing it to visit all symbols associated with the layer.
 
QFlags< ReadFlag > ReadFlags
 
virtual bool setDependencies(const QSet< QgsMapLayerDependency > &layers)
Sets the list of dependencies.
 
virtual void setExtent3D(const QgsBox3D &box)
Sets the extent.
 
virtual QSet< QgsMapLayerDependency > dependencies() const
Gets the list of dependencies.
 
friend class QgsVectorLayer
 
virtual bool isEditable() const
Returns true if the layer can be edited.
 
virtual QgsMapLayer * clone() const =0
Returns a new instance equivalent to this one except for the id which is still unique.
 
virtual void setExtent(const QgsRectangle &rect)
Sets the extent.
 
virtual void setTransformContext(const QgsCoordinateTransformContext &transformContext)=0
Sets the coordinate transform context to transformContext.
 
Perform transforms between map coordinates and device coordinates.
 
Contains settings for how a map layer will be labeled.
 
A class to represent a 2D point.
 
Point geometry type, with support for z-dimension and m-values.
 
Encapsulates properties and constraints relating to fetching elevation profiles from different source...
 
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
 
The class is used as a container of context for various read/write operations on other objects.
 
A rectangle specified with double values.
 
This class manages a set of relations between layers.
 
Contains information about the context of a rendering operation.
 
A boolean settings entry.
 
A template class for enum and flag settings entry.
 
Manages stored expressions regarding creation, modification and storing in the project.
 
An interface for classes which can visit style entity (e.g.
 
Abstract base class for all rendered symbols.
 
This is the base class for vector data providers.
 
The edit buffer group manages a group of edit buffers.
 
Vector layer specific subclass of QgsMapLayerElevationProperties.
 
Counts the features in a QgsVectorLayer in task.
 
Partial snapshot of vector layer's state (only the members necessary for access to features)
 
Manages joined fields for a vector layer.
 
Defines left outer join from our vector layer to some other vector layer.
 
Implementation of layer selection properties for vector layers.
 
Implementation of map layer temporal properties for vector layers.
 
Contains settings which reflect the context in which vector layer tool operations should consider.
 
Represents a vector layer which manages a vector based data sets.
 
void committedFeaturesAdded(const QString &layerId, const QgsFeatureList &addedFeatures)
Emitted when features are added to the provider if not in transaction mode.
 
void labelingFontNotFound(QgsVectorLayer *layer, const QString &fontfamily)
Emitted when the font family defined for labeling layer is not found on system.
 
void featureBlendModeChanged(QPainter::CompositionMode blendMode)
Signal emitted when setFeatureBlendMode() is called.
 
void beforeRemovingExpressionField(int idx)
Will be emitted, when an expression field is going to be deleted from this vector layer.
 
void committedGeometriesChanges(const QString &layerId, const QgsGeometryMap &changedGeometries)
Emitted when geometry changes are saved to the provider if not in transaction mode.
 
void beforeCommitChanges(bool stopEditing)
Emitted before changes are committed to the data provider.
 
void attributeAdded(int idx)
Will be emitted, when a new attribute has been added to this vector layer.
 
QgsAbstractVectorLayerLabeling * labeling()
Access to labeling configuration.
 
void allowCommitChanged()
Emitted whenever the allowCommitChanged() property of this layer changes.
 
void editCommandStarted(const QString &text)
Signal emitted when a new edit command has been started.
 
const QgsDiagramLayerSettings * diagramLayerSettings() const
 
const QgsVectorLayerJoinBuffer * joinBuffer() const
Returns a const pointer on join buffer object.
 
void editCommandDestroyed()
Signal emitted, when an edit command is destroyed.
 
QgsVectorLayer(const QgsVectorLayer &rhs)=delete
QgsVectorLayer cannot be copied.
 
void featuresDeleted(const QgsFeatureIds &fids)
Emitted when features have been deleted.
 
void subsetStringChanged()
Emitted when the layer's subset string has changed.
 
void committedFeaturesRemoved(const QString &layerId, const QgsFeatureIds &deletedFeatureIds)
Emitted when features are deleted from the provider if not in transaction mode.
 
void symbolFeatureCountMapChanged()
Emitted when the feature count for symbols on this layer has been recalculated.
 
void writeCustomSymbology(QDomElement &element, QDomDocument &doc, QString &errorMessage) const
Signal emitted whenever the symbology (QML-file) for this layer is being written.
 
void attributeDeleted(int idx)
Will be emitted, when an attribute has been deleted from this vector layer.
 
QgsVectorLayer & operator=(QgsVectorLayer const &rhs)=delete
QgsVectorLayer cannot be copied.
 
QgsFeatureRenderer * renderer()
Returns the feature renderer used for rendering the features in the layer in 2D map views.
 
void beforeEditingStarted()
Emitted before editing on this layer is started.
 
void committedAttributeValuesChanges(const QString &layerId, const QgsChangedAttributesMap &changedAttributesValues)
Emitted when attribute value changes are saved to the provider if not in transaction mode.
 
void committedAttributesAdded(const QString &layerId, const QList< QgsField > &addedAttributes)
Emitted when attributes are added to the provider if not in transaction mode.
 
void committedAttributesDeleted(const QString &layerId, const QgsAttributeList &deletedAttributes)
Emitted when attributes are deleted from the provider if not in transaction mode.
 
void displayExpressionChanged()
Emitted when the display expression changes.
 
const QgsActionManager * actions() const
Returns all layer actions defined on this layer.
 
void editFormConfigChanged()
Will be emitted whenever the edit form configuration of this layer changes.
 
void afterCommitChanges()
Emitted after changes are committed to the data provider.
 
void raiseError(const QString &msg)
Signals an error related to this vector layer.
 
void editCommandEnded()
Signal emitted, when an edit command successfully ended.
 
void supportsEditingChanged()
Emitted when the read only state or the data provider of this layer is changed.
 
void readOnlyChanged()
Emitted when the read only state of this layer is changed.
 
void attributeValueChanged(QgsFeatureId fid, int idx, const QVariant &value)
Emitted whenever an attribute value change is done in the edit buffer.
 
QgsFeatureIterator getFeatures(const QgsFeatureIds &fids)
Queries the layer for the features with the given ids.
 
void afterRollBack()
Emitted after changes are rolled back.
 
const QgsVectorSimplifyMethod & simplifyMethod() const
Returns the simplification settings for fast rendering of features.
 
void selectionChanged(const QgsFeatureIds &selected, const QgsFeatureIds &deselected, bool clearAndSelect)
Emitted when selection was changed.
 
void beforeAddingExpressionField(const QString &fieldName)
Will be emitted, when an expression field is going to be added to this vector layer.
 
void updatedFields()
Emitted whenever the fields available from this layer have been changed.
 
void featureAdded(QgsFeatureId fid)
Emitted when a new feature has been added to the layer.
 
void featureDeleted(QgsFeatureId fid)
Emitted when a feature has been deleted.
 
void readCustomSymbology(const QDomElement &element, QString &errorMessage)
Signal emitted whenever the symbology (QML-file) for this layer is being read.
 
const QgsVectorLayerEditBuffer * editBuffer() const
Buffer with uncommitted editing operations.
 
void beforeRollBack()
Emitted before changes are rolled back.
 
void geometryChanged(QgsFeatureId fid, const QgsGeometry &geometry)
Emitted whenever a geometry change is done in the edit buffer.
 
QgsFeatureIterator getFeatures(const QgsRectangle &rectangle)
Queries the layer for the features which intersect the specified rectangle.
 
const QgsFeatureRenderer * renderer() const
Returns the feature renderer used for rendering the features in the layer in 2D map views.
 
void beforeModifiedCheck() const
Emitted when the layer is checked for modifications. Use for last-minute additions.
 
Q_INVOKABLE QgsFeature getFeature(QgsFeatureId fid) const
Queries the layer for the feature with the given id.
 
const QgsDiagramRenderer * diagramRenderer() const
 
This class contains information how to simplify geometries fetched from a vector layer.
 
The QgsWeakRelation class represent a QgsRelation with possibly unresolved layers or unmatched fields...
 
QMap< QString, QString > QgsStringMap
 
QVector< QgsPoint > QgsPointSequence
 
QMap< int, QVariant > QgsAttributeMap
 
QMap< QgsFeatureId, QgsGeometry > QgsGeometryMap
 
QMap< QgsFeatureId, QgsAttributeMap > QgsChangedAttributesMap
 
QList< QgsFeature > QgsFeatureList
 
QSet< QgsFeatureId > QgsFeatureIds
 
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
 
QList< int > QgsAttributeList
 
QList< int > QgsAttributeList
 
QSet< int > QgsAttributeIds
 
Context for cascade delete features.
 
DeleteContext(bool cascade=false, QgsProject *project=nullptr)
Constructor for DeleteContext.
 
Setting options for loading vector layers.
 
LayerOptions(bool loadDefaultStyle=true, bool readExtentFromXml=false)
Constructor for LayerOptions.
 
LayerOptions(const QgsCoordinateTransformContext &transformContext, bool loadDefaultStyle=true, bool readExtentFromXml=false)
Constructor for LayerOptions.
 
QgsCoordinateReferenceSystem fallbackCrs
Fallback layer coordinate reference system.