16#ifndef QGSATTRIBUTEEDITORELEMENT_H
17#define QGSATTRIBUTEEDITORELEMENT_H
47 switch ( sipCpp->type() )
49 case Qgis::AttributeEditorType::Container:
50 sipType = sipType_QgsAttributeEditorContainer;
52 case Qgis::AttributeEditorType::Field:
53 sipType = sipType_QgsAttributeEditorField;
55 case Qgis::AttributeEditorType::Relation:
56 sipType = sipType_QgsAttributeEditorRelation;
58 case Qgis::AttributeEditorType::Action:
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; }
157 QDomElement toDomElement( QDomDocument &doc )
const;
171 bool showLabel()
const;
177 void setShowLabel(
bool showLabel );
224 LabelStyle labelStyle()
const;
231 void setLabelStyle(
const LabelStyle &labelStyle );
239 bool mShowLabel =
true;
240 int mHorizontalStretch = 0;
241 int mVerticalStretch = 0;
252 virtual void saveConfiguration( QDomElement &elem, QDomDocument &doc )
const = 0;
258 virtual void loadConfiguration(
const QDomElement &element,
const QString &layerId,
const QgsReadWriteContext &context,
const QgsFields &fields ) = 0;
266 virtual QString typeIdentifier()
const = 0;
AttributeEditorType
Attribute editor types.
This is 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.
The class is used as a container of context for various read/write operations on other 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.