43 : QPair< QString, QString >() {}
46 FieldPair( QString referencingField, QString referencedField )
47 : QPair< QString, QString >( referencingField, referencedField ) {}
67 static QgsRelation createFromXML(
const QDomNode& node );
75 void writeXML( QDomNode& node, QDomDocument& doc )
const;
82 void setRelationId( QString
id );
89 void setRelationName( QString name );
96 void setReferencingLayer( QString
id );
103 void setReferencedLayer( QString
id );
113 void addFieldPair( QString referencingField, QString referencedField );
123 void addFieldPair( FieldPair fieldPair );
145 const QString name()
const;
151 const QString& id()
const;
159 QString referencingLayerId()
const;
174 QString referencedLayerId()
const;
190 QList< FieldPair > fieldPairs()
const;
197 bool isValid()
const;
200 void updateRelationStatus();
228 #endif // QGSRELATION_H
Wrapper for iterator of features from vector data provider or vector layer.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
FieldPair()
Default constructor: NULL strings.
QString mRelationId
Unique Id.
Defines a relation between matchin fields of the two involved tables of a relation.
This class wraps a request for features to a vector layer (or directly its vector data provider)...
FieldPair(QString referencingField, QString referencedField)
Constructor which takes two fields.
QgsVectorLayer * mReferencingLayer
The child layer.
const QString & referencingField() const
Get the name of the referencing field.
QString mRelationName
Human redable name.
QString mReferencedLayerId
The parent layer id.
QString mReferencingLayerId
The child layer.
QgsVectorLayer * mReferencedLayer
The parent layer.
Represents a vector layer which manages a vector based data sets.
Q_DECLARE_METATYPE(QgsExpression::Interval)
const QString & referencedField() const
Get the name of the referenced field.
QList< FieldPair > mFieldPairs
A list of fields which define the relation.