18 #ifndef QGSEDITFORMCONFIG_H 19 #define QGSEDITFORMCONFIG_H 56 :
QObject( parent ), mType( type ), mName( name ) {}
107 , mIsGroupBox( true )
205 int idx()
const {
return mIdx; }
228 , mRelationId( relationId ) {}
239 , mRelationId( relation.id() )
240 , mRelation( relation ) {}
293 : mName( name ), mFields( fields ) {}
302 : mName( name ), mFields( fields ), mGroups( groups ) {}
325 CodeSourceDialog = 2,
326 CodeSourceEnvironment = 3
361 void setUiForm(
const QString& ui );
394 void setWidgetType(
int fieldIdx,
const QString& widgetType );
403 QString widgetType(
int fieldIdx )
const;
473 bool removeWidgetConfig(
int fieldIdx );
482 bool removeWidgetConfig(
const QString& widgetName );
488 bool readOnly(
int idx )
const;
493 void setReadOnly(
int idx,
bool readOnly =
true );
500 bool labelOnTop(
int idx )
const;
508 void setLabelOnTop(
int idx,
bool onTop );
573 void readXml(
const QDomNode& node );
579 void writeXml(
QDomNode& node )
const;
587 void onRelationsLoaded();
605 void setFields(
const QgsFields& fields );
642 #endif // QGSEDITFORMCONFIG_H
QgsAttributeEditorRelation(const QString &name, const QString &relationId, QObject *parent)
Creates a new element which embeds a relation.
virtual ~QgsAttributeEditorContainer()
Destructor.
This is an abstract base class for any elements of a drag and drop form.
QgsAttributeEditorRelation(const QString &name, const QgsRelation &relation, QObject *parent)
Creates a new element which embeds a relation.
const QgsRelation & relation() const
Get the id of the relation which shall be embedded.
Container of fields for a vector layer.
This element will load a field's widget onto the form.
virtual ~QgsAttributeEditorElement()
Destructor.
This element will load a relation editor onto the form.
AttributeEditorType type() const
The type of this element.
QgsAttributeEditorField(const QString &name, int idx, QObject *parent)
Creates a new attribute editor element which represents a field.
virtual ~QgsAttributeEditorField()
Destructor.
int idx() const
Return the index of the field.
QgsAttributeEditorContainer(const QString &name, QObject *parent)
Creates a new attribute editor container.
void setName(const char *name)
virtual ~QgsAttributeEditorRelation()
Destructor.
QgsAttributeEditorElement(AttributeEditorType type, const QString &name, QObject *parent=nullptr)
Constructor.
virtual QDomElement toDomElement(QDomDocument &doc) const =0
Is reimplemented in classes inheriting from this to serialize it.
virtual void setIsGroupBox(bool isGroupBox)
Determines if this container is rendered as collapsible group box or tab in a tabwidget.
This class manages a set of relations between layers.
This is a container for attribute editors, used to group them visually in the attribute form if it is...
QList< QgsAttributeEditorElement * > children() const
Get a list of the children elements of this container.
virtual bool isGroupBox() const
Returns if this container is going to be rendered as a group box.
Represents a vector layer which manages a vector based data sets.
QString name() const
Return the name of this element.
AttributeEditorType mType