16#ifndef QGSATTRIBUTEEDITORELEMENT_H
17#define QGSATTRIBUTEEDITORELEMENT_H
48 switch ( sipCpp->type() )
51 sipType = sipType_QgsAttributeEditorContainer;
54 sipType = sipType_QgsAttributeEditorField;
57 sipType = sipType_QgsAttributeEditorRelation;
60 sipType = sipType_QgsAttributeEditorAction;
157 QDomElement toDomElement( QDomDocument &doc )
const;
221 LabelStyle labelStyle()
const;
228 void setLabelStyle(
const LabelStyle &labelStyle );
248 virtual void saveConfiguration( QDomElement &elem, QDomDocument &doc )
const = 0;
254 virtual void loadConfiguration(
const QDomElement &element,
const QString &layerId,
const QgsReadWriteContext &context,
const QgsFields &fields ) = 0;
261 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.
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.
static 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.
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.