QGIS API Documentation 3.34.0-Prizren (ffbdd678812)
Loading...
Searching...
No Matches
Public Member Functions | List of all members
QgsAttributeEditorField Class Reference

This element will load a field's widget onto the form. More...

#include <qgsattributeeditorfield.h>

Inheritance diagram for QgsAttributeEditorField:
Inheritance graph
[legend]

Public Member Functions

 QgsAttributeEditorField (const QString &name, int idx, QgsAttributeEditorElement *parent)
 Creates a new attribute editor element which represents a field.
 
QgsAttributeEditorElementclone (QgsAttributeEditorElement *parent) const override
 Returns a clone of this element.
 
int idx () const
 Returns the index of the field.
 
- 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

This element will load a field's widget onto the form.

Definition at line 27 of file qgsattributeeditorfield.h.

Constructor & Destructor Documentation

◆ QgsAttributeEditorField()

QgsAttributeEditorField::QgsAttributeEditorField ( const QString &  name,
int  idx,
QgsAttributeEditorElement parent 
)
inline

Creates a new attribute editor element which represents a field.

Parameters
nameThe name of the element
idxThe index of the field which should be embedded
parentThe parent of this widget (used as container)

Definition at line 38 of file qgsattributeeditorfield.h.

Member Function Documentation

◆ clone()

QgsAttributeEditorElement * QgsAttributeEditorField::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 20 of file qgsattributeeditorfield.cpp.

◆ idx()

int QgsAttributeEditorField::idx ( ) const
inline

Returns the index of the field.

Definition at line 46 of file qgsattributeeditorfield.h.


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