61 for (
const auto &field : joinFields )
75 QStringList fieldNames;
82 for (
const QString &s : qgis::as_const( *lst ) )
85 fieldNames.append( s );
94 fieldNames.append( f.name() );
QString prefixedFieldName(const QgsField &field) const
Returns the prefixed name of the field.
void setFields(const QgsFields &fields, bool initAttributes=false)
Assign a field map with the feature to allow attribute access by attribute name.
int fieldNameIndex(const QString &fieldName) const
Utility method to get attribute index from name.
void setEditable(bool enabled)
Sets whether the form of the target layer allows editing joined fields.
QString targetFieldName() const
Returns name of the field of our layer that will be used for join.
QStringList joinFieldNamesBlackList() const
Returns the list of fields to ignore.
Container of fields for a vector layer.
bool setAttribute(int field, const QVariant &attr)
Set an attribute's value by field index.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
void setUpsertOnEdit(bool enabled)
Sets whether a feature created on the target layer has to impact the joined layer by creating a new f...
QgsFields fields() const FINAL
Returns the list of fields of this layer.
QgsFeature extractJoinedFeature(const QgsFeature &feature) const
Extract the join feature from the target feature for the current join layer information.
QStringList * joinFieldNamesSubset() const
Gets subset of fields to be used from joined layer.
void initAttributes(int fieldCount)
Initialize this feature with the given number of fields.
Defines left outer join from our vector layer to some other vector layer.
QString joinFieldName() const
Returns name of the field of joined layer that will be used for join.
static QStringList joinFieldNamesSubset(const QgsVectorLayerJoinInfo &info, bool blacklisted=true)
Returns the list of field names to use for joining considering blacklisted fields and subset...
Encapsulate a field in an attribute table or data source.
bool hasSubset(bool blacklisted=true) const
Returns true if blacklisted fields is not empty or if a subset of names has been set.
QString prefix() const
Returns prefix of fields from the joined layer. If null, joined layer's name will be used...
QVariant attribute(const QString &name) const
Lookup attribute value from attribute name.
void setCascadedDelete(bool enabled)
Sets whether a feature deleted on the target layer has to impact the joined layer by deleting the cor...
QgsVectorLayer * joinLayer() const
Returns joined layer (may be null if the reference was set by layer ID and not resolved yet) ...