16#ifndef QGSATTRIBUTEEDITORRELATION_H
17#define QGSATTRIBUTEEDITORRELATION_H
44 SaveChildEdits = 1 << 3,
45 AddChildFeature = 1 << 4,
46 DuplicateChildFeature = 1 << 5,
47 DeleteChildFeature = 1 << 6,
48 ZoomToChildFeature = 1 << 7,
49 AllButtons = Link | Unlink | SaveChildEdits | AddChildFeature | DuplicateChildFeature | DeleteChildFeature | ZoomToChildFeature
55 Q_DECLARE_FLAGS( Buttons, Button )
63 , mRelationId( relationId )
71 , mRelationId( relation.id() )
72 , mRelation( relation )
83 , mRelationId( relationId )
94 , mRelationId( relation.id() )
95 , mRelation( relation )
120 bool forceSuppressFormPopup()
const;
128 void setForceSuppressFormPopup(
bool forceSuppressFormPopup );
134 QVariant nmRelationId()
const;
141 void setNmRelationId(
const QVariant &nmRelationId = QVariant() );
147 QString label()
const;
154 void setLabel(
const QString &label = QString() );
160 QString relationWidgetTypeId()
const;
166 void setRelationWidgetTypeId(
const QString &relationWidgetTypeId );
173 QVariantMap relationEditorConfiguration()
const;
180 void setRelationEditorConfiguration(
const QVariantMap &config );
183 void saveConfiguration( QDomElement &elem, QDomDocument &doc )
const override;
184 void loadConfiguration(
const QDomElement &element,
const QString &layerId,
const QgsReadWriteContext &context,
const QgsFields &fields )
override;
185 QString typeIdentifier()
const override;
189 Buttons mButtons = Buttons( Button::AllButtons );
191 bool mForceSuppressFormPopup =
false;
192 QVariant mNmRelationId;
194 QString mRelationWidgetTypeId;
195 QVariantMap mRelationEditorConfig;
The Qgis class provides global constants for use throughout the application.
This is an abstract base class for any elements of a drag and drop form.
virtual QgsAttributeEditorElement * clone(QgsAttributeEditorElement *parent) const =0
Returns a clone of this element.
This element will load a relation editor onto the form.
const QgsRelation & relation() const
Gets the id of the relation which shall be embedded.
Q_DECL_DEPRECATED QgsAttributeEditorRelation(const QString &name, const QgsRelation &relation, QgsAttributeEditorElement *parent)
Button
Possible buttons shown in the relation editor.
QgsAttributeEditorRelation(const QString &relationId, QgsAttributeEditorElement *parent)
Creates a new element which embeds a relation.
QgsAttributeEditorRelation(const QgsRelation &relation, QgsAttributeEditorElement *parent)
Creates a new element which embeds a relation.
Container of fields for a vector layer.
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.
#define Q_NOWARN_DEPRECATED_POP
#define Q_NOWARN_DEPRECATED_PUSH
Q_DECLARE_OPERATORS_FOR_FLAGS(QgsTextRendererUtils::CurvedTextFlags)