|
| QgsAuxiliaryLayer (const QgsAuxiliaryLayer &rhs)=delete |
| Copy constructor deactivated.
|
|
| QgsAuxiliaryLayer (const QString &pkField, const QString &filename, const QString &table, QgsVectorLayer *vlayer) |
| Constructor.
|
|
bool | addAuxiliaryField (const QgsPropertyDefinition &definition) |
| Adds an auxiliary field for the given property.
|
|
QgsFields | auxiliaryFields () const |
| Returns a list of all auxiliary fields currently managed by the layer.
|
|
bool | clear () |
| Deletes all features from the layer.
|
|
QgsVectorLayer * | clone () const override |
| Returns a new instance equivalent to this one.
|
|
QgsAuxiliaryLayer * | clone (QgsVectorLayer *layer) const |
| Returns a new instance equivalent to this one.
|
|
bool | deleteAttribute (int attr) override |
| Removes attribute from the layer and commits changes.
|
|
bool | exists (const QgsPropertyDefinition &definition) const |
| Returns true if the property is stored in the layer already, false otherwise.
|
|
int | indexOfPropertyDefinition (const QgsPropertyDefinition &definition) const |
| Returns the index of the auxiliary field for a specific property definition.
|
|
bool | isHiddenProperty (int index) const |
| Returns true if the underlying field has to be hidden from editing tools like attribute table, false otherwise.
|
|
QgsVectorLayerJoinInfo | joinInfo () const |
| Returns information to use for joining with primary key and so on.
|
|
QgsAuxiliaryLayer & | operator= (QgsAuxiliaryLayer const &rhs)=delete |
|
QgsPropertyDefinition | propertyDefinitionFromIndex (int index) const |
| Returns the property definition for the underlying field index.
|
|
int | propertyFromIndex (int index) const |
| Returns the underlying property key for the field index.
|
|
bool | save () |
| Commits changes and starts editing then.
|
|
QgsVectorLayer * | toSpatialLayer () const |
| An auxiliary layer is not spatial.
|
|
| QgsVectorLayer (const QgsVectorLayer &rhs)=delete |
| QgsVectorLayer cannot be copied.
|
|
| QgsVectorLayer (const QString &path=QString(), const QString &baseName=QString(), const QString &providerLib="ogr", const QgsVectorLayer::LayerOptions &options=QgsVectorLayer::LayerOptions()) |
| Constructor - creates a vector layer.
|
|
| ~QgsVectorLayer () override |
|
QgsActionManager * | actions () |
| Returns all layer actions defined on this layer.
|
|
const QgsActionManager * | actions () const |
| Returns all layer actions defined on this layer.
|
|
bool | addAttribute (const QgsField &field) |
| Add an attribute field (but does not commit it) returns true if the field was added.
|
|
int | addExpressionField (const QString &exp, const QgsField &fld) |
| Add a new field which is calculated by the expression specified.
|
|
bool | addFeature (QgsFeature &feature, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) FINAL |
| Adds a single feature to the sink.
|
|
void | addFeatureRendererGenerator (QgsFeatureRendererGenerator *generator) |
| Adds a new feature renderer generator to the layer.
|
|
bool | addFeatures (QgsFeatureList &features, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) FINAL |
| Adds a list of features to the sink.
|
|
bool | addJoin (const QgsVectorLayerJoinInfo &joinInfo) |
| Joins another vector layer to this layer.
|
|
Q_INVOKABLE Qgis::GeometryOperationResult | addPart (const QgsPointSequence &ring) |
| Adds a new part polygon to a multipart feature.
|
|
Q_DECL_DEPRECATED Qgis::GeometryOperationResult | addPart (const QList< QgsPointXY > &ring) |
| Adds a new part polygon to a multipart feature.
|
|
Q_INVOKABLE Qgis::GeometryOperationResult | addPart (QgsCurve *ring) |
|
Q_INVOKABLE Qgis::GeometryOperationResult | addRing (const QgsPointSequence &ring, QgsFeatureId *featureId=nullptr) |
| Adds a ring to polygon/multipolygon features.
|
|
Q_DECL_DEPRECATED Qgis::GeometryOperationResult | addRing (const QVector< QgsPointXY > &ring, QgsFeatureId *featureId=nullptr) |
| Adds a ring to polygon/multipolygon features.
|
|
Q_INVOKABLE Qgis::GeometryOperationResult | addRing (QgsCurve *ring, QgsFeatureId *featureId=nullptr) |
| Adds a ring to polygon/multipolygon features (takes ownership)
|
|
int | addTopologicalPoints (const QgsGeometry &geom) |
| Adds topological points for every vertex of the geometry.
|
|
int | addTopologicalPoints (const QgsPoint &p) |
| Adds a vertex to segments which intersect point p but don't already have a vertex there.
|
|
int | addTopologicalPoints (const QgsPointSequence &ps) |
| Adds a vertex to segments which intersect any of the points p but don't already have a vertex there.
|
|
Q_DECL_DEPRECATED int | addTopologicalPoints (const QgsPointXY &p) |
| Adds a vertex to segments which intersect point p but don't already have a vertex there.
|
|
QVariant | aggregate (Qgis::Aggregate aggregate, const QString &fieldOrExpression, const QgsAggregateCalculator::AggregateParameters ¶meters=QgsAggregateCalculator::AggregateParameters(), QgsExpressionContext *context=nullptr, bool *ok=nullptr, QgsFeatureIds *fids=nullptr, QgsFeedback *feedback=nullptr, QString *error=nullptr) const |
| Calculates an aggregated value from the layer's features.
|
|
bool | allowCommit () const |
| Controls, if the layer is allowed to commit changes.
|
|
QString | attributeAlias (int index) const |
| Returns the alias of an attribute name or a null string if there is no alias.
|
|
QgsStringMap | attributeAliases () const |
| Returns a map of field name to attribute alias.
|
|
QString | attributeDisplayName (int index) const |
| Convenience function that returns the attribute alias if defined or the field name else.
|
|
QgsAttributeList | attributeList () const |
| Returns list of attribute indexes.
|
|
QgsAttributeTableConfig | attributeTableConfig () const |
| Returns the attribute table configuration object.
|
|
QgsAuxiliaryLayer * | auxiliaryLayer () |
| Returns the current auxiliary layer.
|
|
const QgsAuxiliaryLayer * | auxiliaryLayer () const |
| Returns the current const auxiliary layer.
|
|
void | beginEditCommand (const QString &text) |
| Create edit command for undo/redo operations.
|
|
Q_INVOKABLE QgsRectangle | boundingBoxOfSelected () const |
| Returns the bounding box of the selected features. If there is no selection, QgsRectangle(0,0,0,0) is returned.
|
|
QString | capabilitiesString () const |
| Capabilities for this layer, comma separated and translated.
|
|
bool | changeAttributeValue (QgsFeatureId fid, int field, const QVariant &newValue, const QVariant &oldValue=QVariant(), bool skipDefaultValues=false) |
| Changes an attribute value for a feature (but does not immediately commit the changes).
|
|
bool | changeAttributeValues (QgsFeatureId fid, const QgsAttributeMap &newValues, const QgsAttributeMap &oldValues=QgsAttributeMap(), bool skipDefaultValues=false) |
| Changes attributes' values for a feature (but does not immediately commit the changes).
|
|
bool | changeGeometry (QgsFeatureId fid, QgsGeometry &geometry, bool skipDefaultValue=false) |
| Changes a feature's geometry within the layer's edit buffer (but does not immediately commit the changes).
|
|
QgsVectorLayer * | clone () const override |
| Returns a new instance equivalent to this one.
|
|
Q_INVOKABLE bool | commitChanges (bool stopEditing=true) |
| Attempts to commit to the underlying data provider any buffered changes made since the last to call to startEditing().
|
|
QStringList | commitErrors () const |
| Returns a list containing any error messages generated when attempting to commit changes to the layer.
|
|
QgsConditionalLayerStyles * | conditionalStyles () const |
| Returns the conditional styles that are set for this layer.
|
|
QString | constraintDescription (int index) const |
| Returns the descriptive name for the constraint expression for a specified field index.
|
|
QString | constraintExpression (int index) const |
| Returns the constraint expression for for a specified field index, if set.
|
|
QgsVectorLayerFeatureCounter * | countSymbolFeatures (bool storeSymbolFids=false) |
| Count features for symbols.
|
|
QgsExpressionContext | createExpressionContext () const FINAL |
| This method needs to be reimplemented in all classes which implement this interface and return an expression context.
|
|
QgsExpressionContextScope * | createExpressionContextScope () const FINAL |
| This method needs to be reimplemented in all classes which implement this interface and return an expression context scope.
|
|
QgsMapLayerRenderer * | createMapRenderer (QgsRenderContext &rendererContext) FINAL |
| Returns new instance of QgsMapLayerRenderer that will be used for rendering of given context.
|
|
QgsAbstractProfileGenerator * | createProfileGenerator (const QgsProfileRequest &request) override |
| Given a profile request, returns a new profile generator ready for generating elevation profiles.
|
|
QString | dataComment () const |
| Returns a description for this layer as defined in the data provider.
|
|
const QgsVectorDataProvider * | dataProvider () const FINAL |
| Returns the layer's data provider in a const-correct manner, it may be nullptr .
|
|
QgsVectorDataProvider * | dataProvider () FINAL |
| Returns the layer's data provider, it may be nullptr .
|
|
QString | decodedSource (const QString &source, const QString &provider, const QgsReadWriteContext &context) const FINAL |
| Called by readLayerXML(), used by derived classes to decode provider's specific data source from project files.
|
|
QVariant | defaultValue (int index, const QgsFeature &feature=QgsFeature(), QgsExpressionContext *context=nullptr) const |
| Returns the calculated default value for the specified field index.
|
|
QgsDefaultValue | defaultValueDefinition (int index) const |
| Returns the definition of the expression used when calculating the default value for a field.
|
|
bool | deleteAttributes (const QList< int > &attrs) |
| Deletes a list of attribute fields (but does not commit it)
|
|
bool | deleteFeature (QgsFeatureId fid, DeleteContext *context=nullptr) |
| Deletes a feature from the layer (but does not commit it).
|
|
bool | deleteFeatures (const QgsFeatureIds &fids, DeleteContext *context=nullptr) |
| Deletes a set of features from the layer (but does not commit it)
|
|
Q_INVOKABLE bool | deleteSelectedFeatures (int *deletedCount=nullptr, QgsVectorLayer::DeleteContext *context=nullptr) |
| Deletes the selected features.
|
|
Qgis::VectorEditResult | deleteVertex (QgsFeatureId featureId, int vertex) |
| Deletes a vertex from a feature.
|
|
QSet< QgsMapLayerDependency > | dependencies () const FINAL |
| Gets the list of dependencies.
|
|
void | destroyEditCommand () |
| Destroy active command and reverts all changes in it.
|
|
const QgsDiagramLayerSettings * | diagramLayerSettings () const |
|
const QgsDiagramRenderer * | diagramRenderer () const |
|
bool | diagramsEnabled () const |
| Returns whether the layer contains diagrams which are enabled and should be drawn.
|
|
QString | displayExpression () const |
| Returns the preview expression, used to create a human readable preview string.
|
|
QString | displayField () const |
| This is a shorthand for accessing the displayExpression if it is a simple field.
|
|
Q_INVOKABLE QgsVectorLayerEditBuffer * | editBuffer () |
| Buffer with uncommitted editing operations. Only valid after editing has been turned on.
|
|
const QgsVectorLayerEditBuffer * | editBuffer () const |
| Buffer with uncommitted editing operations.
|
|
QgsEditFormConfig | editFormConfig () const |
| Returns the configuration of the form used to represent this vector layer.
|
|
QgsEditorWidgetSetup | editorWidgetSetup (int index) const |
| The editor widget setup defines which QgsFieldFormatter and editor widget will be used for the field at index .
|
|
QgsMapLayerElevationProperties * | elevationProperties () override |
| Returns the layer's elevation properties.
|
|
QString | encodedSource (const QString &source, const QgsReadWriteContext &context) const FINAL |
| Called by writeLayerXML(), used by derived classes to encode provider's specific data source to project files.
|
|
void | endEditCommand () |
| Finish edit command and add it to undo/redo stack.
|
|
Q_DECL_DEPRECATED QSet< QString > | excludeAttributesWfs () const |
| A set of attributes that are not advertised in WFS requests with QGIS server.
|
|
Q_DECL_DEPRECATED QSet< QString > | excludeAttributesWms () const |
| A set of attributes that are not advertised in WMS requests with QGIS server.
|
|
QString | expressionField (int index) const |
| Returns the expression used for a given expression field.
|
|
QgsRectangle | extent () const FINAL |
| Returns the extent of the layer.
|
|
QgsBox3D | extent3D () const FINAL |
| Returns the 3D extent of the layer.
|
|
QPainter::CompositionMode | featureBlendMode () const |
| Returns the current blending mode for features.
|
|
long long | featureCount () const FINAL |
| Returns feature count including changes which have not yet been committed If you need only the count of committed features call this method on this layer's provider.
|
|
long long | featureCount (const QString &legendKey) const |
| Number of features rendered with specified legend key.
|
|
QList< const QgsFeatureRendererGenerator * > | featureRendererGenerators () const |
| Returns a list of the feature renderer generators owned by the layer.
|
|
Qgis::FieldConfigurationFlags | fieldConfigurationFlags (int index) const |
| Returns the configuration flags of the field at given index.
|
|
QgsFieldConstraints::Constraints | fieldConstraints (int fieldIndex) const |
| Returns any constraints which are present for a specified field index.
|
|
QMap< QgsFieldConstraints::Constraint, QgsFieldConstraints::ConstraintStrength > | fieldConstraintsAndStrength (int fieldIndex) const |
| Returns a map of constraint with their strength for a specific field of the layer.
|
|
QgsFields | fields () const FINAL |
| Returns the list of fields of this layer.
|
|
QgsGeometryOptions * | geometryOptions () const |
| Configuration and logic to apply automatically on any edit happening on this layer.
|
|
Q_INVOKABLE Qgis::GeometryType | geometryType () const |
| Returns point, line or polygon.
|
|
QgsFeature | getFeature (QgsFeatureId fid) const |
| Queries the layer for the feature with the given id.
|
|
QgsFeatureIterator | getFeatures (const QgsFeatureIds &fids) |
| Queries the layer for the features with the given ids.
|
|
QgsFeatureIterator | getFeatures (const QgsFeatureRequest &request=QgsFeatureRequest()) const FINAL |
| Queries the layer for features specified in request.
|
|
QgsFeatureIterator | getFeatures (const QgsRectangle &rectangle) |
| Queries the layer for the features which intersect the specified rectangle.
|
|
QgsFeatureIterator | getFeatures (const QString &expression) |
| Queries the layer for features matching a given expression.
|
|
QgsGeometry | getGeometry (QgsFeatureId fid) const |
| Queries the layer for the geometry at the given id.
|
|
QgsFeatureIterator | getSelectedFeatures (QgsFeatureRequest request=QgsFeatureRequest()) const |
| Returns an iterator of the selected features.
|
|
Qgis::FeatureAvailability | hasFeatures () const FINAL |
| Determines if this vector layer has features.
|
|
bool | hasMapTips () const FINAL |
| Returns true if the layer contains map tips.
|
|
QString | htmlMetadata () const FINAL |
| Obtain a formatted HTML string containing assorted metadata for this layer.
|
|
bool | insertVertex (const QgsPoint &point, QgsFeatureId atFeatureId, int beforeVertex) |
| Inserts a new vertex before the given vertex number, in the given ring, item (first number is index 0), and feature.
|
|
bool | insertVertex (double x, double y, QgsFeatureId atFeatureId, int beforeVertex) |
| Inserts a new vertex before the given vertex number, in the given ring, item (first number is index 0), and feature.
|
|
Q_INVOKABLE void | invertSelection () |
| Selects not selected features and deselects selected ones.
|
|
Q_INVOKABLE void | invertSelectionInRectangle (QgsRectangle &rect) |
| Inverts selection of features found within the search rectangle (in layer's coordinates)
|
|
bool | isAuxiliaryField (int index, int &srcIndex) const |
| Returns true if the field comes from the auxiliary layer, false otherwise.
|
|
bool | isEditable () const FINAL |
| Returns true if the provider is in editing mode.
|
|
bool | isEditCommandActive () const |
| Tests if an edit command is active.
|
|
bool | isModified () const override |
| Returns true if the provider has been modified since the last commit.
|
|
bool | isSpatial () const FINAL |
| Returns true if this is a geometry layer and false in case of NoGeometry (table only) or UnknownGeometry.
|
|
bool | isSqlQuery () const |
| Returns true if the layer is a query (SQL) layer.
|
|
QgsVectorLayerJoinBuffer * | joinBuffer () |
| Returns the join buffer object.
|
|
const QgsVectorLayerJoinBuffer * | joinBuffer () const |
| Returns a const pointer on join buffer object.
|
|
QgsAbstractVectorLayerLabeling * | labeling () |
| Access to labeling configuration.
|
|
const QgsAbstractVectorLayerLabeling * | labeling () const |
| Access to const labeling configuration.
|
|
bool | labelsEnabled () const |
| Returns whether the layer contains labels which are enabled and should be drawn.
|
|
bool | loadAuxiliaryLayer (const QgsAuxiliaryStorage &storage, const QString &key=QString()) |
| Loads the auxiliary layer for this vector layer.
|
|
QString | loadDefaultStyle (bool &resultFlag) FINAL |
| Retrieve the default style for this layer if one exists (either as a .qml file on disk or as a record in the users style table in their personal qgis.db)
|
|
QVariant | maximumValue (int index) const FINAL |
| Returns the maximum value for an attribute column or an invalid variant in case of error.
|
|
void | minimumAndMaximumValue (int index, QVariant &minimum, QVariant &maximum) const |
| Calculates both the minimum and maximum value for an attribute column.
|
|
QVariant | minimumValue (int index) const FINAL |
| Returns the minimum value for an attribute column or an invalid variant in case of error.
|
|
Q_INVOKABLE void | modifySelection (const QgsFeatureIds &selectIds, const QgsFeatureIds &deselectIds) |
| Modifies the current selection on this layer.
|
|
bool | moveVertex (const QgsPoint &p, QgsFeatureId atFeatureId, int atVertex) |
| Moves the vertex at the given position number, ring and item (first number is index 0), and feature to the given coordinates.
|
|
bool | moveVertex (double x, double y, QgsFeatureId atFeatureId, int atVertex) |
| Moves the vertex at the given position number, ring and item (first number is index 0), and feature to the given coordinates.
|
|
QgsVectorLayer & | operator= (QgsVectorLayer const &rhs)=delete |
| QgsVectorLayer cannot be copied.
|
|
QgsAttributeList | primaryKeyAttributes () const |
| Returns the list of attributes which make up the layer's primary keys.
|
|
bool | readExtentFromXml () const |
| Returns true if the extent is read from the XML document when data source has no metadata, false if it's the data provider which determines it.
|
|
bool | readSld (const QDomNode &node, QString &errorMessage) FINAL |
|
bool | readStyle (const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) FINAL |
|
bool | readSymbology (const QDomNode &layerNode, QString &errorMessage, QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) FINAL |
|
bool | readXml (const QDomNode &layer_node, QgsReadWriteContext &context) FINAL |
| Reads vector layer specific state from project file Dom node.
|
|
QList< QgsRelation > | referencingRelations (int idx) const |
| Returns the layer's relations, where the foreign key is on this layer.
|
|
void | reload () FINAL |
| Synchronises with changes in the datasource.
|
|
void | removeExpressionField (int index) |
| Removes an expression field.
|
|
void | removeFeatureRendererGenerator (const QString &id) |
| Removes the feature renderer with matching id from the layer.
|
|
void | removeFieldAlias (int index) |
| Removes an alias (a display name) for attributes to display in dialogs.
|
|
void | removeFieldConstraint (int index, QgsFieldConstraints::Constraint constraint) |
| Removes a constraint for a specified field index.
|
|
bool | removeJoin (const QString &joinLayerId) |
| Removes a vector layer join.
|
|
bool | renameAttribute (int index, const QString &newName) |
| Renames an attribute field (but does not commit it).
|
|
QgsFeatureRenderer * | renderer () |
| Returns the feature renderer used for rendering the features in the layer in 2D map views.
|
|
const QgsFeatureRenderer * | renderer () const |
| Returns the feature renderer used for rendering the features in the layer in 2D map views.
|
|
void | resolveReferences (QgsProject *project) FINAL |
| Resolves references to other layers (kept as layer IDs after reading XML) into layer objects.
|
|
Q_INVOKABLE bool | rollBack (bool deleteBuffer=true) |
| Stops a current editing operation and discards any uncommitted edits.
|
|
Q_INVOKABLE void | selectAll () |
| Select all the features.
|
|
Q_INVOKABLE void | selectByExpression (const QString &expression, Qgis::SelectBehavior behavior=Qgis::SelectBehavior::SetSelection, QgsExpressionContext *context=nullptr) |
| Selects matching features using an expression.
|
|
Q_INVOKABLE void | selectByIds (const QgsFeatureIds &ids, Qgis::SelectBehavior behavior=Qgis::SelectBehavior::SetSelection) |
| Selects matching features using a list of feature IDs.
|
|
Q_INVOKABLE void | selectByRect (QgsRectangle &rect, Qgis::SelectBehavior behavior=Qgis::SelectBehavior::SetSelection) |
| Selects features found within the search rectangle (in layer's coordinates)
|
|
int | selectedFeatureCount () const |
| Returns the number of features that are selected in this layer.
|
|
Q_INVOKABLE const QgsFeatureIds & | selectedFeatureIds () const |
| Returns a list of the selected features IDs in this layer.
|
|
Q_INVOKABLE QgsFeatureList | selectedFeatures () const |
| Returns a copy of the user-selected features.
|
|
QgsMapLayerSelectionProperties * | selectionProperties () override |
| Returns the layer's selection properties.
|
|
void | setAllowCommit (bool allowCommit) |
| Controls, if the layer is allowed to commit changes.
|
|
void | setAttributeTableConfig (const QgsAttributeTableConfig &attributeTableConfig) |
| Sets the attribute table configuration object.
|
|
void | setAuxiliaryLayer (QgsAuxiliaryLayer *layer=nullptr) |
| Sets the current auxiliary layer.
|
|
void | setConstraintExpression (int index, const QString &expression, const QString &description=QString()) |
| Sets the constraint expression for the specified field index.
|
|
void | setCoordinateSystem () |
| Setup the coordinate system transformation for the layer.
|
|
void | setDefaultValueDefinition (int index, const QgsDefaultValue &definition) |
| Sets the definition of the expression to use when calculating the default value for a field.
|
|
bool | setDependencies (const QSet< QgsMapLayerDependency > &layers) FINAL |
| Sets the list of dependencies.
|
|
void | setDiagramLayerSettings (const QgsDiagramLayerSettings &s) |
|
void | setDiagramRenderer (QgsDiagramRenderer *r) |
| Sets diagram rendering object (takes ownership)
|
|
void | setDisplayExpression (const QString &displayExpression) |
| Set the preview expression, used to create a human readable preview string.
|
|
void | setEditFormConfig (const QgsEditFormConfig &editFormConfig) |
| Sets the editFormConfig (configuration) of the form used to represent this vector layer.
|
|
void | setEditorWidgetSetup (int index, const QgsEditorWidgetSetup &setup) |
| The editor widget setup defines which QgsFieldFormatter and editor widget will be used for the field at index .
|
|
Q_DECL_DEPRECATED void | setExcludeAttributesWfs (const QSet< QString > &att) |
| A set of attributes that are not advertised in WFS requests with QGIS server.
|
|
Q_DECL_DEPRECATED void | setExcludeAttributesWms (const QSet< QString > &att) |
| A set of attributes that are not advertised in WMS requests with QGIS server.
|
|
void | setFeatureBlendMode (QPainter::CompositionMode blendMode) |
| Sets the blending mode used for rendering each feature.
|
|
void | setFieldAlias (int index, const QString &aliasString) |
| Sets an alias (a display name) for attributes to display in dialogs.
|
|
void | setFieldConfigurationFlag (int index, Qgis::FieldConfigurationFlag flag, bool active) |
| Sets the given configuration flag for the field at given index to be active or not.
|
|
void | setFieldConfigurationFlags (int index, Qgis::FieldConfigurationFlags flags) |
| Sets the configuration flags of the field at given index.
|
|
void | setFieldConstraint (int index, QgsFieldConstraints::Constraint constraint, QgsFieldConstraints::ConstraintStrength strength=QgsFieldConstraints::ConstraintStrengthHard) |
| Sets a constraint for a specified field index.
|
|
void | setFieldSplitPolicy (int index, Qgis::FieldDomainSplitPolicy policy) |
| Sets a split policy for the field with the specified index.
|
|
void | setLabeling (QgsAbstractVectorLayerLabeling *labeling) |
| Sets labeling configuration.
|
|
void | setLabelsEnabled (bool enabled) |
| Sets whether labels should be enabled for the layer.
|
|
void | setProviderEncoding (const QString &encoding) |
| Sets the text encoding of the data provider.
|
|
void | setReadExtentFromXml (bool readExtentFromXml) |
| Flag allowing to indicate if the extent has to be read from the XML document when data source has no metadata or if the data provider has to determine it.
|
|
bool | setReadOnly (bool readonly=true) |
| Makes layer read-only (editing disabled) or not.
|
|
void | setRenderer (QgsFeatureRenderer *r) |
| Sets the feature renderer which will be invoked to represent this layer in 2D map views.
|
|
void | setSimplifyMethod (const QgsVectorSimplifyMethod &simplifyMethod) |
| Sets the simplification settings for fast rendering of features.
|
|
virtual bool | setSubsetString (const QString &subset) |
| Sets the string (typically sql) used to define a subset of the layer.
|
|
void | setWeakRelations (const QList< QgsWeakRelation > &relations) |
| Sets the layer's weak relations.
|
|
bool | simplifyDrawingCanbeApplied (const QgsRenderContext &renderContext, QgsVectorSimplifyMethod::SimplifyHint simplifyHint) const |
| Returns whether the VectorLayer can apply the specified simplification hint.
|
|
const QgsVectorSimplifyMethod & | simplifyMethod () const |
| Returns the simplification settings for fast rendering of features.
|
|
QgsCoordinateReferenceSystem | sourceCrs () const FINAL |
| Returns the coordinate reference system for features in the source.
|
|
QgsRectangle | sourceExtent () const FINAL |
| Returns the extent of all geometries from the source.
|
|
QgsBox3D | sourceExtent3D () const FINAL |
| Returns the 3D extent of all geometries from the source.
|
|
QString | sourceName () const FINAL |
| Returns a friendly display name for the source.
|
|
Q_INVOKABLE Qgis::GeometryOperationResult | splitFeatures (const QgsCurve *curve, QgsPointSequence &topologyTestPoints, bool preserveCircular=false, bool topologicalEditing=false) |
| Splits features cut by the given curve.
|
|
Q_INVOKABLE Qgis::GeometryOperationResult | splitFeatures (const QgsPointSequence &splitLine, bool topologicalEditing=false) |
| Splits features cut by the given line.
|
|
Q_DECL_DEPRECATED Qgis::GeometryOperationResult | splitFeatures (const QVector< QgsPointXY > &splitLine, bool topologicalEditing=false) |
| Splits features cut by the given line.
|
|
Q_INVOKABLE Qgis::GeometryOperationResult | splitParts (const QgsPointSequence &splitLine, bool topologicalEditing=false) |
| Splits parts cut by the given line.
|
|
Q_DECL_DEPRECATED Qgis::GeometryOperationResult | splitParts (const QVector< QgsPointXY > &splitLine, bool topologicalEditing=false) |
| Splits parts cut by the given line.
|
|
QString | storageType () const |
| Returns the permanent storage type for this layer as a friendly name.
|
|
QgsStoredExpressionManager * | storedExpressionManager () |
| Returns the manager of the stored expressions for this layer.
|
|
virtual QString | subsetString () const |
| Returns the string (typically sql) used to define a subset of the layer.
|
|
bool | supportsEditing () const override |
| Returns whether the layer supports editing or not.
|
|
QgsFeatureIds | symbolFeatureIds (const QString &legendKey) const |
| Ids of features rendered with specified legend key.
|
|
QgsMapLayerTemporalProperties * | temporalProperties () override |
| Returns the layer's temporal properties.
|
|
Q_INVOKABLE int | translateFeature (QgsFeatureId featureId, double dx, double dy) |
| Translates feature by dx, dy.
|
|
QStringList | uniqueStringsMatching (int index, const QString &substring, int limit=-1, QgsFeedback *feedback=nullptr) const |
| Returns unique string values of an attribute which contain a specified subset string.
|
|
QSet< QVariant > | uniqueValues (int fieldIndex, int limit=-1) const FINAL |
| Calculates a list of unique values contained within an attribute in the layer.
|
|
void | updateExpressionField (int index, const QString &exp) |
| Changes the expression used to define an expression based (virtual) field.
|
|
bool | updateFeature (QgsFeature &feature, bool skipDefaultValues=false) |
| Updates an existing feature in the layer, replacing the attributes and geometry for the feature with matching QgsFeature::id() with the attributes and geometry from feature.
|
|
void | updateFields () |
| Will regenerate the fields property of this layer by obtaining all fields from the dataProvider, joined fields and virtual fields.
|
|
const QList< QgsVectorLayerJoinInfo > | vectorJoins () const |
|
Qgis::VectorLayerTypeFlags | vectorLayerTypeFlags () const |
| Returns the vector layer type flags.
|
|
QList< QgsWeakRelation > | weakRelations () const |
| Returns the layer's weak relations as specified in the layer's style.
|
|
Q_INVOKABLE Qgis::WkbType | wkbType () const FINAL |
| Returns the WKBType or WKBUnknown in case of error.
|
|
bool | writeSld (QDomNode &node, QDomDocument &doc, QString &errorMessage, const QVariantMap &props=QVariantMap()) const |
| Writes the symbology of the layer into the document provided in SLD 1.1 format.
|
|
bool | writeStyle (QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) const FINAL |
|
bool | writeSymbology (QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) const FINAL |
|
bool | writeXml (QDomNode &layer_node, QDomDocument &doc, const QgsReadWriteContext &context) const FINAL |
| Writes vector layer specific state to project file Dom node.
|
|
| QgsMapLayer (Qgis::LayerType type=Qgis::LayerType::Vector, const QString &name=QString(), const QString &source=QString()) |
| Constructor for QgsMapLayer.
|
|
| QgsMapLayer (QgsMapLayer const &)=delete |
| QgsMapLayer cannot be copied.
|
|
| ~QgsMapLayer () override |
|
QString | abstract () const |
| Returns the abstract of the layer used by QGIS Server in GetCapabilities request.
|
|
virtual bool | accept (QgsStyleEntityVisitorInterface *visitor) const |
| Accepts the specified symbology visitor, causing it to visit all symbols associated with the layer.
|
|
QString | attribution () const |
| Returns the attribution of the layer used by QGIS Server in GetCapabilities request.
|
|
QString | attributionUrl () const |
| Returns the attribution URL of the layer used by QGIS Server in GetCapabilities request.
|
|
int | autoRefreshInterval () const |
| Returns the auto refresh interval (in milliseconds).
|
|
Qgis::AutoRefreshMode | autoRefreshMode () const |
| Returns the layer's automatical refresh mode.
|
|
QPainter::CompositionMode | blendMode () const |
| Returns the current blending mode for a layer.
|
|
QgsCoordinateReferenceSystem | crs () const |
| Returns the layer's spatial reference system.
|
|
template<class T > |
T | customEnumProperty (const QString &key, const T &defaultValue) |
| Returns the property value for a property based on an enum.
|
|
template<class T > |
T | customFlagProperty (const QString &key, const T &defaultValue) |
| Returns the property value for a property based on a flag.
|
|
const QgsObjectCustomProperties & | customProperties () const |
| Read all custom properties from layer.
|
|
Q_INVOKABLE QVariant | customProperty (const QString &value, const QVariant &defaultValue=QVariant()) const |
| Read a custom property from layer.
|
|
Q_INVOKABLE QStringList | customPropertyKeys () const |
| Returns list of all keys within custom properties.
|
|
QString | dataUrl () const |
| Returns the DataUrl of the layer used by QGIS Server in GetCapabilities request.
|
|
QString | dataUrlFormat () const |
| Returns the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
|
|
virtual bool | deleteStyleFromDatabase (const QString &styleId, QString &msgError) |
| Deletes a style from the database.
|
|
virtual QgsError | error () const |
| Gets current status error.
|
|
void | exportNamedMetadata (QDomDocument &doc, QString &errorMsg) const |
| Export the current metadata of this layer as named metadata in a QDomDocument.
|
|
virtual void | exportNamedStyle (QDomDocument &doc, QString &errorMsg, const QgsReadWriteContext &context=QgsReadWriteContext(), QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) const |
| Export the properties of this layer as named style in a QDomDocument.
|
|
virtual void | exportSldStyle (QDomDocument &doc, QString &errorMsg) const |
| Export the properties of this layer as SLD style in a QDomDocument.
|
|
virtual void | exportSldStyleV2 (QDomDocument &doc, QString &errorMsg, const QgsSldExportContext &exportContext) const |
| Export the properties of this layer as SLD style in a QDomDocument.
|
|
QgsMapLayer::LayerFlags | flags () const |
| Returns the flags for this layer.
|
|
virtual QString | getStyleFromDatabase (const QString &styleId, QString &msgError) |
| Returns the named style corresponding to style id provided.
|
|
Q_DECL_DEPRECATED bool | hasAutoRefreshEnabled () const |
| Returns true if auto refresh is enabled for the layer.
|
|
bool | hasScaleBasedVisibility () const |
| Returns whether scale based visibility is enabled for the layer.
|
|
QString | id () const |
| Returns the layer's unique ID, which is used to access this layer from QgsProject.
|
|
bool | importNamedMetadata (QDomDocument &document, QString &errorMessage) |
| Import the metadata of this layer from a QDomDocument.
|
|
virtual bool | importNamedStyle (QDomDocument &doc, QString &errorMsg, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) |
| Import the properties of this layer from a QDomDocument.
|
|
bool | isInScaleRange (double scale) const |
| Tests whether the layer should be visible at the specified scale.
|
|
bool | isRefreshOnNotifyEnabled () const |
| Returns true if the refresh on provider nofification is enabled.
|
|
virtual bool | isTemporary () const |
| Returns true if the layer is considered a temporary layer.
|
|
bool | isValid () const |
| Returns the status of the layer.
|
|
QString | keywordList () const |
| Returns the keyword list of the layer used by QGIS Server in GetCapabilities request.
|
|
QgsMapLayerLegend * | legend () const |
| Can be nullptr .
|
|
QString | legendPlaceholderImage () const |
| Returns path to the placeholder image or an empty string if a generated legend is shown.
|
|
QString | legendUrl () const |
| Returns the URL for the layer's legend.
|
|
QString | legendUrlFormat () const |
| Returns the format for a URL based layer legend.
|
|
virtual int | listStylesInDatabase (QStringList &ids, QStringList &names, QStringList &descriptions, QString &msgError) |
| Lists all the style in db split into related to the layer and not related to.
|
|
virtual QString | loadDefaultMetadata (bool &resultFlag) |
| Retrieve the default metadata for this layer if one exists (either as a .qmd file on disk or as a record in the users metadata table in their personal qgis.db)
|
|
virtual QString | loadNamedMetadata (const QString &uri, bool &resultFlag) |
| Retrieve a named metadata for this layer if one exists (either as a .qmd file on disk or as a record in the users style table in their personal qgis.db)
|
|
bool | loadNamedMetadataFromDatabase (const QString &db, const QString &uri, QString &qmd) |
| Retrieve a named metadata for this layer from a sqlite database.
|
|
virtual QString | loadNamedStyle (const QString &theURI, bool &resultFlag, bool loadFromLocalDb, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) |
| Loads a named style from file/local db/datasource db.
|
|
virtual QString | loadNamedStyle (const QString &uri, bool &resultFlag, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) |
| Retrieve a named style for this layer if one exists (either as a .qml file on disk or as a record in the users style table in their personal qgis.db)
|
|
virtual bool | loadNamedStyleFromDatabase (const QString &db, const QString &uri, QString &qml) |
| Retrieve a named style for this layer from a sqlite database.
|
|
virtual QString | loadSldStyle (const QString &uri, bool &resultFlag) |
| Attempts to style the layer using the formatting from an SLD type file.
|
|
bool | mapTipsEnabled () const |
| Returns true if map tips are enabled for this layer.
|
|
QString | mapTipTemplate () const |
| The mapTip is a pretty, html representation for feature information.
|
|
double | maximumScale () const |
| Returns the maximum map scale (i.e.
|
|
virtual const QgsLayerMetadata & | metadata () const |
| Returns a reference to the layer's metadata store.
|
|
virtual QString | metadataUri () const |
| Retrieve the metadata URI for this layer (either as a .qmd file on disk or as a record in the users style table in their personal qgis.db)
|
|
Q_DECL_DEPRECATED QString | metadataUrl () const |
| Returns the metadata URL of the layer used by QGIS Server in GetCapabilities request.
|
|
Q_DECL_DEPRECATED QString | metadataUrlFormat () const |
| Returns the metadata format of the layer used by QGIS Server in GetCapabilities request.
|
|
Q_DECL_DEPRECATED QString | metadataUrlType () const |
| Returns the metadata type of the layer used by QGIS Server in GetCapabilities request.
|
|
double | minimumScale () const |
| Returns the minimum map scale (i.e.
|
|
QString | name () const |
| Returns the display name of the layer.
|
|
virtual double | opacity () const |
| Returns the opacity for the layer, where opacity is a value between 0 (totally transparent) and 1.0 (fully opaque).
|
|
QgsMapLayer & | operator= (QgsMapLayer const &)=delete |
| QgsMapLayer cannot be copied.
|
|
QString | originalXmlProperties () const |
| Returns the XML properties of the original layer as they were when the layer was first read from the project file.
|
|
virtual Qgis::MapLayerProperties | properties () const |
| Returns the map layer properties of this layer.
|
|
QString | providerType () const |
| Returns the provider type (provider key) for this layer.
|
|
QString | publicSource (bool hidePassword=false) const |
| Gets a version of the internal layer definition that has sensitive bits removed (for example, the password).
|
|
bool | readLayerXml (const QDomElement &layerElement, QgsReadWriteContext &context, QgsMapLayer::ReadFlags flags=QgsMapLayer::ReadFlags(), QgsDataProvider *preloadedProvider=nullptr) |
| Sets state from DOM document.
|
|
bool | readOnly () const |
| Returns if this layer is read only.
|
|
virtual bool | readStyle (const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) |
| Read the style for the current layer from the DOM node supplied.
|
|
virtual bool | readSymbology (const QDomNode &node, QString &errorMessage, QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories)=0 |
| Read the symbology for the current layer from the DOM node supplied.
|
|
QString | refreshOnNotifyMessage () const |
| Returns the message that should be notified by the provider to triggerRepaint.
|
|
void | removeCustomProperty (const QString &key) |
| Remove a custom property from layer.
|
|
QgsAbstract3DRenderer * | renderer3D () const |
| Returns 3D renderer associated with the layer.
|
|
virtual QString | saveDefaultMetadata (bool &resultFlag) |
| Save the current metadata of this layer as the default metadata (either as a .qmd file on disk or as a record in the users style table in their personal qgis.db)
|
|
virtual Q_DECL_DEPRECATED QString | saveDefaultStyle (bool &resultFlag) |
| Save the properties of this layer as the default style (either as a .qml file on disk or as a record in the users style table in their personal qgis.db)
|
|
virtual QString | saveDefaultStyle (bool &resultFlag, StyleCategories categories) |
| Save the properties of this layer as the default style (either as a .qml file on disk or as a record in the users style table in their personal qgis.db)
|
|
QString | saveNamedMetadata (const QString &uri, bool &resultFlag) |
| Save the current metadata of this layer as a named metadata (either as a .qmd file on disk or as a record in the users style table in their personal qgis.db)
|
|
virtual QString | saveNamedStyle (const QString &uri, bool &resultFlag, StyleCategories categories=AllStyleCategories) |
| Save the properties of this layer as a named style (either as a .qml file on disk or as a record in the users style table in their personal qgis.db)
|
|
virtual QString | saveSldStyle (const QString &uri, bool &resultFlag) const |
| Saves the properties of this layer to an SLD format file.
|
|
virtual QString | saveSldStyleV2 (bool &resultFlag, const QgsSldExportContext &exportContext) const |
| Saves the properties of this layer to an SLD format file.
|
|
virtual void | saveStyleToDatabase (const QString &name, const QString &description, bool useAsDefault, const QString &uiFileContent, QString &msgError, QgsMapLayer::StyleCategories categories=QgsMapLayer::AllStyleCategories) |
| Saves named and sld style of the layer to the style table in the db.
|
|
QgsMapLayerServerProperties * | serverProperties () |
| Returns QGIS Server Properties for the map layer.
|
|
const QgsMapLayerServerProperties * | serverProperties () const |
| Returns QGIS Server Properties const for the map layer.
|
|
void | setAbstract (const QString &abstract) |
| Sets the abstract of the layer used by QGIS Server in GetCapabilities request.
|
|
void | setAttribution (const QString &attrib) |
| Sets the attribution of the layer used by QGIS Server in GetCapabilities request.
|
|
void | setAttributionUrl (const QString &attribUrl) |
| Sets the attribution URL of the layer used by QGIS Server in GetCapabilities request.
|
|
Q_DECL_DEPRECATED void | setAutoRefreshEnabled (bool enabled) |
| Sets whether auto refresh is enabled for the layer.
|
|
void | setAutoRefreshInterval (int interval) |
| Sets the auto refresh interval (in milliseconds) for the layer.
|
|
void | setAutoRefreshMode (Qgis::AutoRefreshMode mode) |
| Sets the automatic refresh mode for the layer.
|
|
void | setBlendMode (QPainter::CompositionMode blendMode) |
| Set the blending mode used for rendering a layer.
|
|
void | setCrs (const QgsCoordinateReferenceSystem &srs, bool emitSignal=true) |
| Sets layer's spatial reference system.
|
|
template<class T > |
void | setCustomEnumProperty (const QString &key, const T &value) |
| Set the value of a property based on an enum.
|
|
template<class T > |
void | setCustomFlagProperty (const QString &key, const T &value) |
| Set the value of a property based on a flag.
|
|
void | setCustomProperties (const QgsObjectCustomProperties &properties) |
| Set custom properties for layer.
|
|
Q_INVOKABLE void | setCustomProperty (const QString &key, const QVariant &value) |
| Set a custom property for layer.
|
|
void | setDataSource (const QString &dataSource, const QString &baseName, const QString &provider, bool loadDefaultStyleFlag=false) |
| Updates the data source of the layer.
|
|
void | setDataSource (const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, bool loadDefaultStyleFlag=false) |
| Updates the data source of the layer.
|
|
void | setDataSource (const QString &dataSource, const QString &baseName, const QString &provider, const QgsDataProvider::ProviderOptions &options, QgsDataProvider::ReadFlags flags) |
| Updates the data source of the layer.
|
|
void | setDataUrl (const QString &dataUrl) |
| Sets the DataUrl of the layer used by QGIS Server in GetCapabilities request.
|
|
void | setDataUrlFormat (const QString &dataUrlFormat) |
| Sets the DataUrl format of the layer used by QGIS Server in GetCapabilities request.
|
|
void | setFlags (QgsMapLayer::LayerFlags flags) |
| Returns the flags for this layer.
|
|
void | setKeywordList (const QString &keywords) |
| Sets the keyword list of the layer used by QGIS Server in GetCapabilities request.
|
|
virtual void | setLayerOrder (const QStringList &layers) |
| Reorders the previously selected sublayers of this layer from bottom to top.
|
|
void | setLegend (QgsMapLayerLegend *legend) |
| Assign a legend controller to the map layer.
|
|
void | setLegendPlaceholderImage (const QString &imgPath) |
| Set placeholder image for legend.
|
|
void | setLegendUrl (const QString &legendUrl) |
| Sets the URL for the layer's legend.
|
|
void | setLegendUrlFormat (const QString &legendUrlFormat) |
| Sets the format for a URL based layer legend.
|
|
void | setMapTipsEnabled (bool enabled) |
| Enable or disable map tips for this layer.
|
|
void | setMapTipTemplate (const QString &mapTipTemplate) |
| The mapTip is a pretty, html representation for feature information.
|
|
virtual void | setMetadata (const QgsLayerMetadata &metadata) |
| Sets the layer's metadata store.
|
|
Q_DECL_DEPRECATED void | setMetadataUrl (const QString &metaUrl) |
| Sets the metadata URL of the layer used by QGIS Server in GetCapabilities request.
|
|
Q_DECL_DEPRECATED void | setMetadataUrlFormat (const QString &metaUrlFormat) |
| Sets the metadata format of the layer used by QGIS Server in GetCapabilities request.
|
|
Q_DECL_DEPRECATED void | setMetadataUrlType (const QString &metaUrlType) |
| Set the metadata type of the layer used by QGIS Server in GetCapabilities request MetadataUrlType indicates the standard to which the metadata complies.
|
|
void | setName (const QString &name) |
| Set the display name of the layer.
|
|
virtual void | setOpacity (double opacity) |
| Sets the opacity for the layer, where opacity is a value between 0 (totally transparent) and 1.0 (fully opaque).
|
|
void | setOriginalXmlProperties (const QString &originalXmlProperties) |
| Sets the original XML properties for the layer to originalXmlProperties.
|
|
void | setRenderer3D (QgsAbstract3DRenderer *renderer) |
| Sets 3D renderer for the layer.
|
|
void | setShortName (const QString &shortName) |
| Sets the short name of the layer used by QGIS Server to identify the layer.
|
|
virtual void | setSubLayerVisibility (const QString &name, bool visible) |
| Set the visibility of the given sublayer name.
|
|
void | setTitle (const QString &title) |
| Sets the title of the layer used by QGIS Server in GetCapabilities request.
|
|
QString | shortName () const |
| Returns the short name of the layer used by QGIS Server to identify the layer.
|
|
QString | source () const |
| Returns the source for the layer.
|
|
QgsMapLayerStyleManager * | styleManager () const |
| Gets access to the layer's style manager.
|
|
virtual QString | styleURI () const |
| Retrieve the style URI for this layer (either as a .qml file on disk or as a record in the users style table in their personal qgis.db)
|
|
virtual QStringList | subLayers () const |
| Returns the sublayers of this layer.
|
|
virtual QDateTime | timestamp () const |
| Time stamp of data source in the moment when data/metadata were loaded by provider.
|
|
QString | title () const |
| Returns the title of the layer used by QGIS Server in GetCapabilities request.
|
|
QgsCoordinateTransformContext | transformContext () const |
| Returns the layer data provider coordinate transform context or a default transform context if the layer does not have a valid data provider.
|
|
Qgis::LayerType | type () const |
| Returns the type of the layer.
|
|
QUndoStack * | undoStack () |
| Returns pointer to layer's undo stack.
|
|
QUndoStack * | undoStackStyles () |
| Returns pointer to layer's style undo stack.
|
|
QgsRectangle | wgs84Extent (bool forceRecalculate=false) const |
| Returns the WGS84 extent (EPSG:4326) of the layer according to ReadFlag::FlagTrustLayerMetadata.
|
|
bool | writeLayerXml (QDomElement &layerElement, QDomDocument &document, const QgsReadWriteContext &context) const |
| Stores state in DOM node.
|
|
virtual bool | writeStyle (QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) const |
| Write just the symbology information for the layer into the document.
|
|
virtual bool | writeSymbology (QDomNode &node, QDomDocument &doc, QString &errorMessage, const QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) const =0 |
| Write the style for the layer into the document provided.
|
|
virtual | ~QgsExpressionContextGenerator ()=default |
|
virtual | ~QgsExpressionContextScopeGenerator ()=default |
|
virtual | ~QgsFeatureSink ()=default |
|
virtual bool | addFeatures (QgsFeatureIterator &iterator, QgsFeatureSink::Flags flags=QgsFeatureSink::Flags()) |
| Adds all features from the specified iterator to the sink.
|
|
virtual bool | flushBuffer () |
| Flushes any internal buffer which may exist in the sink, causing any buffered features to be added to the sink's destination.
|
|
virtual QString | lastError () const |
| Returns the most recent error encountered by the sink, e.g.
|
|
virtual | ~QgsFeatureSource ()=default |
|
virtual QgsFeatureIds | allFeatureIds () const |
| Returns a list of all feature IDs for features present in the source.
|
|
virtual Qgis::SpatialIndexPresence | hasSpatialIndex () const |
| Returns an enum value representing the presence of a valid spatial index on the source, if it can be determined.
|
|
QgsVectorLayer * | materialize (const QgsFeatureRequest &request, QgsFeedback *feedback=nullptr) |
| Materializes a request (query) made against this feature source, by running it over the source and returning a new memory based vector layer containing the result.
|
|
virtual | ~QgsAbstractProfileSource () |
|
|
enum | LayerFlag { Identifiable = 1 << 0
, Removable = 1 << 1
, Searchable = 1 << 2
, Private = 1 << 3
} |
| Flags for the map layer. More...
|
|
enum | PropertyType { Style = 0
, Metadata
} |
| Maplayer has a style and a metadata property. More...
|
|
enum | ReadFlag { FlagDontResolveLayers = 1 << 0
, FlagTrustLayerMetadata = 1 << 1
, FlagReadExtentFromXml = 1 << 2
, FlagForceReadOnly = 1 << 3
} |
| Flags which control project read behavior. More...
|
|
enum | StyleCategory {
LayerConfiguration = 1 << 0
, Symbology = 1 << 1
, Symbology3D = 1 << 2
, Labeling = 1 << 3
,
Fields = 1 << 4
, Forms = 1 << 5
, Actions = 1 << 6
, MapTips = 1 << 7
,
Diagrams = 1 << 8
, AttributeTable = 1 << 9
, Rendering = 1 << 10
, CustomProperties = 1 << 11
,
GeometryOptions = 1 << 12
, Relations = 1 << 13
, Temporal = 1 << 14
, Legend = 1 << 15
,
Elevation = 1 << 16
, Notes = 1 << 17
, AllStyleCategories
} |
| Categories of style to distinguish appropriate sections for import/export. More...
|
|
enum | Flag { FastInsert = 1 << 1
, RollBackOnErrors = 1 << 2
} |
| Flags controlling how features are added to a sink. More...
|
|
enum | SinkFlag { RegeneratePrimaryKey = 1 << 1
} |
| Flags that can be set on a QgsFeatureSink. More...
|
|
bool | accept (QgsStyleEntityVisitorInterface *visitor) const override |
|
Q_INVOKABLE void | deselect (const QgsFeatureIds &featureIds) |
| Deselects features by their ID.
|
|
void | deselect (QgsFeatureId featureId) |
| Deselects feature by its ID.
|
|
Qgis::SpatialIndexPresence | hasSpatialIndex () const override |
|
Q_INVOKABLE void | removeSelection () |
| Clear selection.
|
|
void | reselect () |
| Reselects the previous set of selected features.
|
|
Q_INVOKABLE void | select (const QgsFeatureIds &featureIds) |
| Selects features by their ID.
|
|
void | select (QgsFeatureId featureId) |
| Selects feature by its ID.
|
|
virtual void | setTransformContext (const QgsCoordinateTransformContext &transformContext) override |
| Sets the coordinate transform context to transformContext.
|
|
Q_INVOKABLE bool | startEditing () |
| Makes the layer editable.
|
|
virtual void | updateExtents (bool force=false) |
| Update the extents for the layer.
|
|
void | emitStyleChanged () |
| Triggers an emission of the styleChanged() signal.
|
|
QgsProject * | project () const |
| Returns the parent project if this map layer is added to a project.
|
|
void | setMaximumScale (double scale) |
| Sets the maximum map scale (i.e.
|
|
void | setMinimumScale (double scale) |
| Sets the minimum map scale (i.e.
|
|
void | setRefreshOnNofifyMessage (const QString &message) |
| Set the notification message that triggers repaint If refresh on notification is enabled, the notification will triggerRepaint only if the notification message is equal to.
|
|
void | setRefreshOnNotifyEnabled (bool enabled) |
| Set whether provider notification is connected to triggerRepaint.
|
|
void | setScaleBasedVisibility (bool enabled) |
| Sets whether scale based visibility is enabled for the layer.
|
|
virtual void | setTransformContext (const QgsCoordinateTransformContext &transformContext)=0 |
| Sets the coordinate transform context to transformContext.
|
|
void | trigger3DUpdate () |
| Will advise any 3D maps that this layer requires to be updated in the scene.
|
|
void | triggerRepaint (bool deferredUpdate=false) |
| Will advise the map canvas (and any other interested party) that this layer requires to be repainted.
|
|
void | afterCommitChanges () |
| Emitted after changes are committed to the data provider.
|
|
void | afterRollBack () |
| Emitted after changes are rolled back.
|
|
void | allowCommitChanged () |
| Emitted whenever the allowCommitChanged() property of this layer changes.
|
|
void | attributeAdded (int idx) |
| Will be emitted, when a new attribute has been added to this vector layer.
|
|
void | attributeDeleted (int idx) |
| Will be emitted, when an attribute has been deleted from this vector layer.
|
|
void | attributeValueChanged (QgsFeatureId fid, int idx, const QVariant &value) |
| Emitted whenever an attribute value change is done in the edit buffer.
|
|
void | beforeAddingExpressionField (const QString &fieldName) |
| Will be emitted, when an expression field is going to be added to this vector layer.
|
|
void | beforeCommitChanges (bool stopEditing) |
| Emitted before changes are committed to the data provider.
|
|
void | beforeEditingStarted () |
| Emitted before editing on this layer is started.
|
|
void | beforeModifiedCheck () const |
| Emitted when the layer is checked for modifications. Use for last-minute additions.
|
|
void | beforeRemovingExpressionField (int idx) |
| Will be emitted, when an expression field is going to be deleted from this vector layer.
|
|
void | beforeRollBack () |
| Emitted before changes are rolled back.
|
|
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 | committedAttributeValuesChanges (const QString &layerId, const QgsChangedAttributesMap &changedAttributesValues) |
| Emitted when attribute value changes are saved to the provider if not in transaction mode.
|
|
void | committedFeaturesAdded (const QString &layerId, const QgsFeatureList &addedFeatures) |
| Emitted when features are added to the provider if not in transaction mode.
|
|
void | committedFeaturesRemoved (const QString &layerId, const QgsFeatureIds &deletedFeatureIds) |
| Emitted when features are deleted from the provider if not in transaction mode.
|
|
void | committedGeometriesChanges (const QString &layerId, const QgsGeometryMap &changedGeometries) |
| Emitted when geometry changes are saved to the provider if not in transaction mode.
|
|
void | displayExpressionChanged () |
| Emitted when the display expression changes.
|
|
void | editCommandDestroyed () |
| Signal emitted, when an edit command is destroyed.
|
|
void | editCommandEnded () |
| Signal emitted, when an edit command successfully ended.
|
|
void | editCommandStarted (const QString &text) |
| Signal emitted when a new edit command has been started.
|
|
void | editFormConfigChanged () |
| Will be emitted whenever the edit form configuration of this layer changes.
|
|
void | featureAdded (QgsFeatureId fid) |
| Emitted when a new feature has been added to the layer.
|
|
void | featureBlendModeChanged (QPainter::CompositionMode blendMode) |
| Signal emitted when setFeatureBlendMode() is called.
|
|
void | featureDeleted (QgsFeatureId fid) |
| Emitted when a feature has been deleted.
|
|
void | featuresDeleted (const QgsFeatureIds &fids) |
| Emitted when features have been deleted.
|
|
void | geometryChanged (QgsFeatureId fid, const QgsGeometry &geometry) |
| Emitted whenever a geometry change is done in the edit buffer.
|
|
void | labelingFontNotFound (QgsVectorLayer *layer, const QString &fontfamily) |
| Emitted when the font family defined for labeling layer is not found on system.
|
|
void | raiseError (const QString &msg) |
| Signals an error related to this vector layer.
|
|
void | readCustomSymbology (const QDomElement &element, QString &errorMessage) |
| Signal emitted whenever the symbology (QML-file) for this layer is being read.
|
|
void | readOnlyChanged () |
| Emitted when the read only state of this layer is changed.
|
|
void | selectionChanged (const QgsFeatureIds &selected, const QgsFeatureIds &deselected, bool clearAndSelect) |
| Emitted when selection was changed.
|
|
void | subsetStringChanged () |
| Emitted when the layer's subset string has changed.
|
|
void | supportsEditingChanged () |
| Emitted when the read only state or the data provider of this layer is changed.
|
|
void | symbolFeatureCountMapChanged () |
| Emitted when the feature count for symbols on this layer has been recalculated.
|
|
void | updatedFields () |
| Emitted whenever the fields available from this layer have been changed.
|
|
void | writeCustomSymbology (QDomElement &element, QDomDocument &doc, QString &errorMessage) const |
| Signal emitted whenever the symbology (QML-file) for this layer is being written.
|
|
void | autoRefreshIntervalChanged (int interval) |
| Emitted when the auto refresh interval changes.
|
|
void | beforeResolveReferences (QgsProject *project) |
| Emitted when all layers are loaded and references can be resolved, just before the references of this layer are resolved.
|
|
void | blendModeChanged (QPainter::CompositionMode blendMode) |
| Signal emitted when the blend mode is changed, through QgsMapLayer::setBlendMode()
|
|
void | configChanged () |
| Emitted whenever the configuration is changed.
|
|
void | crsChanged () |
| Emit a signal that layer's CRS has been reset.
|
|
void | customPropertyChanged (const QString &key) |
| Emitted when a custom property of the layer has been changed or removed.
|
|
void | dataChanged () |
| Data of layer changed.
|
|
void | dataSourceChanged () |
| Emitted whenever the layer's data source has been changed.
|
|
void | dependenciesChanged () |
| Emitted when dependencies are changed.
|
|
void | editingStarted () |
| Emitted when editing on this layer has started.
|
|
void | editingStopped () |
| Emitted when edited changes have been successfully written to the data provider.
|
|
void | flagsChanged () |
| Emitted when layer's flags have been modified.
|
|
void | isValidChanged () |
| Emitted when the validity of this layer changed.
|
|
void | layerModified () |
| Emitted when modifications has been done on layer.
|
|
void | legendChanged () |
| Signal emitted when legend of the layer has changed.
|
|
void | mapTipsEnabledChanged () |
| Emitted when map tips are enabled or disabled for the layer.
|
|
void | mapTipTemplateChanged () |
| Emitted when the map tip template changes.
|
|
void | metadataChanged () |
| Emitted when the layer's metadata is changed.
|
|
void | nameChanged () |
| Emitted when the name has been changed.
|
|
void | opacityChanged (double opacity) |
| Emitted when the layer's opacity is changed, where opacity is a value between 0 (transparent) and 1 (opaque).
|
|
void | recalculateExtents () const |
| This is used to send a request that any mapcanvas using this layer update its extents.
|
|
void | renderer3DChanged () |
| Signal emitted when 3D renderer associated with the layer has changed.
|
|
void | rendererChanged () |
| Signal emitted when renderer is changed.
|
|
void | repaintRequested (bool deferredUpdate=false) |
| By emitting this signal the layer tells that either appearance or content have been changed and any view showing the rendered layer should refresh itself.
|
|
void | request3DUpdate () |
| Signal emitted when a layer requires an update in any 3D maps.
|
|
void | statusChanged (const QString &status) |
| Emit a signal with status (e.g. to be caught by QgisApp and display a msg on status bar)
|
|
void | styleChanged () |
| Signal emitted whenever a change affects the layer's style.
|
|
void | styleLoaded (QgsMapLayer::StyleCategories categories) |
| Emitted when a style has been loaded.
|
|
void | willBeDeleted () |
| Emitted in the destructor when the layer is about to be deleted, but it is still in a perfectly valid state: the last chance for other pieces of code for some cleanup if they use the layer.
|
|
static const QgsSettingsEntryEnumFlag< QgsVectorSimplifyMethod::SimplifyAlgorithm > * | settingsSimplifyAlgorithm = new QgsSettingsEntryEnumFlag<QgsVectorSimplifyMethod::SimplifyAlgorithm>( QStringLiteral( "simplifyAlgorithm" ), QgsSettingsTree::sTreeQgis, QgsVectorSimplifyMethod::SimplifyAlgorithm::Distance ) |
|
static const QgsSettingsEntryEnumFlag< QgsVectorSimplifyMethod::SimplifyHints > * | settingsSimplifyDrawingHints = new QgsSettingsEntryEnumFlag<QgsVectorSimplifyMethod::SimplifyHints>( QStringLiteral( "simplifyDrawingHints" ), QgsSettingsTree::sTreeQgis, QgsVectorSimplifyMethod::SimplifyHint::NoSimplification ) |
|
static const QgsSettingsEntryDouble * | settingsSimplifyDrawingTol = new QgsSettingsEntryDouble( QStringLiteral( "simplifyDrawingTol" ), QgsSettingsTree::sTreeQgis, Qgis::DEFAULT_MAPTOPIXEL_THRESHOLD ) |
|
static const QgsSettingsEntryBool * | settingsSimplifyLocal = new QgsSettingsEntryBool( QStringLiteral( "simplifyLocal" ), QgsSettingsTree::sTreeQgis, true ) |
|
static const QgsSettingsEntryDouble * | settingsSimplifyMaxScale = new QgsSettingsEntryDouble( QStringLiteral( "simplifyMaxScale" ), QgsSettingsTree::sTreeQgis, 1.0 ) |
|
void | setExtent (const QgsRectangle &rect) FINAL |
| Sets the extent.
|
|
void | setExtent3D (const QgsBox3D &rect) FINAL |
| Sets the extent.
|
|
void | appendError (const QgsErrorMessage &error) |
| Add error message.
|
|
void | clone (QgsMapLayer *layer) const |
| Copies attributes like name, short name, ... into another layer.
|
|
QString | crsHtmlMetadata () const |
| Returns a HTML fragment containing the layer's CRS metadata, for use in the htmlMetadata() method.
|
|
QString | generalHtmlMetadata () const |
| Returns an HTML fragment containing general metadata information, for use in the htmlMetadata() method.
|
|
Q_DECL_DEPRECATED bool | hasDependencyCycle (const QSet< QgsMapLayerDependency > &) const |
| Checks whether a new set of dependencies will introduce a cycle this method is now deprecated and always return false , because circular dependencies are now correctly managed.
|
|
void | invalidateWgs84Extent () |
| Invalidates the WGS84 extent.
|
|
void | readCommonStyle (const QDomElement &layerElement, const QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) |
| Read style data common to all layer types.
|
|
void | readCustomProperties (const QDomNode &layerNode, const QString &keyStartsWith=QString()) |
| Read custom properties from project file.
|
|
void | readStyleManager (const QDomNode &layerNode) |
| Read style manager's configuration (if any). To be called by subclasses.
|
|
void | setError (const QgsError &error) |
| Sets error message.
|
|
void | setProviderType (const QString &providerType) |
| Sets the providerType (provider key)
|
|
void | setValid (bool valid) |
| Sets whether layer is valid or not.
|
|
void | writeCommonStyle (QDomElement &layerElement, QDomDocument &document, const QgsReadWriteContext &context, StyleCategories categories=AllStyleCategories) const |
| Write style data common to all layer types.
|
|
void | writeCustomProperties (QDomNode &layerNode, QDomDocument &doc) const |
| Write custom properties to project file.
|
|
void | writeStyleManager (QDomNode &layerNode, QDomDocument &doc) const |
| Write style manager's configuration (if exists). To be called by subclasses.
|
|
QString | mAbstract |
| Description of the layer.
|
|
QString | mAttribution |
| Attribution of the layer.
|
|
QString | mAttributionUrl |
|
int | mBlockStyleChangedSignal = 0 |
| If non-zero, the styleChanged signal should not be emitted.
|
|
QString | mDataSource |
| Data source description string, varies by layer type.
|
|
QString | mDataUrl |
| DataUrl of the layer.
|
|
QString | mDataUrlFormat |
|
QSet< QgsMapLayerDependency > | mDependencies |
| List of layers that may modify this layer on modification.
|
|
QgsError | mError |
| Error.
|
|
bool | mIsRefreshOnNofifyEnabled = false |
|
QString | mKeywordList |
|
QString | mLayerName |
| Name of the layer - used for display.
|
|
double | mLayerOpacity = 1.0 |
| Layer opacity.
|
|
QString | mLegendUrl |
| WMS legend.
|
|
QString | mLegendUrlFormat |
|
std::unique_ptr< QgsDataProvider > | mPreloadedProvider |
| Optionally used when loading a project, it is released when the layer is effectively created.
|
|
QString | mProviderKey |
| Data provider key (name of the data provider)
|
|
QgsMapLayer::ReadFlags | mReadFlags = QgsMapLayer::ReadFlags() |
| Read flags. It's up to the subclass to respect these when restoring state from XML.
|
|
QString | mRefreshOnNofifyMessage |
|
QString | mShortName |
|
bool | mShouldValidateCrs = true |
| true if the layer's CRS should be validated and invalid CRSes are not permitted.
|
|
QString | mTitle |
|
bool | mValid = false |
| Indicates if the layer is valid and can be drawn.
|
|
QString | displayExpression |
|
QgsEditFormConfig | editFormConfig |
|
bool | readOnly |
|
QString | subsetString |
|
bool | supportsEditing |
|
int | autoRefreshInterval |
|
QgsCoordinateReferenceSystem | crs |
|
bool | isValid |
|
bool | mapTipsEnabled |
|
QString | mapTipTemplate |
|
QgsLayerMetadata | metadata |
|
QString | name |
|
double | opacity |
|
Qgis::LayerType | type |
|