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;
89 QString
name()
const {
return mName; }
112 QDomElement toDomElement( QDomDocument &doc )
const;
126 bool showLabel()
const;
133 void setShowLabel(
bool showLabel );
150 virtual void saveConfiguration( QDomElement &elem )
const = 0;
158 virtual QString typeIdentifier()
const = 0;
179 , mIsGroupBox( true )
212 QList<QgsAttributeEditorElement *>
children()
const {
return mChildren; }
231 void setName(
const QString &name );
236 int columnCount()
const;
241 void setColumnCount(
int columnCount );
269 void saveConfiguration( QDomElement &elem )
const override;
270 QString typeIdentifier()
const override;
273 QList<QgsAttributeEditorElement *> mChildren;
301 int idx()
const {
return mIdx; }
306 void saveConfiguration( QDomElement &elem )
const override;
307 QString typeIdentifier()
const override;
324 , mRelationId( relationId )
332 , mRelationId( relation.id() )
333 , mRelation( relation )
344 , mRelationId( relationId )
355 , mRelationId( relation.id() )
356 , mRelation( relation )
382 bool showLinkButton()
const;
389 void setShowLinkButton(
bool showLinkButton );
396 bool showUnlinkButton()
const;
403 void setShowUnlinkButton(
bool showUnlinkButton );
407 void saveConfiguration( QDomElement &elem )
const override;
408 QString typeIdentifier()
const override;
411 bool mShowLinkButton =
true;
412 bool mShowUnlinkButton =
true;
442 QString qmlCode()
const;
449 void setQmlCode(
const QString &qmlCode );
452 void saveConfiguration( QDomElement &elem )
const override;
453 QString typeIdentifier()
const override;
457 #endif // QGSATTRIBUTEEDITORELEMENT_H
An attribute editor widget that will represent arbitrary QML code.
This is an abstract base class for any elements of a drag and drop form.
virtual bool isGroupBox() const
Returns if this container is going to be rendered as a group box.
QgsAttributeEditorElement * parent() const
Gets the parent of this element.
QgsAttributeEditorRelation(const QgsRelation &relation, QgsAttributeEditorElement *parent)
Creates a new element which embeds a relation.
This element will load a field's widget onto the form.
This element will load a relation editor onto the form.
const QgsRelation & relation() const
Gets the id of the relation which shall be embedded.
int idx() const
Returns the index of the field.
QString name() const
Returns the name of this element.
Q_DECL_DEPRECATED QgsAttributeEditorRelation(const QString &name, const QString &relationId, QgsAttributeEditorElement *parent)
An expression with an additional enabled flag.
AttributeEditorType type() const
The type of this element.
QgsAttributeEditorField(const QString &name, int idx, QgsAttributeEditorElement *parent)
Creates a new attribute editor element which represents a field.
QgsAttributeEditorRelation(const QString &relationId, QgsAttributeEditorElement *parent)
Creates a new element which embeds a relation.
QgsAttributeEditorContainer(const QString &name, QgsAttributeEditorElement *parent)
Creates a new attribute editor container.
Q_DECL_DEPRECATED QgsAttributeEditorRelation(const QString &name, const QgsRelation &relation, QgsAttributeEditorElement *parent)
QList< QgsAttributeEditorElement * > children() const
Gets a list of the children elements of this container.
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...
QgsAttributeEditorQmlElement(const QString &name, QgsAttributeEditorElement *parent)
Creates a new element which can display QML.
virtual QgsAttributeEditorElement * clone(QgsAttributeEditorElement *parent) const =0
Returns a clone of this element.
AttributeEditorType mType