QGIS API Documentation 3.40.0-Bratislava (b56115d8743)
|
An attribute editor widget that will represent arbitrary QML code. More...
#include <qgsattributeeditorqmlelement.h>
Public Member Functions | |
QgsAttributeEditorQmlElement (const QString &name, QgsAttributeEditorElement *parent) | |
Creates a new element which can display QML. | |
QgsAttributeEditorElement * | clone (QgsAttributeEditorElement *parent) const override |
Returns a clone of this element. | |
QString | qmlCode () const |
The QML code that will be represented within this widget. | |
void | setQmlCode (const QString &qmlCode) |
Sets the QML code that will be represented within this widget to qmlCode. | |
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. | |
QgsAttributeEditorElement * | parent () 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 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. | |
Protected Attributes inherited from QgsAttributeEditorElement | |
int | mHorizontalStretch = 0 |
LabelStyle | mLabelStyle |
QString | mName |
QgsAttributeEditorElement * | mParent = nullptr |
bool | mShowLabel = true |
Qgis::AttributeEditorType | mType = Qgis::AttributeEditorType::Invalid |
int | mVerticalStretch = 0 |
An attribute editor widget that will represent arbitrary QML code.
Definition at line 28 of file qgsattributeeditorqmlelement.h.
|
inline |
Creates a new element which can display QML.
name | The name of the widget |
parent | The parent (used as container) |
Definition at line 38 of file qgsattributeeditorqmlelement.h.
|
overridevirtual |
Returns a clone of this element.
To be implemented by subclasses.
Implements QgsAttributeEditorElement.
Definition at line 20 of file qgsattributeeditorqmlelement.cpp.
QString QgsAttributeEditorQmlElement::qmlCode | ( | ) | const |
The QML code that will be represented within this widget.
Definition at line 28 of file qgsattributeeditorqmlelement.cpp.
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.