QGIS API Documentation 3.99.0-Master (2fe06baccd8)
Loading...
Searching...
No Matches
QgsAttributesFormData::AttributeFormItemData Class Reference

Main class to store and transfer editor data contained in a QgsAttributesFormModel. More...

#include <qgsattributesformmodel.h>

Public Member Functions

 AttributeFormItemData ()=default
QColor backgroundColor () const
 Returns the background color of a container.
bool collapsed () const
 For group box containers returns if this group box is collapsed.
QgsOptionalExpression collapsedExpression () const
 Returns the optional expression that dynamically controls the collapsed status of a group box container.
int columnCount () const
 Returns the number of columns in a container.
Qgis::AttributeEditorContainerType containerType () const
 Returns the container type.
int horizontalStretch () const
 Returns the horizontal stretch factor for the element.
HtmlElementEditorConfiguration htmlElementEditorConfiguration () const
 Returns the HTML editor configuration.
const QgsAttributeEditorElement::LabelStyle labelStyle () const
 Returns the label style.
 operator QVariant ()
 Allows direct construction of QVariants from AttributeFormItemData.
QmlElementEditorConfiguration qmlElementEditorConfiguration () const
 Returns the QML editor configuration.
RelationEditorConfiguration relationEditorConfiguration () const
 Returns the relation editor configuration.
void setBackgroundColor (const QColor &backgroundColor)
 Sets the background color of a container.
void setCollapsed (bool collapsed)
 For group box containers sets if this group box is collapsed.
void setCollapsedExpression (const QgsOptionalExpression &collapsedExpression)
 Sets the optional collapsedExpression that dynamically controls the collapsed status of a group box container.
void setColumnCount (int count)
 Sets the number of columns for a container.
void setContainerType (Qgis::AttributeEditorContainerType type)
 Sets the container type.
void setHorizontalStretch (int stretch)
 Sets the horizontal stretch factor for the element.
void setHtmlElementEditorConfiguration (const HtmlElementEditorConfiguration &htmlElementEditorConfiguration)
 Sets the HTML editor configuration.
void setLabelStyle (const QgsAttributeEditorElement::LabelStyle &labelStyle)
 Sets the label style to labelStyle.
void setQmlElementEditorConfiguration (const QmlElementEditorConfiguration &qmlElementEditorConfiguration)
 Sets the QML editor configuration.
void setRelationEditorConfiguration (const RelationEditorConfiguration &relationEditorConfiguration)
 Sets the relation editor configuration.
void setShowLabel (bool showLabel)
 Sets whether the label for the widget should be shown.
void setSpacerElementEditorConfiguration (SpacerElementEditorConfiguration spacerElementEditorConfiguration)
 Sets the the spacer element configuration to spacerElementEditorConfiguration.
void setTextElementEditorConfiguration (const TextElementEditorConfiguration &textElementEditorConfiguration)
 Sets the editor configuration for text element to textElementEditorConfiguration.
void setVerticalStretch (int stretch)
 Sets the vertical stretch factor for the element.
void setVisibilityExpression (const QgsOptionalExpression &visibilityExpression)
 Sets the optional visibilityExpression that dynamically controls the visibility status of a container.
bool showLabel () const
 Returns whether the widget's label is to be shown.
SpacerElementEditorConfiguration spacerElementEditorConfiguration () const
 Returns the spacer element configuration.
TextElementEditorConfiguration textElementEditorConfiguration () const
 Returns the editor configuration for text element.
int verticalStretch () const
 Returns the vertical stretch factor for the element.
QgsOptionalExpression visibilityExpression () const
 Returns the expression to control the visibility status of a container.

Detailed Description

Main class to store and transfer editor data contained in a QgsAttributesFormModel.

Note
Prior to QGIS 3.44 this was available as QgsAttributesFormProperties::DnDTreeItemData
Since
QGIS 3.44

Definition at line 127 of file qgsattributesformmodel.h.

Constructor & Destructor Documentation

◆ AttributeFormItemData()

QgsAttributesFormData::AttributeFormItemData::AttributeFormItemData ( )
default

Member Function Documentation

◆ backgroundColor()

QColor QgsAttributesFormData::AttributeFormItemData::backgroundColor ( ) const

Returns the background color of a container.

See also
setBackgroundColor()

Definition at line 158 of file qgsattributesformmodel.cpp.

◆ collapsed()

bool QgsAttributesFormData::AttributeFormItemData::collapsed ( ) const
inline

For group box containers returns if this group box is collapsed.

Returns
true if the group box is collapsed, false otherwise.
See also
collapsed()
setCollapsed()
Since
QGIS 3.26

Definition at line 165 of file qgsattributesformmodel.h.

◆ collapsedExpression()

QgsOptionalExpression QgsAttributesFormData::AttributeFormItemData::collapsedExpression ( ) const

Returns the optional expression that dynamically controls the collapsed status of a group box container.

See also
collapsed()
setCollapsed()
setCollapsedExpression()
Since
QGIS 3.26

Definition at line 107 of file qgsattributesformmodel.cpp.

◆ columnCount()

int QgsAttributesFormData::AttributeFormItemData::columnCount ( ) const
inline

Returns the number of columns in a container.

Definition at line 136 of file qgsattributesformmodel.h.

◆ containerType()

Qgis::AttributeEditorContainerType QgsAttributesFormData::AttributeFormItemData::containerType ( ) const

Returns the container type.

See also
setContainerType()
Since
QGIS 3.32

Definition at line 67 of file qgsattributesformmodel.cpp.

◆ horizontalStretch()

int QgsAttributesFormData::AttributeFormItemData::horizontalStretch ( ) const
inline

Returns the horizontal stretch factor for the element.

See also
setHorizontalStretch()
verticalStretch()
Since
QGIS 3.32

Definition at line 204 of file qgsattributesformmodel.h.

◆ htmlElementEditorConfiguration()

QgsAttributesFormData::HtmlElementEditorConfiguration QgsAttributesFormData::AttributeFormItemData::htmlElementEditorConfiguration ( ) const

Returns the HTML editor configuration.

See also
setHtmlElementEditorConfiguration()

Definition at line 138 of file qgsattributesformmodel.cpp.

◆ labelStyle()

const QgsAttributeEditorElement::LabelStyle QgsAttributesFormData::AttributeFormItemData::labelStyle ( ) const

Returns the label style.

See also
setLabelStyle()
Since
QGIS 3.26

Definition at line 77 of file qgsattributesformmodel.cpp.

◆ operator QVariant()

QgsAttributesFormData::AttributeFormItemData::operator QVariant ( )
inline

Allows direct construction of QVariants from AttributeFormItemData.

Definition at line 133 of file qgsattributesformmodel.h.

◆ qmlElementEditorConfiguration()

QgsAttributesFormData::QmlElementEditorConfiguration QgsAttributesFormData::AttributeFormItemData::qmlElementEditorConfiguration ( ) const

Returns the QML editor configuration.

See also
setQmlElementEditorConfiguration()

Definition at line 127 of file qgsattributesformmodel.cpp.

◆ relationEditorConfiguration()

QgsAttributesFormData::RelationEditorConfiguration QgsAttributesFormData::AttributeFormItemData::relationEditorConfiguration ( ) const

Returns the relation editor configuration.

See also
setRelationEditorConfiguration()

Definition at line 117 of file qgsattributesformmodel.cpp.

◆ setBackgroundColor()

void QgsAttributesFormData::AttributeFormItemData::setBackgroundColor ( const QColor & backgroundColor)

Sets the background color of a container.

See also
backgroundColor()

Definition at line 163 of file qgsattributesformmodel.cpp.

◆ setCollapsed()

void QgsAttributesFormData::AttributeFormItemData::setCollapsed ( bool collapsed)
inline

For group box containers sets if this group box is collapsed.

See also
collapsed()
setCollapsed()
Since
QGIS 3.26

Definition at line 174 of file qgsattributesformmodel.h.

◆ setCollapsedExpression()

void QgsAttributesFormData::AttributeFormItemData::setCollapsedExpression ( const QgsOptionalExpression & collapsedExpression)

Sets the optional collapsedExpression that dynamically controls the collapsed status of a group box container.

See also
collapsed()
setCollapsed()
collapsedExpression()
Since
QGIS 3.26

Definition at line 112 of file qgsattributesformmodel.cpp.

◆ setColumnCount()

void QgsAttributesFormData::AttributeFormItemData::setColumnCount ( int count)
inline

Sets the number of columns for a container.

Definition at line 139 of file qgsattributesformmodel.h.

◆ setContainerType()

void QgsAttributesFormData::AttributeFormItemData::setContainerType ( Qgis::AttributeEditorContainerType type)

Sets the container type.

See also
containerType()
Since
QGIS 3.32

Definition at line 72 of file qgsattributesformmodel.cpp.

◆ setHorizontalStretch()

void QgsAttributesFormData::AttributeFormItemData::setHorizontalStretch ( int stretch)
inline

Sets the horizontal stretch factor for the element.

See also
horizontalStretch()
setVerticalStretch()
Since
QGIS 3.32

Definition at line 214 of file qgsattributesformmodel.h.

◆ setHtmlElementEditorConfiguration()

void QgsAttributesFormData::AttributeFormItemData::setHtmlElementEditorConfiguration ( const HtmlElementEditorConfiguration & htmlElementEditorConfiguration)

Sets the HTML editor configuration.

See also
htmlElementEditorConfiguration()

Definition at line 143 of file qgsattributesformmodel.cpp.

◆ setLabelStyle()

void QgsAttributesFormData::AttributeFormItemData::setLabelStyle ( const QgsAttributeEditorElement::LabelStyle & labelStyle)

Sets the label style to labelStyle.

See also
labelStyle()
Since
QGIS 3.26

Definition at line 82 of file qgsattributesformmodel.cpp.

◆ setQmlElementEditorConfiguration()

void QgsAttributesFormData::AttributeFormItemData::setQmlElementEditorConfiguration ( const QmlElementEditorConfiguration & qmlElementEditorConfiguration)

Sets the QML editor configuration.

See also
qmlElementEditorConfiguration()

Definition at line 132 of file qgsattributesformmodel.cpp.

◆ setRelationEditorConfiguration()

void QgsAttributesFormData::AttributeFormItemData::setRelationEditorConfiguration ( const RelationEditorConfiguration & relationEditorConfiguration)

Sets the relation editor configuration.

See also
relationEditorConfiguration()

Definition at line 122 of file qgsattributesformmodel.cpp.

◆ setShowLabel()

void QgsAttributesFormData::AttributeFormItemData::setShowLabel ( bool showLabel)

Sets whether the label for the widget should be shown.

Definition at line 92 of file qgsattributesformmodel.cpp.

◆ setSpacerElementEditorConfiguration()

void QgsAttributesFormData::AttributeFormItemData::setSpacerElementEditorConfiguration ( SpacerElementEditorConfiguration spacerElementEditorConfiguration)

Sets the the spacer element configuration to spacerElementEditorConfiguration.

Since
QGIS 3.30

Definition at line 153 of file qgsattributesformmodel.cpp.

◆ setTextElementEditorConfiguration()

void QgsAttributesFormData::AttributeFormItemData::setTextElementEditorConfiguration ( const TextElementEditorConfiguration & textElementEditorConfiguration)

Sets the editor configuration for text element to textElementEditorConfiguration.

Since
QGIS 3.30

Definition at line 173 of file qgsattributesformmodel.cpp.

◆ setVerticalStretch()

void QgsAttributesFormData::AttributeFormItemData::setVerticalStretch ( int stretch)
inline

Sets the vertical stretch factor for the element.

See also
verticalStretch()
setHorizontalStretch()
Since
QGIS 3.32

Definition at line 234 of file qgsattributesformmodel.h.

◆ setVisibilityExpression()

void QgsAttributesFormData::AttributeFormItemData::setVisibilityExpression ( const QgsOptionalExpression & visibilityExpression)

Sets the optional visibilityExpression that dynamically controls the visibility status of a container.

See also
visibilityExpression()
Since
QGIS 3.26

Definition at line 102 of file qgsattributesformmodel.cpp.

◆ showLabel()

bool QgsAttributesFormData::AttributeFormItemData::showLabel ( ) const

Returns whether the widget's label is to be shown.

Definition at line 87 of file qgsattributesformmodel.cpp.

◆ spacerElementEditorConfiguration()

QgsAttributesFormData::SpacerElementEditorConfiguration QgsAttributesFormData::AttributeFormItemData::spacerElementEditorConfiguration ( ) const

Returns the spacer element configuration.

Since
QGIS 3.30

Definition at line 148 of file qgsattributesformmodel.cpp.

◆ textElementEditorConfiguration()

QgsAttributesFormData::TextElementEditorConfiguration QgsAttributesFormData::AttributeFormItemData::textElementEditorConfiguration ( ) const

Returns the editor configuration for text element.

Since
QGIS 3.30

Definition at line 168 of file qgsattributesformmodel.cpp.

◆ verticalStretch()

int QgsAttributesFormData::AttributeFormItemData::verticalStretch ( ) const
inline

Returns the vertical stretch factor for the element.

See also
setVerticalStretch()
horizontalStretch()
Since
QGIS 3.32

Definition at line 224 of file qgsattributesformmodel.h.

◆ visibilityExpression()

QgsOptionalExpression QgsAttributesFormData::AttributeFormItemData::visibilityExpression ( ) const

Returns the expression to control the visibility status of a container.

See also
setVisibilityExpression()

Definition at line 97 of file qgsattributesformmodel.cpp.


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