16#ifndef QGSVECTORLAYERUTILS_H
17#define QGSVECTORLAYERUTILS_H
73 QList<QgsVectorLayer *> layers()
const;
83 QMap<QgsVectorLayer *, QgsFeatureIds> mDuplicatedFeatures;
146 static QList< QVariant > getValues(
const QgsVectorLayer *layer,
const QString &fieldOrExpression,
bool &ok,
bool selectedOnly =
false,
QgsFeedback *feedback =
nullptr );
161 static QList< double > getDoubleValues(
const QgsVectorLayer *layer,
const QString &fieldOrExpression,
bool &ok,
bool selectedOnly =
false,
int *nullCount =
nullptr,
QgsFeedback *feedback =
nullptr );
176 static QVariant createUniqueValue(
const QgsVectorLayer *layer,
int fieldIndex,
const QVariant &seed = QVariant() );
184 static QVariant createUniqueValueFromCache(
const QgsVectorLayer *layer,
int fieldIndex,
const QSet<QVariant> &existingValues,
const QVariant &seed = QVariant() );
246 static std::unique_ptr<QgsVectorLayerFeatureSource> getFeatureSource( QPointer<QgsVectorLayer> layer,
QgsFeedback *feedback =
nullptr )
SIP_SKIP;
334 static
bool fieldIsReadOnly( const
QgsVectorLayer *layer,
int fieldIndex );
345 static
bool fieldEditabilityDependsOnFeature( const
QgsVectorLayer *layer,
int fieldIndex );
379 IgnoreAuxiliaryLayers = 1 << 1,
381 Q_DECLARE_FLAGS( CascadedFeatureFlags, CascadedFeatureFlag )
389 static bool impactsCascadeFeatures(
const QgsVectorLayer *layer,
const QgsFeatureIds &fids,
const QgsProject *project, QgsDuplicateFeatureContext &context
SIP_OUT, QgsVectorLayerUtils::CascadedFeatureFlags flags = QgsVectorLayerUtils::CascadedFeatureFlags() );
433 static QString guessFriendlyIdentifierField(
const QgsFields &fields,
bool *foundFriendly
SIP_OUT =
nullptr )
SIP_PYNAME( guessFriendlyIdentifierFieldV2 );
453 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
QHash< QString, QgsMaskedLayer > QgsMaskedLayers
QSet< QgsSymbolLayerId > symbolLayerIds