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;
83 bool overrideColor =
false;
86 bool overrideFont =
false;
92 void readXml(
const QDomNode &node )
SIP_SKIP;
98 QDomElement writeXml( QDomDocument &document )
const SIP_SKIP;
134 QString name()
const {
return mName; }
156 QDomElement toDomElement( QDomDocument &doc )
const;
168 bool showLabel()
const;
173 void setShowLabel(
bool showLabel );
220 LabelStyle labelStyle()
const;
227 void setLabelStyle(
const LabelStyle &labelStyle );
235 bool mShowLabel =
true;
236 int mHorizontalStretch = 0;
237 int mVerticalStretch = 0;
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.
An abstract base class for any elements of a drag and drop form.
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.
Qgis::AttributeEditorType type() const
The type of this element.
int verticalStretch() const
Returns the vertical stretch factor for the element.
void setVerticalStretch(int stretch)
Sets the vertical stretch factor for the element.
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.