|
static QgsFeature | createFeature (const QgsVectorLayer *layer, const QgsGeometry &geometry=QgsGeometry(), const QgsAttributeMap &attributes=QgsAttributeMap(), QgsExpressionContext *context=nullptr) |
| Creates a new feature ready for insertion into a layer. More...
|
|
static QgsFeatureList | createFeatures (const QgsVectorLayer *layer, const QgsFeaturesDataList &featuresData, QgsExpressionContext *context=nullptr) |
| Creates a set of new features ready for insertion into a layer. More...
|
|
static QVariant | createUniqueValue (const QgsVectorLayer *layer, int fieldIndex, const QVariant &seed=QVariant()) |
| Returns a new attribute value for the specified field index which is guaranteed to be unique. More...
|
|
static QVariant | createUniqueValueFromCache (const QgsVectorLayer *layer, int fieldIndex, const QSet< QVariant > &existingValues, const QVariant &seed=QVariant()) |
| Returns a new attribute value for the specified field index which is guaranteed to be unique within regard to existingValues. More...
|
|
static QgsFeature | duplicateFeature (QgsVectorLayer *layer, const QgsFeature &feature, QgsProject *project, QgsDuplicateFeatureContext &duplicateFeatureContext, const int maxDepth=0, int depth=0, QList< QgsVectorLayer * > referencedLayersBranch=QList< QgsVectorLayer * >()) |
| Duplicates a feature and it's children (one level deep). More...
|
|
static bool | fieldEditabilityDependsOnFeature (const QgsVectorLayer *layer, int fieldIndex) |
| Returns true if the editability of the field at index fieldIndex from layer may vary feature by feature. More...
|
|
static bool | fieldIsEditable (const QgsVectorLayer *layer, int fieldIndex, const QgsFeature &feature) |
| Tests whether a field is editable for a particular feature. More...
|
|
static bool | fieldIsReadOnly (const QgsVectorLayer *layer, int fieldIndex) |
|
static QList< double > | getDoubleValues (const QgsVectorLayer *layer, const QString &fieldOrExpression, bool &ok, bool selectedOnly=false, int *nullCount=nullptr, QgsFeedback *feedback=nullptr) |
| Fetches all double values from a specified field name or expression. More...
|
|
static QString | getFeatureDisplayString (const QgsVectorLayer *layer, const QgsFeature &feature) |
|
static std::unique_ptr< QgsVectorLayerFeatureSource > | getFeatureSource (QPointer< QgsVectorLayer > layer, QgsFeedback *feedback=nullptr) |
| Gets the feature source from a QgsVectorLayer pointer. More...
|
|
static QList< QVariant > | getValues (const QgsVectorLayer *layer, const QString &fieldOrExpression, bool &ok, bool selectedOnly=false, QgsFeedback *feedback=nullptr) |
| Fetches all values from a specified field name or expression. More...
|
|
static QgsFeatureIterator | getValuesIterator (const QgsVectorLayer *layer, const QString &fieldOrExpression, bool &ok, bool selectedOnly) |
| Create a feature iterator for a specified field name or expression. More...
|
|
static QString | guessFriendlyIdentifierField (const QgsFields &fields, bool *foundFriendly=nullptr) |
| Given a set of fields, attempts to pick the "most useful" field for user-friendly identification of features. More...
|
|
static bool | impactsCascadeFeatures (const QgsVectorLayer *layer, const QgsFeatureIds &fids, const QgsProject *project, QgsDuplicateFeatureContext &context, QgsVectorLayerUtils::CascadedFeatureFlags flags=QgsVectorLayerUtils::CascadedFeatureFlags()) |
|
static QHash< QString, QgsMaskedLayers > | labelMasks (const QgsVectorLayer *) |
| Returns masks defined in labeling options of a layer. More...
|
|
static QgsFeatureList | makeFeatureCompatible (const QgsFeature &feature, const QgsVectorLayer *layer, QgsFeatureSink::SinkFlags sinkFlags=QgsFeatureSink::SinkFlags()) |
| Converts input feature to be compatible with the given layer. More...
|
|
static QgsFeatureList | makeFeaturesCompatible (const QgsFeatureList &features, const QgsVectorLayer *layer, QgsFeatureSink::SinkFlags sinkFlags=QgsFeatureSink::SinkFlags()) |
| Converts input features to be compatible with the given layer. More...
|
|
static void | matchAttributesToFields (QgsFeature &feature, const QgsFields &fields) |
| Matches the attributes in feature to the specified fields. More...
|
|
static QgsMaskedLayers | symbolLayerMasks (const QgsVectorLayer *) |
| Returns all masks that may be defined on symbol layers for a given vector layer. More...
|
|
static bool | validateAttribute (const QgsVectorLayer *layer, const QgsFeature &feature, int attributeIndex, QStringList &errors, QgsFieldConstraints::ConstraintStrength strength=QgsFieldConstraints::ConstraintStrengthNotSet, QgsFieldConstraints::ConstraintOrigin origin=QgsFieldConstraints::ConstraintOriginNotSet) |
| Tests a feature attribute value to check whether it passes all constraints which are present on the corresponding field. More...
|
|
static bool | valueExists (const QgsVectorLayer *layer, int fieldIndex, const QVariant &value, const QgsFeatureIds &ignoreIds=QgsFeatureIds()) |
| Returns true if the specified value already exists within a field. More...
|
|