16 #ifndef QGSRELATIONMANAGER_H
17 #define QGSRELATIONMANAGER_H
19 #include "qgis_core.h"
23 #include <QDomDocument>
57 void setRelations(
const QList<QgsRelation> &relations );
64 QMap<QString, QgsRelation> relations()
const;
80 void removeRelation(
const QString &
id );
97 Q_INVOKABLE
QgsRelation relation(
const QString &
id )
const;
106 QList<QgsRelation> relationsByName(
const QString &name )
const;
121 QList<QgsRelation> referencingRelations(
const QgsVectorLayer *layer =
nullptr,
int fieldIdx = -2 )
const;
130 QList<QgsRelation> referencedRelations(
const QgsVectorLayer *layer =
nullptr )
const;
140 static QList<QgsRelation> discoverRelations(
const QList<QgsRelation> &existingRelations,
const QList<QgsVectorLayer *> &layers );
145 QMap<QString, QgsPolymorphicRelation> polymorphicRelations()
const;
160 void removePolymorphicRelation(
const QString &polymorphicRelationId );
166 void setPolymorphicRelations(
const QList<QgsPolymorphicRelation> &relations );
170 void relationsLoaded();
183 void updateRelationsStatus();
187 void writeProject( QDomDocument &doc );
188 void layersRemoved(
const QStringList &layers );
192 QMap<QString, QgsRelation> mRelations;
193 QMap<QString, QgsPolymorphicRelation> mPolymorphicRelations;
198 #endif // QGSRELATIONMANAGER_H