QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsAttributeEditorHtmlElement Class Reference

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

#include <qgsattributeeditorhtmlelement.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.
 
QgsAttributeEditorElementclone (QgsAttributeEditorElement *parent) const override
 Returns a clone of this element.
 
QString htmlCode () const
 The Html code that will be represented within this widget.
 
void setHtmlCode (const QString &htmlCode)
 Sets the HTML code that will be represented within this widget to htmlCode.
 
- Public Member Functions inherited from QgsAttributeEditorElement
 QgsAttributeEditorElement (Qgis::AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent=nullptr)
 Constructor.
 
virtual ~QgsAttributeEditorElement ()=default
 
int horizontalStretch () const
 Returns the horizontal stretch factor for the element.
 
LabelStyle labelStyle () const
 Returns the label style.
 
QString name () const
 Returns the name of this element.
 
QgsAttributeEditorElementparent () const
 Gets the parent of this element.
 
void setHorizontalStretch (int stretch)
 Sets the horizontal stretch factor for the element.
 
void setLabelStyle (const LabelStyle &labelStyle)
 Sets the labelStyle.
 
void setShowLabel (bool showLabel)
 Controls if this element should be labeled with a title (field, relation or groupname).
 
void setVerticalStretch (int stretch)
 Sets the vertical stretch factor for the element.
 
bool showLabel () const
 Controls if this element should be labeled with a title (field, relation or groupname).
 
QDomElement toDomElement (QDomDocument &doc) const
 Gets the XML Dom element to save this element.
 
Qgis::AttributeEditorType type () const
 The type of this element.
 
int verticalStretch () const
 Returns the vertical stretch factor for the element.
 

Additional Inherited Members

- 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.
 
- Protected Attributes inherited from QgsAttributeEditorElement
int mHorizontalStretch = 0
 
LabelStyle mLabelStyle
 
QString mName
 
QgsAttributeEditorElementmParent = nullptr
 
bool mShowLabel = true
 
Qgis::AttributeEditorType mType = Qgis::AttributeEditorType::Invalid
 
int mVerticalStretch = 0
 

Detailed Description

An attribute editor widget that will represent arbitrary HTML code.

Since
QGIS 3.4

Definition at line 30 of file qgsattributeeditorhtmlelement.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 40 of file qgsattributeeditorhtmlelement.h.

Member Function Documentation

◆ clone()

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

Returns a clone of this element.

To be implemented by subclasses.

Implements QgsAttributeEditorElement.

Definition at line 19 of file qgsattributeeditorhtmlelement.cpp.

◆ htmlCode()

QString QgsAttributeEditorHtmlElement::htmlCode ( ) const

The Html code that will be represented within this widget.

Since
QGIS 3.4

Definition at line 27 of file qgsattributeeditorhtmlelement.cpp.

◆ setHtmlCode()

void QgsAttributeEditorHtmlElement::setHtmlCode ( const QString &  htmlCode)

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

Definition at line 32 of file qgsattributeeditorhtmlelement.cpp.


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