16#ifndef QGSRELATIONMANAGER_H
17#define QGSRELATIONMANAGER_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;
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;
138 static QList<QgsRelation> discoverRelations(
const QList<QgsRelation> &existingRelations,
const QList<QgsVectorLayer *> &layers );
143 QMap<QString, QgsPolymorphicRelation> polymorphicRelations()
const;
158 void removePolymorphicRelation(
const QString &polymorphicRelationId );
164 void setPolymorphicRelations(
const QList<QgsPolymorphicRelation> &relations );
180 void updateRelationsStatus();
184 void writeProject( QDomDocument &doc );
185 void layersRemoved(
const QStringList &layers );
189 QMap<QString, QgsRelation> mRelations;
190 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.