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 );
183 void updateRelationsStatus();
187 void writeProject( QDomDocument &doc );
188 void layersRemoved(
const QStringList &layers );
192 QMap<QString, QgsRelation> mRelations;
193 QMap<QString, QgsPolymorphicRelation> mPolymorphicRelations;
A polymorphic relation consists of the same properties like a normal relation except for the referenc...
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
The class is used as a container of context for various read/write operations on other objects.
This class manages a set of relations between layers.
void changed()
Emitted when relations are added or removed to the manager.
void relationsLoaded()
Emitted when the relations were loaded after reading a project.
Represents a vector layer which manages a vector based data sets.