| 
    QGIS API Documentation 3.99.0-Master (f78f5286a64)
    
   | 
 
Manages available widgets when configuring attributes forms. More...
#include <qgsattributesformmodel.h>

Public Slots | |
| void | populate () override | 
| void | populateLayerActions (const QList< QgsAction > actions) | 
| Refresh layer actions in the model to keep an updated action list.   | |
  Public Slots inherited from QgsAttributesFormModel | |
| virtual void | populate ()=0 | 
| Populates the model with initial data read from the layer.   | |
Public Member Functions | |
| QgsAttributesAvailableWidgetsModel (QgsVectorLayer *layer, QgsProject *project, QObject *parent=nullptr) | |
| Constructor for QgsAttributesAvailableWidgetsModel, with the given parent.   | |
| QModelIndex | actionContainer () const | 
| Returns the action container in this model, expected to be placed at the third top-level row.   | |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override | 
| QModelIndex | fieldContainer () const | 
| Returns the field container in this model, expected to be placed at the first top-level row.   | |
| QModelIndex | fieldModelIndex (const QString &fieldName) const | 
| Returns the model index that corresponds to the field with the given fieldName.   | |
| Qt::ItemFlags | flags (const QModelIndex &index) const override | 
| QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override | 
| QMimeData * | mimeData (const QModelIndexList &indexes) const override | 
| QStringList | mimeTypes () const override | 
| QModelIndex | relationContainer () const | 
| Returns the relation container in this model, expected to be placed at the second top-level row.   | |
| bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override | 
| Qt::DropActions | supportedDragActions () const override | 
  Public Member Functions inherited from QgsAttributesFormModel | |
| QgsAttributesFormModel (QgsVectorLayer *layer, QgsProject *project, QObject *parent=nullptr) | |
| Constructor for QgsAttributesFormModel, with the given parent.   | |
| ~QgsAttributesFormModel () override | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override | 
| QModelIndex | firstRecursiveMatchingModelIndex (const QgsAttributesFormData::AttributesFormItemType &itemType, const QString &itemId) const | 
| Returns the first model index that matches the given itemType and itemId, recursively.   | |
| QModelIndex | firstTopMatchingModelIndex (const QgsAttributesFormData::AttributesFormItemType &itemType, const QString &itemId) const | 
| Returns the first top-level model index that matches the given itemType and itemId.   | |
| QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const override | 
| QModelIndex | parent (const QModelIndex &index) const override | 
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override | 
| void | setShowAliases (bool show) | 
| Sets whether field aliases should be preferred over field names as item text.   | |
| bool | showAliases () const | 
| Returns whether field aliases are preferred over field names as item text.   | |
Additional Inherited Members | |
  Public Types inherited from QgsAttributesFormModel | |
| enum | ItemRoles {  ItemDataRole = Qt::UserRole , ItemFieldConfigRole , ItemNameRole , ItemIdRole , ItemTypeRole , ItemDisplayRole }  | 
| Custom model roles.  More... | |
  Protected Member Functions inherited from QgsAttributesFormModel | |
| void | emitDataChangedRecursively (const QModelIndex &parent=QModelIndex(), const QVector< int > &roles=QVector< int >()) | 
| Emits dataChanged signal for all parent items in a model.   | |
| bool | indexLessThan (const QModelIndex &a, const QModelIndex &b) const | 
| Auxiliary function to sort indexes, returning true if index a is less than index b.   | |
| QgsAttributesFormItem * | itemForIndex (const QModelIndex &index) const | 
| Returns the underlying item that corresponds to the given index.   | |
| QVector< int > | rootToLeafPath (QgsAttributesFormItem *item) const | 
| Returns a QVector of iterative positions from root item to the given item.   | |
  Protected Attributes inherited from QgsAttributesFormModel | |
| QgsVectorLayer * | mLayer | 
| QgsProject * | mProject | 
| std::unique_ptr< QgsAttributesFormItem > | mRootItem | 
| bool | mShowAliases = false | 
Manages available widgets when configuring attributes forms.
Definition at line 656 of file qgsattributesformmodel.h.
      
  | 
  explicit | 
Constructor for QgsAttributesAvailableWidgetsModel, with the given parent.
The given layer and project are the data sources to populate the model.
Definition at line 478 of file qgsattributesformmodel.cpp.
| QModelIndex QgsAttributesAvailableWidgetsModel::actionContainer | ( | ) | const | 
Returns the action container in this model, expected to be placed at the third top-level row.
If there is no action container set, an invalid index is returned.
Definition at line 847 of file qgsattributesformmodel.cpp.
      
  | 
  override | 
Definition at line 657 of file qgsattributesformmodel.cpp.
| QModelIndex QgsAttributesAvailableWidgetsModel::fieldContainer | ( | ) | const | 
Returns the field container in this model, expected to be placed at the first top-level row.
If there is no field container set, an invalid index is returned.
Definition at line 823 of file qgsattributesformmodel.cpp.
| QModelIndex QgsAttributesAvailableWidgetsModel::fieldModelIndex | ( | const QString & | fieldName | ) | const | 
Returns the model index that corresponds to the field with the given fieldName.
Definition at line 859 of file qgsattributesformmodel.cpp.
      
  | 
  override | 
Definition at line 483 of file qgsattributesformmodel.cpp.
      
  | 
  override | 
Definition at line 499 of file qgsattributesformmodel.cpp.
      
  | 
  override | 
Definition at line 786 of file qgsattributesformmodel.cpp.
      
  | 
  override | 
Definition at line 781 of file qgsattributesformmodel.cpp.
      
  | 
  overrideslot | 
Definition at line 505 of file qgsattributesformmodel.cpp.
      
  | 
  slot | 
Refresh layer actions in the model to keep an updated action list.
| actions | Up-to-date list of actions | 
Definition at line 606 of file qgsattributesformmodel.cpp.
| QModelIndex QgsAttributesAvailableWidgetsModel::relationContainer | ( | ) | const | 
Returns the relation container in this model, expected to be placed at the second top-level row.
If there is no relation container set, an invalid index is returned.
Definition at line 835 of file qgsattributesformmodel.cpp.
      
  | 
  override | 
Definition at line 762 of file qgsattributesformmodel.cpp.
      
  | 
  override | 
Definition at line 776 of file qgsattributesformmodel.cpp.