QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
The QgsWeakRelation class represent a QgsRelation with possibly unresolved layers or unmatched fields. More...
#include <qgsweakrelation.h>
Public Member Functions | |
QgsWeakRelation (const QString &relationId, const QString &relationName, const QgsRelation::RelationStrength strength, const QString &referencingLayerId, const QString &referencingLayerName, const QString &referencingLayerSource, const QString &referencingLayerProviderKey, const QString &referencedLayerId, const QString &referencedLayerName, const QString &referencedLayerSource, const QString &referencedLayerProviderKey, const QList< QgsRelation::FieldPair > &fieldPairs) | |
Creates a QgsWeakRelation. More... | |
QList< QgsRelation::FieldPair > | fieldPairs () const |
Returns the list of field pairs. More... | |
QgsVectorLayerRef | referencedLayer () const |
Returns a weak reference to the referenced layer. More... | |
QgsVectorLayerRef | referencingLayer () const |
Returns a weak reference to the referencing layer. More... | |
QgsRelation | resolvedRelation (const QgsProject *project, QgsVectorLayerRef::MatchType matchType=QgsVectorLayerRef::MatchType::All) const |
Resolves a weak relation in the given project returning a possibly invalid QgsRelation and without performing any kind of validity check. More... | |
QgsRelation::RelationStrength | strength () const |
Returns the strength of the relation. More... | |
Friends | |
class | TestQgsWeakRelation |
The QgsWeakRelation class represent a QgsRelation with possibly unresolved layers or unmatched fields.
This class is used to store relation information attached to a layer style, a method to attempt relation resolution is also implemented and can be used to create a QgsRelation after the dependent layers are loaded and available.
Definition at line 38 of file qgsweakrelation.h.
QgsWeakRelation::QgsWeakRelation | ( | const QString & | relationId, |
const QString & | relationName, | ||
const QgsRelation::RelationStrength | strength, | ||
const QString & | referencingLayerId, | ||
const QString & | referencingLayerName, | ||
const QString & | referencingLayerSource, | ||
const QString & | referencingLayerProviderKey, | ||
const QString & | referencedLayerId, | ||
const QString & | referencedLayerName, | ||
const QString & | referencedLayerSource, | ||
const QString & | referencedLayerProviderKey, | ||
const QList< QgsRelation::FieldPair > & | fieldPairs | ||
) |
Creates a QgsWeakRelation.
Definition at line 19 of file qgsweakrelation.cpp.
QList< QgsRelation::FieldPair > QgsWeakRelation::fieldPairs | ( | ) | const |
Returns the list of field pairs.
Definition at line 72 of file qgsweakrelation.cpp.
QgsVectorLayerRef QgsWeakRelation::referencedLayer | ( | ) | const |
Returns a weak reference to the referenced layer.
Definition at line 62 of file qgsweakrelation.cpp.
QgsVectorLayerRef QgsWeakRelation::referencingLayer | ( | ) | const |
Returns a weak reference to the referencing layer.
Definition at line 57 of file qgsweakrelation.cpp.
QgsRelation QgsWeakRelation::resolvedRelation | ( | const QgsProject * | project, |
QgsVectorLayerRef::MatchType | matchType = QgsVectorLayerRef::MatchType::All |
||
) | const |
Resolves a weak relation in the given project returning a possibly invalid QgsRelation and without performing any kind of validity check.
Definition at line 32 of file qgsweakrelation.cpp.
QgsRelation::RelationStrength QgsWeakRelation::strength | ( | ) | const |
Returns the strength of the relation.
Definition at line 67 of file qgsweakrelation.cpp.
|
friend |
Definition at line 97 of file qgsweakrelation.h.