45 Q_PROPERTY( QString
id READ
id WRITE setId )
48 Q_PROPERTY( QString name READ name WRITE setName )
49 Q_PROPERTY(
bool isValid READ isValid )
50 Q_PROPERTY( QString polymorphicRelationId READ polymorphicRelationId WRITE setPolymorphicRelationId )
73 FieldPair(
const QString &referencingField,
const QString &referencedField )
74 : QPair< QString, QString >( referencingField, referencedField ) {}
81 bool operator==(
const FieldPair &other )
const {
return first == other.first && second == other.second; }
127 void writeXml( QDomNode &node, QDomDocument &doc )
const;
132 void setId(
const QString &
id );
137 void setName(
const QString &name );
147 void setReferencingLayer(
const QString &
id );
152 void setReferencedLayer(
const QString &
id );
162 void addFieldPair(
const QString &referencingField,
const QString &referencedField );
206 QString getRelatedFeaturesFilter(
const QgsFeature &feature )
const;
245 QString name()
const;
272 QString referencingLayerId()
const;
287 QString referencedLayerId()
const;
304 QList< QgsRelation::FieldPair > fieldPairs()
const;
306 QMap< QString, QString > fieldPairs()
const;
308 const QList< QgsRelation::FieldPair > &pairs = sipCpp->fieldPairs();
309 sipRes =
new QMap< QString, QString >();
312 sipRes->insert( pair.first, pair.second );
341 bool isValid()
const;
351 QString validationError()
const;
359 bool hasEqualDefinition(
const QgsRelation &other )
const;
365 Q_INVOKABLE QString resolveReferencedField(
const QString &referencingField )
const;
371 Q_INVOKABLE QString resolveReferencingField(
const QString &referencedField )
const;
379 void updateRelationStatus();
385 void setPolymorphicRelationId(
const QString &polymorphicRelationId );
391 QString polymorphicRelationId()
const;
421 mutable QExplicitlySharedDataPointer<QgsRelationPrivate> d;
The class is used as a container of context for various read/write operations on other objects.