16 #ifndef QGSVECTORLAYERUTILS_H
17 #define QGSVECTORLAYERUTILS_H
19 #include "qgis_core.h"
58 QList<QgsVectorLayer *> layers()
const;
68 QMap<QgsVectorLayer *, QgsFeatureIds> mDuplicatedFeatures;
131 static QList< QVariant > getValues(
const QgsVectorLayer *layer,
const QString &fieldOrExpression,
bool &ok,
bool selectedOnly =
false,
QgsFeedback *feedback =
nullptr );
146 static QList< double > getDoubleValues(
const QgsVectorLayer *layer,
const QString &fieldOrExpression,
bool &ok,
bool selectedOnly =
false,
int *nullCount =
nullptr,
QgsFeedback *feedback =
nullptr );
161 static QVariant createUniqueValue(
const QgsVectorLayer *layer,
int fieldIndex,
const QVariant &seed = QVariant() );
169 static QVariant createUniqueValueFromCache(
const QgsVectorLayer *layer,
int fieldIndex,
const QSet<QVariant> &existingValues,
const QVariant &seed = QVariant() );
231 static std::unique_ptr<QgsVectorLayerFeatureSource> getFeatureSource( QPointer<QgsVectorLayer> layer,
QgsFeedback *feedback =
nullptr )
SIP_SKIP;
319 static
bool fieldIsReadOnly( const
QgsVectorLayer *layer,
int fieldIndex );
330 static
bool fieldEditabilityDependsOnFeature( const
QgsVectorLayer *layer,
int fieldIndex );
364 IgnoreAuxiliaryLayers = 1 << 1,
366 Q_DECLARE_FLAGS( CascadedFeatureFlags, CascadedFeatureFlag )
374 static bool impactsCascadeFeatures(
const QgsVectorLayer *layer,
const QgsFeatureIds &fids,
const QgsProject *project, QgsDuplicateFeatureContext &context
SIP_OUT, QgsVectorLayerUtils::CascadedFeatureFlags flags = QgsVectorLayerUtils::CascadedFeatureFlags() );
387 static QString guessFriendlyIdentifierField(
const QgsFields &fields );
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Wrapper for iterator of features from vector data provider or vector layer.
An interface for objects which accept features via addFeature(s) methods.
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.
@ ConstraintStrengthNotSet
Constraint is not set.
ConstraintOrigin
Origin of constraints.
@ ConstraintOriginNotSet
Constraint is not set.
Container of fields for a vector layer.
A geometry is the spatial representation of a feature.
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
We may need stable references to symbol layers, when pointers to symbol layers is not usable (when a ...
Contains mainly the QMap with QgsVectorLayer and QgsFeatureIds do list all the duplicated features.
QgsDuplicateFeatureContext()=default
Constructor for QgsDuplicateFeatureContext.
Encapsulate geometry and attributes for new features, to be passed to createFeatures.
Contains utility methods for working with QgsVectorLayers.
QList< QgsVectorLayerUtils::QgsFeatureData > QgsFeaturesDataList
Alias for list of QgsFeatureData.
CascadedFeatureFlag
Flags that can be used when determining cascaded features.
Represents a vector layer which manages a vector based data sets.
QMap< int, QVariant > QgsAttributeMap
QList< QgsFeature > QgsFeatureList
QSet< QgsFeatureId > QgsFeatureIds