16 #ifndef QGSRELATIONMANAGER_H
17 #define QGSRELATIONMANAGER_H
19 #include "qgis_core.h"
23 #include <QDomDocument>
56 void setRelations(
const QList<QgsRelation> &relations );
63 QMap<QString, QgsRelation> relations()
const;
79 void removeRelation(
const QString &
id );
96 Q_INVOKABLE
QgsRelation relation(
const QString &
id )
const;
105 QList<QgsRelation> relationsByName(
const QString &name )
const;
120 QList<QgsRelation> referencingRelations(
const QgsVectorLayer *layer =
nullptr,
int fieldIdx = -2 )
const;
129 QList<QgsRelation> referencedRelations(
const QgsVectorLayer *layer =
nullptr )
const;
139 static QList<QgsRelation> discoverRelations(
const QList<QgsRelation> &existingRelations,
const QList<QgsVectorLayer *> &layers );
143 void relationsLoaded();
156 void updateRelationsStatus();
160 void writeProject( QDomDocument &doc );
161 void layersRemoved(
const QStringList &layers );
165 QMap<QString, QgsRelation> mRelations;
170 #endif // QGSRELATIONMANAGER_H