16#ifndef QGSATTRIBUTEEDITORELEMENT_H
17#define QGSATTRIBUTEEDITORELEMENT_H
47 switch ( sipCpp->type() )
50 sipType = sipType_QgsAttributeEditorContainer;
53 sipType = sipType_QgsAttributeEditorField;
56 sipType = sipType_QgsAttributeEditorRelation;
59 sipType = sipType_QgsAttributeEditorAction;
157 QDomElement toDomElement( QDomDocument &doc )
const;
221 LabelStyle labelStyle()
const;
228 void setLabelStyle(
const LabelStyle &labelStyle );
247 virtual void saveConfiguration( QDomElement &elem, QDomDocument &doc )
const = 0;
253 virtual void loadConfiguration(
const QDomElement &element,
const QString &layerId,
const QgsReadWriteContext &context,
const QgsFields &fields ) = 0;
260 virtual QString typeIdentifier()
const = 0;
AttributeEditorType
Attribute editor types.
@ Action
A layer action element.
void setHorizontalStretch(int stretch)
Sets the horizontal stretch factor for the element.
static std::unique_ptr< QgsAttributeEditorElement > create(const QDomElement &element, const QString &layerId, const QgsFields &fields, const QgsReadWriteContext &context, QgsAttributeEditorElement *parent=nullptr)
Constructs the editor element from the given element.
QgsAttributeEditorElement * parent() const
Gets the parent of this element.
QgsAttributeEditorElement(Qgis::AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent=nullptr)
Constructor.
QgsAttributeEditorElement * mParent
Qgis::AttributeEditorType type() const
The type of this element.
int verticalStretch() const
Returns the vertical stretch factor for the element.
Qgis::AttributeEditorType mType
bool showLabel() const
Controls if this element should be labeled with a title (field, relation or groupname).
QString name() const
Returns the name of this element.
void setVerticalStretch(int stretch)
Sets the vertical stretch factor for the element.
void setShowLabel(bool showLabel)
Controls if this element should be labeled with a title (field, relation or groupname).
virtual ~QgsAttributeEditorElement()=default
int horizontalStretch() const
Returns the horizontal stretch factor for the element.
virtual QgsAttributeEditorElement * clone(QgsAttributeEditorElement *parent) const =0
Returns a clone of this element.
Container of fields for a vector layer.
A container for the context for various read/write operations on objects.
#define SIP_CONVERT_TO_SUBCLASS_CODE(code)
bool operator==(const QgsFeatureIterator &fi1, const QgsFeatureIterator &fi2)
The TabStyle struct defines color and font overrides for form fields, tabs and groups labels.
void readXml(const QDomNode &node)
Reads configuration from node.
bool overrideColor
Override label color.
QDomElement writeXml(QDomDocument &document) const
Creates the XML configuration from document.
bool overrideFont
Override label font.