QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
qgsattributeeditorqmlelement.h
Go to the documentation of this file.
1 /***************************************************************************
2  qgsattributeeditorqmlelement.h - QgsAttributeEditorElement
3 
4  ---------------------
5  begin : 12.01.2021
6  copyright : (C) 2021 by Denis Rouzaud
7  email : [email protected]
8  ***************************************************************************
9  * *
10  * This program is free software; you can redistribute it and/or modify *
11  * it under the terms of the GNU General Public License as published by *
12  * the Free Software Foundation; either version 2 of the License, or *
13  * (at your option) any later version. *
14  * *
15  ***************************************************************************/
16 #ifndef QGSATTRIBUTEEDITORQMLELEMENT_H
17 #define QGSATTRIBUTEEDITORQMLELEMENT_H
18 
19 #include "qgis_core.h"
21 
29 {
30  public:
31 
38  QgsAttributeEditorQmlElement( const QString &name, QgsAttributeEditorElement *parent )
39  : QgsAttributeEditorElement( AeTypeQmlElement, name, parent )
40  {}
41 
43 
49  QString qmlCode() const;
50 
54  void setQmlCode( const QString &qmlCode );
55 
56  private:
57  void saveConfiguration( QDomElement &elem, QDomDocument &doc ) const override;
58  void loadConfiguration( const QDomElement &element, const QString &layerId, const QgsReadWriteContext &context, const QgsFields &fields ) override;
59  QString typeIdentifier() const override;
60  QString mQmlCode;
61 };
62 
63 #endif // QGSATTRIBUTEEDITORQMLELEMENT_H
QgsAttributeEditorElement
This is an abstract base class for any elements of a drag and drop form.
Definition: qgsattributeeditorelement.h:37
QgsReadWriteContext
The class is used as a container of context for various read/write operations on other objects.
Definition: qgsreadwritecontext.h:34
QgsAttributeEditorElement::QgsAttributeEditorElement
QgsAttributeEditorElement(AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent=nullptr)
Constructor.
Definition: qgsattributeeditorelement.h:135
QgsFields
Container of fields for a vector layer.
Definition: qgsfields.h:44
SIP_FACTORY
#define SIP_FACTORY
Definition: qgis_sip.h:76
QgsAttributeEditorQmlElement
An attribute editor widget that will represent arbitrary QML code.
Definition: qgsattributeeditorqmlelement.h:28
QgsAttributeEditorElement::clone
virtual QgsAttributeEditorElement * clone(QgsAttributeEditorElement *parent) const =0
Returns a clone of this element.
qgsattributeeditorelement.h