47 Q_PROPERTY( QString
id READ
id WRITE setId )
50 Q_PROPERTY( QString name READ name WRITE setName )
51 Q_PROPERTY(
bool isValid READ isValid )
52 Q_PROPERTY( QString polymorphicRelationId READ polymorphicRelationId WRITE setPolymorphicRelationId )
75 FieldPair(
const QString &referencingField,
const QString &referencedField )
76 : QPair< QString, QString >( referencingField, referencedField ) {}
83 bool operator==(
const FieldPair &other )
const {
return first == other.first && second == other.second; }
129 void writeXml( QDomNode &node, QDomDocument &doc )
const;
134 void setId(
const QString &
id );
139 void setName(
const QString &name );
149 void setReferencingLayer(
const QString &
id );
154 void setReferencedLayer(
const QString &
id );
164 void addFieldPair(
const QString &referencingField,
const QString &referencedField );
208 QString getRelatedFeaturesFilter(
const QgsFeature &feature )
const;
248 QString name()
const;
275 QString referencingLayerId()
const;
290 QString referencedLayerId()
const;
307 QList< QgsRelation::FieldPair > fieldPairs()
const;
309 QMap< QString, QString > fieldPairs()
const;
311 const QList< QgsRelation::FieldPair > &pairs = sipCpp->fieldPairs();
312 sipRes =
new QMap< QString, QString >();
315 sipRes->insert( pair.first, pair.second );
340 bool referencingFieldsAllowNull()
const;
350 bool isValid()
const;
360 QString validationError()
const;
368 bool hasEqualDefinition(
const QgsRelation &other )
const;
374 Q_INVOKABLE QString resolveReferencedField(
const QString &referencingField )
const;
380 Q_INVOKABLE QString resolveReferencingField(
const QString &referencedField )
const;
388 void updateRelationStatus();
394 void setPolymorphicRelationId(
const QString &polymorphicRelationId );
400 QString polymorphicRelationId()
const;
430 mutable QExplicitlySharedDataPointer<QgsRelationPrivate> d;
The class is used as a container of context for various read/write operations on other objects.