QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
|
An attribute editor widget that will represent arbitrary text code. More...
#include <qgsattributeeditortextelement.h>
Public Member Functions | |
QgsAttributeEditorTextElement (const QString &name, QgsAttributeEditorElement *parent) | |
Creates a new element which can display text. More... | |
QgsAttributeEditorElement * | clone (QgsAttributeEditorElement *parent) const override |
Returns a clone of this element. More... | |
void | setText (const QString &text) |
Sets the text that will be represented within this widget to text. More... | |
QString | text () const |
The Text that will be represented within this widget. More... | |
Public Member Functions inherited from QgsAttributeEditorElement | |
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... | |
LabelStyle | labelStyle () const |
Returns the label style. More... | |
QString | name () const |
Returns the name of this element. More... | |
QgsAttributeEditorElement * | parent () 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 , AeTypeTextElement , AeTypeSpacerElement } |
Static Public Member Functions inherited from QgsAttributeEditorElement | |
static QgsAttributeEditorElement * | create (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 |
QgsAttributeEditorElement * | mParent = nullptr |
bool | mShowLabel |
AttributeEditorType | mType |
An attribute editor widget that will represent arbitrary text code.
Definition at line 30 of file qgsattributeeditortextelement.h.
|
inline |
Creates a new element which can display text.
name | The name of the widget |
parent | The parent (used as container) |
Definition at line 40 of file qgsattributeeditortextelement.h.
|
overridevirtual |
Returns a clone of this element.
To be implemented by subclasses.
Implements QgsAttributeEditorElement.
Definition at line 19 of file qgsattributeeditortextelement.cpp.
void QgsAttributeEditorTextElement::setText | ( | const QString & | text | ) |
Sets the text that will be represented within this widget to text.
Definition at line 32 of file qgsattributeeditortextelement.cpp.
QString QgsAttributeEditorTextElement::text | ( | ) | const |
The Text that will be represented within this widget.
Definition at line 27 of file qgsattributeeditortextelement.cpp.