QgsAttributeEditorField class

This element will load a field's widget onto the form.

Base classes

class QgsAttributeEditorElement
This is an abstract base class for any elements of a drag and drop form.

Constructors, destructors, conversion operators

QgsAttributeEditorField(const QString& name, int idx, QgsAttributeEditorElement* parent)
Creates a new attribute editor element which represents a field.

Public functions

auto clone(QgsAttributeEditorElement* parent) const -> QgsAttributeEditorElement* override
Returns a clone of this element.
auto idx() const -> int
Returns the index of the field.

Private functions

void saveConfiguration(QDomElement& elem) const override
Should be implemented by subclasses to save type specific configuration.
auto typeIdentifier() const -> QString override
All subclasses need to overwrite this method and return a type specific identifier.

Function documentation

QgsAttributeEditorField::QgsAttributeEditorField(const QString& name, int idx, QgsAttributeEditorElement* parent)

Creates a new attribute editor element which represents a field.

Parameters
name The name of the element
idx The index of the field which should be embedded
parent The parent of this widget (used as container)

QgsAttributeEditorElement* QgsAttributeEditorField::clone(QgsAttributeEditorElement* parent) const override

Returns a clone of this element.

To be implemented by subclasses.

void QgsAttributeEditorField::saveConfiguration(QDomElement& elem) const override private

Should be implemented by subclasses to save type specific configuration.

QString QgsAttributeEditorField::typeIdentifier() const override private

All subclasses need to overwrite this method and return a type specific identifier.

Needs to be XML key compatible.