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;
247 QString name()
const;
274 QString referencingLayerId()
const;
289 QString referencedLayerId()
const;
306 QList< QgsRelation::FieldPair > fieldPairs()
const;
308 QMap< QString, QString > fieldPairs()
const;
310 const QList< QgsRelation::FieldPair > &pairs = sipCpp->fieldPairs();
311 sipRes =
new QMap< QString, QString >();
314 sipRes->insert( pair.first, pair.second );
339 bool referencingFieldsAllowNull()
const;
349 bool isValid()
const;
359 QString validationError()
const;
367 bool hasEqualDefinition(
const QgsRelation &other )
const;
373 Q_INVOKABLE QString resolveReferencedField(
const QString &referencingField )
const;
379 Q_INVOKABLE QString resolveReferencingField(
const QString &referencedField )
const;
387 void updateRelationStatus();
393 void setPolymorphicRelationId(
const QString &polymorphicRelationId );
399 QString polymorphicRelationId()
const;
429 mutable QExplicitlySharedDataPointer<QgsRelationPrivate> d;
The class is used as a container of context for various read/write operations on other objects.