|
| QgsRelation () |
| Default constructor. More...
|
|
| QgsRelation (const QgsRelation &other) |
| Copies a relation. More...
|
|
| QgsRelation (const QgsRelationContext &context) |
| Constructor with context. More...
|
|
| ~QgsRelation () |
|
void | addFieldPair (const FieldPair &fieldPair) |
| Add a field pair which is part of this relation The first element of each pair are the field names of the foreign key. More...
|
|
void | addFieldPair (const QString &referencingField, const QString &referencedField) |
| Add a field pair which is part of this relation The first element of each pair are the field names of the foreign key. More...
|
|
QList< QgsRelation::FieldPair > | fieldPairs () const |
| Returns the field pairs which form this relation The first element of each pair are the field names of the foreign key. More...
|
|
void | generateId () |
| Generate a (project-wide) unique id for this relation. More...
|
|
QgsFeature | getReferencedFeature (const QgsFeature &feature) const |
| Creates a request to return the feature on the referenced (parent) layer which is referenced by the provided feature. More...
|
|
QgsFeatureRequest | getReferencedFeatureRequest (const QgsAttributes &attributes) const |
| Creates a request to return the feature on the referenced (parent) layer which is referenced by the provided feature. More...
|
|
QgsFeatureRequest | getReferencedFeatureRequest (const QgsFeature &feature) const |
| Creates a request to return the feature on the referenced (parent) layer which is referenced by the provided feature. More...
|
|
QgsFeatureIterator | getRelatedFeatures (const QgsFeature &feature) const |
| Creates an iterator which returns all the features on the referencing (child) layer which have a foreign key pointing to the provided feature. More...
|
|
QString | getRelatedFeaturesFilter (const QgsFeature &feature) const |
| Returns a filter expression which returns all the features on the referencing (child) layer which have a foreign key pointing to the provided feature. More...
|
|
QgsFeatureRequest | getRelatedFeaturesRequest (const QgsFeature &feature) const |
| Creates a request to return all the features on the referencing (child) layer which have a foreign key pointing to the provided feature. More...
|
|
bool | hasEqualDefinition (const QgsRelation &other) const |
| Compares the two QgsRelation, ignoring the name and the ID. More...
|
|
QString | id () const |
| A (project-wide) unique id for this relation. More...
|
|
bool | isValid () const |
| Returns the validity of this relation. More...
|
|
QString | name () const |
| Returns a human readable name for this relation. More...
|
|
QgsRelation & | operator= (const QgsRelation &other) |
| Copies a relation. More...
|
|
QgsPolymorphicRelation | polymorphicRelation () const |
| Returns the parent polymorphic relation. More...
|
|
QString | polymorphicRelationId () const |
| Returns the parent polymorphic relation id. More...
|
|
QgsAttributeList | referencedFields () const |
| Returns a list of attributes used to form the referenced fields (most likely primary key) on the referenced (parent) layer. More...
|
|
QgsVectorLayer * | referencedLayer () const |
| Access the referenced (parent) layer. More...
|
|
QString | referencedLayerId () const |
| Access the referenced (parent) layer's id. More...
|
|
QgsAttributeList | referencingFields () const |
| Returns a list of attributes used to form the referencing fields (foreign key) on the referencing (child) layer. More...
|
|
QgsVectorLayer * | referencingLayer () const |
| Access the referencing (child) layer This is the layer which has the field(s) which point to another layer. More...
|
|
QString | referencingLayerId () const |
| Access the referencing (child) layer's id This is the layer which has the field(s) which point to another layer. More...
|
|
Q_INVOKABLE QString | resolveReferencedField (const QString &referencingField) const |
| Gets the referenced field counterpart given a referencing field. More...
|
|
Q_INVOKABLE QString | resolveReferencingField (const QString &referencedField) const |
| Gets the referencing field counterpart given a referenced field. More...
|
|
void | setId (const QString &id) |
| Set an id for this relation. More...
|
|
void | setName (const QString &name) |
| Set a name for this relation. More...
|
|
void | setPolymorphicRelationId (const QString &polymorphicRelationId) |
| Sets the parent polymorphic relation id. More...
|
|
void | setReferencedLayer (const QString &id) |
| Set the referenced (parent) layer id. More...
|
|
void | setReferencingLayer (const QString &id) |
| Set the referencing (child) layer id. More...
|
|
void | setStrength (Qgis::RelationshipStrength strength) |
| Set a strength for this relation. More...
|
|
Qgis::RelationshipStrength | strength () const |
| Returns the relation strength as a string. More...
|
|
Qgis::RelationshipType | type () const |
| Returns the type of the relation. More...
|
|
void | updateRelationStatus () |
| Updates the validity status of this relation. More...
|
|
QString | validationError () const |
| Returns a user-friendly explanation for why the relationship is invalid. More...
|
|
void | writeXml (QDomNode &node, QDomDocument &doc) const |
| Writes a relation to an XML structure. More...
|
|