QGIS API Documentation  3.26.3-Buenos Aires (65e4edfdad)
Public Member Functions | List of all members
QgsAttributeEditorQmlElement Class Reference

An attribute editor widget that will represent arbitrary QML code. More...

#include <qgsattributeeditorqmlelement.h>

Inheritance diagram for QgsAttributeEditorQmlElement:
Inheritance graph
[legend]

Public Member Functions

 QgsAttributeEditorQmlElement (const QString &name, QgsAttributeEditorElement *parent)
 Creates a new element which can display QML. More...
 
QgsAttributeEditorElementclone (QgsAttributeEditorElement *parent) const override
 Returns a clone of this element. More...
 
QString qmlCode () const
 The QML code that will be represented within this widget. More...
 
void setQmlCode (const QString &qmlCode)
 Sets the QML code that will be represented within this widget to qmlCode. More...
 
- Public Member Functions inherited from QgsAttributeEditorElement
 QgsAttributeEditorElement (AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent=nullptr)
 Constructor. More...
 
virtual ~QgsAttributeEditorElement ()=default
 
LabelStyle labelStyle () const
 Returns the label style. More...
 
QString name () const
 Returns the name of this element. More...
 
QgsAttributeEditorElementparent () const
 Gets the parent of this element. More...
 
void setLabelStyle (const LabelStyle &labelStyle)
 Sets the labelStyle. 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...
 

Additional Inherited Members

- Public Types inherited from QgsAttributeEditorElement
enum  AttributeEditorType {
  AeTypeContainer, AeTypeField, AeTypeRelation, AeTypeInvalid,
  AeTypeQmlElement, AeTypeHtmlElement, AeTypeAction
}
 
- Static Public Member Functions inherited from QgsAttributeEditorElement
static QgsAttributeEditorElementcreate (const QDomElement &element, const QString &layerId, const QgsFields &fields, const QgsReadWriteContext &context, QgsAttributeEditorElement *parent=nullptr)
 Constructs the editor element from the given element. More...
 
- Protected Attributes inherited from QgsAttributeEditorElement
LabelStyle mLabelStyle
 
QString mName
 
QgsAttributeEditorElementmParent = nullptr
 
bool mShowLabel
 
AttributeEditorType mType
 

Detailed Description

An attribute editor widget that will represent arbitrary QML code.

Since
QGIS 3.4

Definition at line 28 of file qgsattributeeditorqmlelement.h.

Constructor & Destructor Documentation

◆ QgsAttributeEditorQmlElement()

QgsAttributeEditorQmlElement::QgsAttributeEditorQmlElement ( const QString &  name,
QgsAttributeEditorElement parent 
)
inline

Creates a new element which can display QML.

Parameters
nameThe name of the widget
parentThe parent (used as container)

Definition at line 52 of file qgsattributeeditorqmlelement.h.

Member Function Documentation

◆ clone()

QgsAttributeEditorElement * QgsAttributeEditorQmlElement::clone ( QgsAttributeEditorElement parent) const
overridevirtual

Returns a clone of this element.

To be implemented by subclasses.

Since
QGIS 3.0

Implements QgsAttributeEditorElement.

Definition at line 20 of file qgsattributeeditorqmlelement.cpp.

◆ qmlCode()

QString QgsAttributeEditorQmlElement::qmlCode ( ) const

The QML code that will be represented within this widget.

Since
QGIS 3.4

Definition at line 28 of file qgsattributeeditorqmlelement.cpp.

◆ setQmlCode()

void QgsAttributeEditorQmlElement::setQmlCode ( const QString &  qmlCode)

Sets the QML code that will be represented within this widget to qmlCode.

Definition at line 33 of file qgsattributeeditorqmlelement.cpp.


The documentation for this class was generated from the following files: