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 );
148 void setReferencingLayer(
const QString &
id );
153 void setReferencedLayer(
const QString &
id );
163 void addFieldPair(
const QString &referencingField,
const QString &referencedField );
208 QString getRelatedFeaturesFilter(
const QgsFeature &feature )
const;
247 QString name()
const;
276 QString referencingLayerId()
const;
291 QString referencedLayerId()
const;
308 QList< QgsRelation::FieldPair > fieldPairs()
const;
310 QMap< QString, QString > fieldPairs()
const;
312 const QList< QgsRelation::FieldPair > &pairs = sipCpp->fieldPairs();
313 sipRes =
new QMap< QString, QString >();
316 sipRes->insert( pair.first, pair.second );
345 bool isValid()
const;
355 QString validationError()
const;
364 bool hasEqualDefinition(
const QgsRelation &other )
const;
371 Q_INVOKABLE QString resolveReferencedField(
const QString &referencingField )
const;
378 Q_INVOKABLE QString resolveReferencingField(
const QString &referencedField )
const;
386 void updateRelationStatus();
392 void setPolymorphicRelationId(
const QString &polymorphicRelationId );
398 QString polymorphicRelationId()
const;
428 mutable QExplicitlySharedDataPointer<QgsRelationPrivate> d;
The class is used as a container of context for various read/write operations on other objects.