QGIS API Documentation  3.8.0-Zanzibar (11aff65)
Public Member Functions | List of all members
QgsAttributeEditorHtmlElement Class Reference

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

#include <qgsattributeeditorelement.h>

Inheritance diagram for QgsAttributeEditorHtmlElement:
Inheritance graph
[legend]

Public Member Functions

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

Additional Inherited Members

- Public Types inherited from QgsAttributeEditorElement
enum  AttributeEditorType {
  AeTypeContainer, AeTypeField, AeTypeRelation, AeTypeInvalid,
  AeTypeQmlElement, AeTypeHtmlElement
}
 
- Protected Attributes inherited from QgsAttributeEditorElement
QString mName
 
QgsAttributeEditorElementmParent = nullptr
 
bool mShowLabel
 
AttributeEditorType mType
 

Detailed Description

An attribute editor widget that will represent arbitrary HTML code.

Since
QGIS 3.8

Definition at line 479 of file qgsattributeeditorelement.h.

Constructor & Destructor Documentation

◆ QgsAttributeEditorHtmlElement()

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

Creates a new element which can display HTML.

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

Definition at line 489 of file qgsattributeeditorelement.h.

Member Function Documentation

◆ clone()

QgsAttributeEditorElement * QgsAttributeEditorHtmlElement::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 194 of file qgsattributeeditorelement.cpp.

◆ htmlCode()

QString QgsAttributeEditorHtmlElement::htmlCode ( ) const

The QML code that will be represented within this widget.

Since
QGIS 3.4

Definition at line 202 of file qgsattributeeditorelement.cpp.

◆ setHtmlCode()

void QgsAttributeEditorHtmlElement::setHtmlCode ( const QString &  htmlCode)

Sets the HTML code that will be represented within this widget to htmlCode.

Definition at line 207 of file qgsattributeeditorelement.cpp.


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