QGIS API Documentation 3.30.0-'s-Hertogenbosch (f186b8efe0)
Public Member Functions | List of all members
QgsAttributeEditorSpacerElement Class Reference

An attribute editor widget that will represent a spacer. More...

#include <qgsattributeeditorspacerelement.h>

Inheritance diagram for QgsAttributeEditorSpacerElement:
Inheritance graph
[legend]

Public Member Functions

 QgsAttributeEditorSpacerElement (const QString &name, QgsAttributeEditorElement *parent)
 Creates a new element which represents a spacer. More...
 
QgsAttributeEditorElementclone (QgsAttributeEditorElement *parent) const override
 Returns a clone of this element. More...
 
bool drawLine () const
 Returns true if the spacer element will contain an horizontal line. More...
 
void setDrawLine (bool drawLine)
 Sets a flag to define if the spacer element will contain an horizontal line. More...
 
- Public Member Functions inherited from QgsAttributeEditorElement
 QgsAttributeEditorElement (AttributeEditorType type, const QString &name, QgsAttributeEditorElement *parent=nullptr)
 Constructor. More...
 
virtual ~QgsAttributeEditorElement ()=default
 
virtual QgsAttributeEditorElementclone (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...
 
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 , AeTypeTextElement ,
  AeTypeSpacerElement
}
 
- 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 a spacer.

Since
QGIS 3.30

Definition at line 28 of file qgsattributeeditorspacerelement.h.

Constructor & Destructor Documentation

◆ QgsAttributeEditorSpacerElement()

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

Creates a new element which represents a spacer.

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

Definition at line 38 of file qgsattributeeditorspacerelement.h.

Member Function Documentation

◆ clone()

QgsAttributeEditorElement * QgsAttributeEditorSpacerElement::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 19 of file qgsattributeeditorspacerelement.cpp.

◆ drawLine()

bool QgsAttributeEditorSpacerElement::drawLine ( ) const

Returns true if the spacer element will contain an horizontal line.

Definition at line 48 of file qgsattributeeditorspacerelement.cpp.

◆ setDrawLine()

void QgsAttributeEditorSpacerElement::setDrawLine ( bool  drawLine)

Sets a flag to define if the spacer element will contain an horizontal line.

Parameters
drawLineflag status

Definition at line 53 of file qgsattributeeditorspacerelement.cpp.


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