16 #ifndef QGSATTRIBUTEEDITORRELATION_H
17 #define QGSATTRIBUTEEDITORRELATION_H
19 #include "qgis_core.h"
46 SaveChildEdits = 1 << 3,
47 AddChildFeature = 1 << 4,
48 DuplicateChildFeature = 1 << 5,
49 DeleteChildFeature = 1 << 6,
50 ZoomToChildFeature = 1 << 7,
51 AllButtons = Link | Unlink | SaveChildEdits | AddChildFeature | DuplicateChildFeature | DeleteChildFeature | ZoomToChildFeature
57 Q_DECLARE_FLAGS( Buttons, Button )
65 , mRelationId( relationId )
73 , mRelationId( relation.id() )
74 , mRelation( relation )
85 , mRelationId( relationId )
96 , mRelationId( relation.id() )
97 , mRelation( relation )
122 bool forceSuppressFormPopup()
const;
130 void setForceSuppressFormPopup(
bool forceSuppressFormPopup );
136 QVariant nmRelationId()
const;
143 void setNmRelationId(
const QVariant &nmRelationId = QVariant() );
149 QString label()
const;
156 void setLabel(
const QString &label = QString() );
162 QString relationWidgetTypeId()
const;
168 void setRelationWidgetTypeId(
const QString &relationWidgetTypeId );
175 QVariantMap relationEditorConfiguration()
const;
182 void setRelationEditorConfiguration(
const QVariantMap &config );
185 void saveConfiguration( QDomElement &elem, QDomDocument &doc )
const override;
186 void loadConfiguration(
const QDomElement &element,
const QString &layerId,
const QgsReadWriteContext &context,
const QgsFields &fields )
override;
187 QString typeIdentifier()
const override;
191 Buttons mButtons = Buttons( Button::AllButtons );
193 bool mForceSuppressFormPopup =
false;
194 QVariant mNmRelationId;
196 QString mRelationWidgetTypeId;
197 QVariantMap mRelationEditorConfig;
204 #endif // QGSATTRIBUTEEDITORRELATION_H