QGIS API Documentation
3.16.0-Hannover (43b64b13f3)
|
This is an abstract base class for any elements of a drag and drop form. More...
#include <qgsattributeeditorelement.h>
Public Types | |
enum | AttributeEditorType { AeTypeContainer, AeTypeField, AeTypeRelation, AeTypeInvalid, AeTypeQmlElement, AeTypeHtmlElement } |
Public Member Functions | |
QgsAttributeEditorElement (AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent=nullptr) | |
Constructor. More... | |
virtual | ~QgsAttributeEditorElement ()=default |
virtual QgsAttributeEditorElement * | clone (QgsAttributeEditorElement *parent) const =0 |
Returns a clone of this element. More... | |
QString | name () const |
Returns the name of this element. More... | |
QgsAttributeEditorElement * | parent () const |
Gets the parent of this element. More... | |
void | setShowLabel (bool showLabel) |
Controls if this element should be labeled with a title (field, relation or groupname). More... | |
bool | showLabel () const |
Controls if this element should be labeled with a title (field, relation or groupname). More... | |
QDomElement | toDomElement (QDomDocument &doc) const |
Gets the XML Dom element to save this element. More... | |
AttributeEditorType | type () const |
The type of this element. More... | |
Protected Attributes | |
QString | mName |
QgsAttributeEditorElement * | mParent = nullptr |
bool | mShowLabel |
AttributeEditorType | mType |
This is an abstract base class for any elements of a drag and drop form.
This can either be a container which will be represented on the screen as a tab widget or a collapsible group box. Or it can be a field which will then be represented based on the QgsEditorWidget type and configuration. Or it can be a relation and embed the form of several children of another layer.
Definition at line 39 of file qgsattributeeditorelement.h.
Enumerator | |
---|---|
AeTypeContainer | A container. |
AeTypeField | A field. |
AeTypeRelation | A relation. |
AeTypeInvalid | Invalid. |
AeTypeQmlElement | A QML element. |
AeTypeHtmlElement | A HTML element. |
Definition at line 62 of file qgsattributeeditorelement.h.
|
inline |
Constructor.
type | The type of the new element. |
name | |
parent |
Definition at line 79 of file qgsattributeeditorelement.h.
|
virtualdefault |
|
pure virtual |
Returns a clone of this element.
To be implemented by subclasses.
Implemented in QgsAttributeEditorHtmlElement, QgsAttributeEditorQmlElement, QgsAttributeEditorRelation, QgsAttributeEditorField, and QgsAttributeEditorContainer.
|
inline |
Returns the name of this element.
Definition at line 93 of file qgsattributeeditorelement.h.
|
inline |
Gets the parent of this element.
Definition at line 107 of file qgsattributeeditorelement.h.
void QgsAttributeEditorElement::setShowLabel | ( | bool | showLabel | ) |
Controls if this element should be labeled with a title (field, relation or groupname).
Definition at line 130 of file qgsattributeeditorelement.cpp.
bool QgsAttributeEditorElement::showLabel | ( | ) | const |
Controls if this element should be labeled with a title (field, relation or groupname).
Definition at line 125 of file qgsattributeeditorelement.cpp.
QDomElement QgsAttributeEditorElement::toDomElement | ( | QDomDocument & | doc | ) | const |
Gets the XML Dom element to save this element.
doc | The QDomDocument which is used to create new XML elements |
Definition at line 116 of file qgsattributeeditorelement.cpp.
|
inline |
The type of this element.
Definition at line 100 of file qgsattributeeditorelement.h.
|
protected |
Definition at line 141 of file qgsattributeeditorelement.h.
|
protected |
Definition at line 142 of file qgsattributeeditorelement.h.
|
protected |
Definition at line 143 of file qgsattributeeditorelement.h.
|
protected |
Definition at line 140 of file qgsattributeeditorelement.h.