18#include "moc_qgsattributesformmodel.cpp"
35 if ( !layer || idx < 0 || idx >= layer->
fields().
count() )
53QgsAttributesFormData::FieldConfig::operator QVariant()
55 return QVariant::fromValue<QgsAttributesFormData::FieldConfig>( *
this );
53QgsAttributesFormData::FieldConfig::operator QVariant() {
…}
58QgsAttributesFormData::RelationEditorConfiguration::operator QVariant()
60 return QVariant::fromValue<QgsAttributesFormData::RelationEditorConfiguration>( *
this );
58QgsAttributesFormData::RelationEditorConfiguration::operator QVariant() {
…}
65 return mContainerType;
70 mContainerType = type;
80 mLabelStyle = labelStyle;
90 mShowLabel = showLabel;
95 return mVisibilityExpression;
100 mVisibilityExpression = visibilityExpression;
105 return mCollapsedExpression;
110 mCollapsedExpression = collapsedExpression;
115 return mRelationEditorConfiguration;
120 mRelationEditorConfiguration = relationEditorConfiguration;
125 return mQmlElementEditorConfiguration;
130 mQmlElementEditorConfiguration = qmlElementEditorConfiguration;
136 return mHtmlElementEditorConfiguration;
141 mHtmlElementEditorConfiguration = htmlElementEditorConfiguration;
146 return mSpacerElementEditorConfiguration;
151 mSpacerElementEditorConfiguration = spacerElementEditorConfiguration;
156 return mBackgroundColor;
161 mBackgroundColor = backgroundColor;
166 return mTextElementEditorConfiguration;
171 mTextElementEditorConfiguration = textElementEditorConfiguration;
177 , mDisplayName( displayName )
184 , mDisplayName( displayName )
193 return mChildren.at(
row ).get();
200 if ( !mChildren.empty() && itemId.trimmed().isEmpty() )
204 const auto it = std::find_if( mChildren.cbegin(), mChildren.cend(), [itemType, itemId](
const std::unique_ptr< QgsAttributesFormItem > &item ) {
205 return item->type() == itemType && item->id() == itemId;
208 if ( it != mChildren.cend() )
216 if ( !mChildren.empty() && itemId.trimmed().isEmpty() )
219 for (
const auto &
child : std::as_const( mChildren ) )
237 return static_cast< int >( mChildren.size() );
245 const auto it = std::find_if( mParent->mChildren.cbegin(), mParent->mChildren.cend(), [
this](
const std::unique_ptr< QgsAttributesFormItem > &item ) {
246 return item.get() == this;
249 if ( it != mParent->mChildren.cend() )
251 return static_cast< int >( std::distance( mParent->mChildren.cbegin(), it ) );
262 if ( !item->mParent )
263 item->mParent =
this;
265 mChildren.push_back( std::move( item ) );
270 if ( position < 0 || position >
static_cast< int >( mChildren.size() ) || !item )
273 if ( !item->mParent )
274 item->mParent =
this;
276 mChildren.insert( mChildren.begin() + position, std::move( item ) );
281 if ( index >= 0 && index <
static_cast< int >( mChildren.size() ) )
282 mChildren.erase( mChildren.begin() + index );
297 return QVariant::fromValue( mData );
305 return QVariant::fromValue( mFieldConfigData );
322 mName = value.toString();
327 mDisplayName = value.toString();
337 mId = value.toString();
352 : QAbstractItemModel( parent )
355 , mProject( project )
363 if (
index.isValid() )
378 return parentItem ? parentItem->
childCount() : 0;
391 for (
int i = 0; i < std::min( pathA.size(), pathB.size() ); i++ )
393 if ( pathA.at( i ) != pathB.at( i ) )
395 return pathA.at( i ) < pathB.at( i );
399 return pathA.size() < pathB.size();
414 if ( !hasIndex( row, column,
parent ) )
415 return QModelIndex();
419 return QModelIndex();
422 return createIndex( row, column, childItem );
424 return QModelIndex();
429 if ( !
index.isValid() )
430 return QModelIndex();
435 return ( parentItem !=
mRootItem.get() && parentItem !=
nullptr )
436 ? createIndex( parentItem->
row(), 0, parentItem )
443 return item ? createIndex( item->
row(), 0, item ) : QModelIndex();
449 return item ? createIndex( item->
row(), 0, item ) : QModelIndex();
469 const QModelIndex childIndex =
index( i, 0,
parent );
470 if ( hasChildren( childIndex ) )
485 if ( !
index.isValid() )
486 return Qt::NoItemFlags;
488 Qt::ItemFlags
flags = Qt::ItemIsEnabled;
493 flags =
flags | Qt::ItemIsDragEnabled | Qt::ItemIsSelectable;
502 return orientation == Qt::Horizontal && role == Qt::DisplayRole ? tr(
"Available Widgets" ) : QVariant {};
518 for (
int i = 0; i < fields.
size(); ++i )
522 itemData.setShowLabel(
true );
526 auto item = std::make_unique< QgsAttributesFormItem >();
535 itemFields->addChild( std::move( item ) );
538 mRootItem->addChild( std::move( itemFields ) );
550 if ( polymorphicRelation.
isValid() )
552 name = QStringLiteral(
"%1 (%2)" ).arg( relation.name(), polymorphicRelation.
name() );
556 name = relation.
name();
561 auto itemRelation = std::make_unique< QgsAttributesFormItem >();
564 itemRelation->setData(
ItemIdRole, relation.id() );
566 itemRelations->addChild( std::move( itemRelation ) );
569 mRootItem->addChild( std::move( itemRelations ) );
574 mRootItem->addChild( std::move( itemActions ) );
584 itemOtherWidgets->addChild( std::move( itemQml ) );
588 auto itemHtml = std::make_unique< QgsAttributesFormItem >(
QgsAttributesFormData::HtmlWidget, itemHtmlData, QStringLiteral(
"HTML Widget" ), tr(
"HTML Widget" ) );
589 itemOtherWidgets->addChild( std::move( itemHtml ) );
593 auto itemText = std::make_unique< QgsAttributesFormItem >(
QgsAttributesFormData::TextWidget, itemTextData, QStringLiteral(
"Text Widget" ), tr(
"Text Widget" ) );
594 itemOtherWidgets->addChild( std::move( itemText ) );
599 itemOtherWidgets->addChild( std::move( itemSpacer ) );
601 mRootItem->addChild( std::move( itemOtherWidgets ) );
611 beginRemoveRows( actionsIndex, 0, itemActions->
childCount() );
616 for (
const auto &action : std::as_const( actions ) )
618 if ( action.isValid() && action.runable() && ( action.actionScopes().contains( QStringLiteral(
"Feature" ) ) || action.actionScopes().contains( QStringLiteral(
"Layer" ) ) ) )
624 beginInsertRows( actionsIndex, 0, count );
625 populateActionItems( actions );
629void QgsAttributesAvailableWidgetsModel::populateActionItems(
const QList<QgsAction> actions )
634 for (
const auto &action : std::as_const( actions ) )
636 if ( action.isValid() && action.runable() && ( action.actionScopes().contains( QStringLiteral(
"Feature" ) ) || action.actionScopes().contains( QStringLiteral(
"Layer" ) ) ) )
638 const QString actionTitle { action.shortTitle().isEmpty() ? action.name() : action.shortTitle() };
643 auto itemAction = std::make_unique< QgsAttributesFormItem >();
644 itemAction->setData(
ItemIdRole, action.id().toString() );
649 itemActions->
addChild( std::move( itemAction ) );
656 if ( !
index.isValid() )
665 bool invalidRelation =
false;
673 case Qt::DisplayRole:
683 case Qt::ToolTipRole:
688 if ( !cfg.mAlias.isEmpty() )
689 return tr(
"%1 (%2)" ).arg( item->
name(), cfg.mAlias );
697 return tr(
"Invalid relation" );
703 case Qt::DecorationRole:
706 case Qt::BackgroundRole:
709 return QBrush( Qt::lightGray );
714 case Qt::ForegroundRole:
720 return QBrush( QColor( Qt::lightGray ) );
726 return QBrush( QColor( 255, 0, 0 ) );
738 QFont font = QFont();
739 font.setItalic(
true );
752 return item->
data( role );
761 if ( !
index.isValid() )
765 bool result = item->
setData( role, value );
775 return Qt::CopyAction;
780 return QStringList() << QStringLiteral(
"application/x-qgsattributesformavailablewidgetsrelement" );
785 if ( indexes.count() == 0 )
789 if ( types.isEmpty() )
792 QMimeData *
data =
new QMimeData();
793 const QString format = types.at( 0 );
795 QDataStream stream( &encoded, QIODevice::WriteOnly );
798 QModelIndexList sortedIndexes = indexes;
800 std::sort( sortedIndexes.begin(), sortedIndexes.end(), [
this](
const QModelIndex &a,
const QModelIndex &b ) {
801 return indexLessThan( a, b );
804 for (
const QModelIndex &
index : std::as_const( sortedIndexes ) )
806 if (
index.isValid() )
812 stream << itemId << itemType << itemName;
816 data->setData( format, encoded );
827 return createIndex( row, 0, item );
829 return QModelIndex();
839 return createIndex( row, 0, item );
841 return QModelIndex();
851 return createIndex( row, 0, item );
853 return QModelIndex();
859 return QModelIndex();
863 return QModelIndex();
866 return item ? createIndex( item->
row(), 0, item ) : QModelIndex();
878 return orientation == Qt::Horizontal && role == Qt::DisplayRole ? tr(
"Form Layout" ) : QVariant {};
883 if ( !
index.isValid() )
884 return Qt::ItemIsDropEnabled;
886 Qt::ItemFlags
flags = Qt::ItemIsEnabled | Qt::ItemIsSelectable | Qt::ItemIsDragEnabled;
890 flags |= Qt::ItemIsDropEnabled;
906 loadAttributeEditorElementItem( editorElement,
mRootItem.get() );
921 auto editorItem = std::make_unique< QgsAttributesFormItem >();
923 switch ( editorElement->
type() )
928 setCommonProperties( itemData );
936 if ( fieldIndex != -1 )
948 if ( action.isValid() )
951 setCommonProperties( itemData );
953 editorItem->setData(
ItemIdRole, action.id().toString() );
954 editorItem->setData(
ItemNameRole, action.shortTitle().isEmpty() ? action.name() : action.shortTitle() );
968 setCommonProperties( itemData );
976 relationEditorConfig.
label = relationEditor->
label();
980 if ( relation.
id().isEmpty() )
999 setCommonProperties( itemData );
1018 const QList<QgsAttributeEditorElement *> children = container->
children();
1021 loadAttributeEditorElementItem( childElement, editorItem.get() );
1030 setCommonProperties( itemData );
1046 setCommonProperties( itemData );
1062 setCommonProperties( itemData );
1065 textEdConfig.
text = textElementEditor->
text();
1078 setCommonProperties( itemData );
1093 QgsDebugError( QStringLiteral(
"Not loading invalid attribute editor type..." ) );
1098 if ( position >= 0 && position < parent->childCount() )
1100 parent->insertChild( position, std::move( editorItem ) );
1104 parent->addChild( std::move( editorItem ) );
1110 if ( !
index.isValid() )
1124 const bool invalidField = fieldIndex == -1;
1128 bool invalidRelation =
false;
1136 case Qt::DisplayRole:
1142 if ( item->
id().isEmpty() )
1144 return tr(
"Invalid relation" );
1150 return item->
name();
1156 case Qt::ToolTipRole:
1162 return tr(
"Invalid field" );
1166 return item->
name();
1172 if ( !item->
id().isEmpty() )
1175 return tr(
"Invalid relation" );
1182 case Qt::DecorationRole:
1183 return item->
icon();
1185 case Qt::BackgroundRole:
1188 return QBrush( Qt::lightGray );
1193 case Qt::ForegroundRole:
1199 return QBrush( QColor( 255, 0, 0 ) );
1203 return QBrush( QColor( Qt::lightGray ) );
1209 if ( invalidRelation )
1211 return QBrush( QColor( 255, 0, 0 ) );
1215 return QBrush( QColor( Qt::lightGray ) );
1228 QFont font = QFont();
1229 font.setItalic(
true );
1238 QFont font = QFont();
1239 font.setItalic(
true );
1252 return item->
data( role );
1261 if ( !
index.isValid() )
1268 bool result = item->
setData( role, value );
1286 beginRemoveRows(
parent, row, row + count - 1 );
1287 for (
int r = 0; r < count; ++r )
1295 beginRemoveRows(
parent, row, row );
1304 return Qt::MoveAction;
1309 return Qt::DropAction::CopyAction | Qt::DropAction::MoveAction;
1314 return QStringList() << QStringLiteral(
"application/x-qgsattributesformlayoutelement" ) << QStringLiteral(
"application/x-qgsattributesformavailablewidgetsrelement" );
1317QModelIndexList QgsAttributesFormLayoutModel::curateIndexesForMimeData(
const QModelIndexList &indexes )
const
1319 QModelIndexList containerList;
1320 for (
const auto index : indexes )
1325 containerList <<
index;
1329 if ( containerList.size() == 0 )
1332 QModelIndexList curatedIndexes;
1335 for (
const auto index : indexes )
1338 bool redundantChild =
false;
1340 while (
parent.isValid() )
1342 if ( containerList.contains(
parent ) )
1344 redundantChild =
true;
1351 if ( !redundantChild )
1352 curatedIndexes <<
index;
1355 return curatedIndexes;
1360 if ( indexes.count() == 0 )
1364 QModelIndexList curatedIndexes;
1365 if ( indexes.count() > 1 )
1367 curatedIndexes = curateIndexesForMimeData( indexes );
1371 curatedIndexes = indexes;
1375 if ( types.isEmpty() )
1378 QMimeData *
data =
new QMimeData();
1379 const QString format = types.at( 0 );
1381 QDataStream stream( &encoded, QIODevice::WriteOnly );
1384 std::sort( curatedIndexes.begin(), curatedIndexes.end(), [
this](
const QModelIndex &a,
const QModelIndex &b ) {
1385 return indexLessThan( a, b );
1388 for (
const QModelIndex &
index : std::as_const( curatedIndexes ) )
1390 if (
index.isValid() )
1394 QDomElement rootElem = doc.createElement( QStringLiteral(
"form_layout_mime" ) );
1397 rootElem.appendChild( editorElem );
1399 doc.appendChild( rootElem );
1400 stream << doc.toString( -1 );
1404 data->setData( format, encoded );
1411 bool isDropSuccessful =
false;
1417 if ( action == Qt::IgnoreAction )
1419 isDropSuccessful =
true;
1421 else if (
data->hasFormat( QStringLiteral(
"application/x-qgsattributesformavailablewidgetsrelement" ) ) )
1423 Q_ASSERT( action == Qt::CopyAction );
1424 QByteArray itemData =
data->data( QStringLiteral(
"application/x-qgsattributesformavailablewidgetsrelement" ) );
1425 QDataStream stream( &itemData, QIODevice::ReadOnly );
1427 while ( !stream.atEnd() )
1432 stream >> itemId >> itemTypeInt >> itemName;
1437 isDropSuccessful =
true;
1439 QModelIndex addedIndex =
index( row + rows, 0,
parent );
1445 else if (
data->hasFormat( QStringLiteral(
"application/x-qgsattributesformlayoutelement" ) ) )
1447 Q_ASSERT( action == Qt::MoveAction );
1448 QByteArray itemData =
data->data( QStringLiteral(
"application/x-qgsattributesformlayoutelement" ) );
1449 QDataStream stream( &itemData, QIODevice::ReadOnly );
1451 while ( !stream.atEnd() )
1457 if ( !doc.setContent( text ) )
1459 const QDomElement rootElem = doc.documentElement();
1460 if ( rootElem.tagName() != QLatin1String(
"form_layout_mime" ) || !rootElem.hasChildNodes() )
1462 const QDomElement childElem = rootElem.firstChild().toElement();
1466 beginInsertRows(
parent, row + rows, row + rows );
1470 isDropSuccessful =
true;
1472 QModelIndex addedIndex =
index( row + rows, 0,
parent );
1479 return isDropSuccessful;
1482void QgsAttributesFormLayoutModel::updateAliasForFieldItemsRecursive(
QgsAttributesFormItem *parent,
const QString &fieldName,
const QString &fieldAlias )
1484 for (
int i = 0; i <
parent->childCount(); i++ )
1490 const QModelIndex
index = createIndex( child->
row(), 0, child );
1496 updateAliasForFieldItemsRecursive( child, fieldName, fieldAlias );
1503 updateAliasForFieldItemsRecursive(
mRootItem.get(), fieldName, fieldAlias );
1506QList< QgsAddAttributeFormContainerDialog::ContainerPair > QgsAttributesFormLayoutModel::recursiveListOfContainers(
QgsAttributesFormItem *parent )
const
1508 QList< QgsAddAttributeFormContainerDialog::ContainerPair > containerList;
1509 for (
int i = 0; i <
parent->childCount(); i++ )
1519 containerList.append( recursiveListOfContainers( child ) );
1523 return containerList;
1535 switch ( indexType )
1572 bool isTopLevel = !
index.parent().isValid();
1584 QModelIndex childIndex;
1592 widgetDef = container;
1600 widgetDef = element;
1608 widgetDef = element;
1616 widgetDef = element;
1624 widgetDef = element;
1646 return recursiveListOfContainers(
mRootItem.get() );
1655 std::unique_ptr< QgsAttributesFormItem > containerItem = std::make_unique< QgsAttributesFormItem >(
QgsAttributesFormData::Container, name, QString(), parentItem );
1663 parentItem->
addChild( std::move( containerItem ) );
1673 beginInsertRows(
parent, row, row );
1674 std::unique_ptr< QgsAttributesFormItem > item = std::make_unique< QgsAttributesFormItem >();
1686 : QSortFilterProxyModel( parent )
1693 QSortFilterProxyModel::setSourceModel( mModel );
1713 if ( mFilterText.isEmpty() )
1716 QModelIndex sourceIndex = sourceModel()->index( sourceRow, 0, sourceParent );
1717 if ( !sourceIndex.isValid() )
1725 QModelIndex parent = sourceIndex.
parent();
1726 while ( parent.isValid() )
1731 parent = parent.
parent();
AttributeEditorContainerType
Attribute editor container types.
@ Action
A layer action element.
@ QmlElement
A QML element.
@ HtmlElement
A HTML element.
@ TextElement
A text element.
@ SpacerElement
A spacer element.
QList< QgsAction > actions(const QString &actionScope=QString()) const
Returns a list of actions that are available in the given action scope.
QgsAction action(QUuid id) const
Gets an action by its id.
Utility class that encapsulates an action based on vector attributes.
This element will load a layer action onto the form.
const QgsAction & action(const QgsVectorLayer *layer) const
Returns the (possibly lazy loaded) action for the given layer.
A container for attribute editors, used to group them visually in the attribute form if it is set to ...
virtual void addChildElement(QgsAttributeEditorElement *element)
Add a child element to this container.
QgsOptionalExpression visibilityExpression() const
The visibility expression is used in the attribute form to show or hide this container based on an ex...
void setColumnCount(int columnCount)
Set the number of columns in this group.
void setVisibilityExpression(const QgsOptionalExpression &visibilityExpression)
The visibility expression is used in the attribute form to show or hide this container based on an ex...
QgsOptionalExpression collapsedExpression() const
The collapsed expression is used in the attribute form to set the collapsed status of the group box c...
bool collapsed() const
For group box containers returns true if this group box is collapsed.
Qgis::AttributeEditorContainerType type() const
Returns the container type.
void setType(Qgis::AttributeEditorContainerType type)
Sets the container type.
void setCollapsedExpression(const QgsOptionalExpression &collapsedExpression)
The collapsed expression is used in the attribute form to set the collapsed status of the group box o...
QList< QgsAttributeEditorElement * > children() const
Gets a list of the children elements of this container.
QColor backgroundColor() const
Returns the background color of the container.
void setCollapsed(bool collapsed)
For group box containers sets if this group box is collapsed.
int columnCount() const
Gets the number of columns in this group.
void setBackgroundColor(const QColor &backgroundColor)
Sets the background color to backgroundColor.
An abstract base class for any elements of a drag and drop form.
void setHorizontalStretch(int stretch)
Sets the horizontal stretch factor for the element.
QDomElement toDomElement(QDomDocument &doc) const
Gets the XML Dom element to save this element.
LabelStyle labelStyle() const
Returns the label style.
void setLabelStyle(const LabelStyle &labelStyle)
Sets the labelStyle.
Qgis::AttributeEditorType type() const
The type of this element.
int verticalStretch() const
Returns the vertical stretch factor for the element.
bool showLabel() const
Controls if this element should be labeled with a title (field, relation or groupname).
QString name() const
Returns the name of this element.
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.
void setVerticalStretch(int stretch)
Sets the vertical stretch factor for the element.
void setShowLabel(bool showLabel)
Controls if this element should be labeled with a title (field, relation or groupname).
int horizontalStretch() const
Returns the horizontal stretch factor for the element.
This element will load a field's widget onto the form.
An attribute editor widget that will represent arbitrary HTML code.
QString htmlCode() const
The Html code that will be represented within this widget.
void setHtmlCode(const QString &htmlCode)
Sets the HTML code that will be represented within this widget to htmlCode.
An attribute editor widget that will represent arbitrary QML code.
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.
This element will load a relation editor onto the form.
void setNmRelationId(const QVariant &nmRelationId=QVariant())
Sets nmRelationId for the relation id of the second relation involved in an N:M relation.
void setRelationWidgetTypeId(const QString &relationWidgetTypeId)
Sets the relation widget type.
const QgsRelation & relation() const
Gets the id of the relation which shall be embedded.
QVariantMap relationEditorConfiguration() const
Returns the relation editor widget configuration.
void setForceSuppressFormPopup(bool forceSuppressFormPopup)
Sets force suppress form popup status to forceSuppressFormPopup.
QVariant nmRelationId() const
Determines the relation id of the second relation involved in an N:M relation.
bool forceSuppressFormPopup() const
Determines the force suppress form popup status.
QString relationWidgetTypeId() const
Returns the current relation widget type id.
void setRelationEditorConfiguration(const QVariantMap &config)
Sets the relation editor configuration.
void setLabel(const QString &label=QString())
Sets label for this element If it's empty it takes the relation id as label.
QString label() const
Determines the label of this element.
An attribute editor widget that will represent a spacer.
void setDrawLine(bool drawLine)
Sets a flag to define if the spacer element will contain an horizontal line.
bool drawLine() const
Returns true if the spacer element will contain an horizontal line.
An attribute editor widget that will represent arbitrary text code.
void setText(const QString &text)
Sets the text that will be represented within this widget to text.
QString text() const
The Text that will be represented within this widget.
Encapsulate a field in an attribute table or data source.
Qgis::FieldDomainSplitPolicy splitPolicy() const
Returns the field's split policy, which indicates how field values should be handled during a split o...
Qgis::FieldDuplicatePolicy duplicatePolicy() const
Returns the field's duplicate policy, which indicates how field values should be handled during a dup...
Qgis::FieldDomainMergePolicy mergePolicy() const
Returns the field's merge policy, which indicates how field values should be handled during a merge o...
QgsFieldConstraints constraints
Container of fields for a vector layer.
Q_INVOKABLE int indexOf(const QString &fieldName) const
Gets the field index from the field name.
QgsField field(int fieldIdx) const
Returns the field at particular index (must be in range 0..N-1).
int size() const
Returns number of items.
QgsField at(int i) const
Returns the field at particular index (must be in range 0..N-1).
Q_INVOKABLE int lookupField(const QString &fieldName) const
Looks up field's index from the field name.
QIcon iconForField(int fieldIdx, bool considerOrigin=false) const
Returns an icon corresponding to a field index, based on the field's type and source.
static QgsEditorWidgetRegistry * editorWidgetRegistry()
Returns the global editor widget registry, used for managing all known edit widget factories.
An expression with an additional enabled flag.
A relation where the referenced (parent) layer is calculated based on fields from the referencing (ch...
Encapsulates a QGIS project, including sets of map layers and their styles, layouts,...
QgsRelationManager * relationManager
static QgsProject * instance()
Returns the QgsProject singleton instance.
A container for the context for various read/write operations on objects.
QList< QgsRelation > referencedRelations(const QgsVectorLayer *layer=nullptr) const
Gets all relations where this layer is the referenced part (i.e.
Q_INVOKABLE QgsRelation relation(const QString &id) const
Gets access to a relation by its id.
Represents a relationship between two vector layers.
Represents a vector layer which manages a vector based dataset.
QgsActionManager * actions()
Returns all layer actions defined on this layer.
QgsEditFormConfig editFormConfig
#define QgsDebugError(str)
The TabStyle struct defines color and font overrides for form fields, tabs and groups labels.