16 #ifndef QGSATTRIBUTEEDITORELEMENT_H 17 #define QGSATTRIBUTEEDITORELEMENT_H 19 #include "qgis_core.h" 41 switch ( sipCpp->type() )
44 sipType = sipType_QgsAttributeEditorContainer;
47 sipType = sipType_QgsAttributeEditorField;
50 sipType = sipType_QgsAttributeEditorRelation;
88 QString
name()
const {
return mName; }
111 QDomElement toDomElement( QDomDocument &doc )
const;
125 bool showLabel()
const;
132 void setShowLabel(
bool showLabel );
149 virtual void saveConfiguration( QDomElement &elem )
const = 0;
157 virtual QString typeIdentifier()
const = 0;
178 , mIsGroupBox( true )
211 QList<QgsAttributeEditorElement *>
children()
const {
return mChildren; }
230 void setName(
const QString &name );
235 int columnCount()
const;
240 void setColumnCount(
int columnCount );
268 void saveConfiguration( QDomElement &elem )
const override;
269 QString typeIdentifier()
const override;
272 QList<QgsAttributeEditorElement *> mChildren;
300 int idx()
const {
return mIdx; }
305 void saveConfiguration( QDomElement &elem )
const override;
306 QString typeIdentifier()
const override;
323 , mRelationId( relationId )
331 , mRelationId( relation.id() )
332 , mRelation( relation )
343 , mRelationId( relationId )
354 , mRelationId( relation.id() )
355 , mRelation( relation )
381 bool showLinkButton()
const;
388 void setShowLinkButton(
bool showLinkButton );
395 bool showUnlinkButton()
const;
402 void setShowUnlinkButton(
bool showUnlinkButton );
406 void saveConfiguration( QDomElement &elem )
const override;
407 QString typeIdentifier()
const override;
410 bool mShowLinkButton =
true;
411 bool mShowUnlinkButton =
true;
415 #endif // QGSATTRIBUTEEDITORELEMENT_H
This is an abstract base class for any elements of a drag and drop form.
QgsAttributeEditorRelation(const QgsRelation &relation, QgsAttributeEditorElement *parent)
Creates a new element which embeds a relation.
const QgsRelation & relation() const
Gets the id of the relation which shall be embedded.
This element will load a field's widget onto the form.
This element will load a relation editor onto the form.
AttributeEditorType type() const
The type of this element.
Q_DECL_DEPRECATED QgsAttributeEditorRelation(const QString &name, const QString &relationId, QgsAttributeEditorElement *parent)
An expression with an additional enabled flag.
QgsAttributeEditorElement * parent() const
Gets the parent of this element.
QgsAttributeEditorField(const QString &name, int idx, QgsAttributeEditorElement *parent)
Creates a new attribute editor element which represents a field.
int idx() const
Returns the index of the field.
QgsAttributeEditorRelation(const QString &relationId, QgsAttributeEditorElement *parent)
Creates a new element which embeds a relation.
QList< QgsAttributeEditorElement * > children() const
Gets a list of the children elements of this container.
QgsAttributeEditorContainer(const QString &name, QgsAttributeEditorElement *parent)
Creates a new attribute editor container.
Q_DECL_DEPRECATED QgsAttributeEditorRelation(const QString &name, const QgsRelation &relation, QgsAttributeEditorElement *parent)
virtual void setIsGroupBox(bool isGroupBox)
Determines if this container is rendered as collapsible group box or tab in a tabwidget.
This class manages a set of relations between layers.
QgsAttributeEditorElement(AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent=nullptr)
Constructor.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
This is a container for attribute editors, used to group them visually in the attribute form if it is...
virtual bool isGroupBox() const
Returns if this container is going to be rendered as a group box.
QString name() const
Returns the name of this element.
virtual QgsAttributeEditorElement * clone(QgsAttributeEditorElement *parent) const =0
Returns a clone of this element.
AttributeEditorType mType