|
QGIS API Documentation 3.99.0-Master (2fe06baccd8)
|
Graphical representation for the attribute drag and drop editor. More...
#include <qgsattributesformview.h>

Public Slots | |
| void | selectFirstMatchingItem (const QgsAttributesFormData::AttributesFormItemType &itemType, const QString &itemId) |
| Selects the first item that matches a itemType and a itemId. | |
| void | setFilterText (const QString &text) |
| Sets the filter text to the underlying proxy model. | |
Public Member Functions | |
| QgsAttributesFormBaseView (QgsVectorLayer *layer, QWidget *parent=nullptr) | |
| Constructor for QgsAttributesFormBaseView, with the given parent. | |
| void | addIndicator (QgsAttributesFormItem *item, QgsAttributesFormTreeViewIndicator *indicator) |
| Adds the indicator to the given item. | |
| QgsExpressionContext | createExpressionContext () const override |
| This method needs to be reimplemented in all classes which implement this interface and return an expression context. | |
| QModelIndex | firstSelectedIndex () const |
| Returns the source model index corresponding to the first selected row. | |
| const QList< QgsAttributesFormTreeViewIndicator * > | indicators (const QModelIndex &index) const |
| Returns the list of indicators associated with a given index. | |
| const QList< QgsAttributesFormTreeViewIndicator * > | indicators (QgsAttributesFormItem *item) const |
| Returns the list of indicators associated with a given item. | |
| void | removeAllIndicators () |
| Removes all indicators in the current view. | |
| void | removeIndicator (QgsAttributesFormItem *item, QgsAttributesFormTreeViewIndicator *indicator) |
| Removes the indicator from the given item. | |
| QgsAttributesFormModel * | sourceModel () const |
| Returns the underlying QgsAttributesFormModel model where the view gets data from. | |
| Public Member Functions inherited from QgsExpressionContextGenerator | |
| virtual | ~QgsExpressionContextGenerator ()=default |
Protected Attributes | |
| QHash< QgsAttributesFormItem *, QList< QgsAttributesFormTreeViewIndicator * > > | mIndicators |
| Storage of indicators used with the tree view. | |
| QgsVectorLayer * | mLayer = nullptr |
| QgsAttributesFormProxyModel * | mModel = nullptr |
Graphical representation for the attribute drag and drop editor.
Definition at line 36 of file qgsattributesformview.h.
|
explicit |
Constructor for QgsAttributesFormBaseView, with the given parent.
The given layer is used to build an expression context with the layer scope.
Definition at line 49 of file qgsattributesformview.cpp.
| void QgsAttributesFormBaseView::addIndicator | ( | QgsAttributesFormItem * | item, |
| QgsAttributesFormTreeViewIndicator * | indicator ) |
Adds the indicator to the given item.
Definition at line 114 of file qgsattributesformview.cpp.
|
overridevirtual |
This method needs to be reimplemented in all classes which implement this interface and return an expression context.
Implements QgsExpressionContextGenerator.
Definition at line 63 of file qgsattributesformview.cpp.
| QModelIndex QgsAttributesFormBaseView::firstSelectedIndex | ( | ) | const |
Returns the source model index corresponding to the first selected row.
Definition at line 55 of file qgsattributesformview.cpp.
| const QList< QgsAttributesFormTreeViewIndicator * > QgsAttributesFormBaseView::indicators | ( | const QModelIndex & | index | ) | const |
Returns the list of indicators associated with a given index.
Definition at line 103 of file qgsattributesformview.cpp.
| const QList< QgsAttributesFormTreeViewIndicator * > QgsAttributesFormBaseView::indicators | ( | QgsAttributesFormItem * | item | ) | const |
Returns the list of indicators associated with a given item.
Definition at line 109 of file qgsattributesformview.cpp.
| void QgsAttributesFormBaseView::removeAllIndicators | ( | ) |
Removes all indicators in the current view.
Definition at line 134 of file qgsattributesformview.cpp.
| void QgsAttributesFormBaseView::removeIndicator | ( | QgsAttributesFormItem * | item, |
| QgsAttributesFormTreeViewIndicator * | indicator ) |
Removes the indicator from the given item.
Definition at line 128 of file qgsattributesformview.cpp.
|
slot |
Selects the first item that matches a itemType and a itemId.
Helps to keep in sync selection from both Attribute Widget view and Form Layout view.
Definition at line 76 of file qgsattributesformview.cpp.
|
slot |
Sets the filter text to the underlying proxy model.
| text | Filter text to be used to filter source model items. |
Definition at line 98 of file qgsattributesformview.cpp.
| QgsAttributesFormModel * QgsAttributesFormBaseView::sourceModel | ( | ) | const |
Returns the underlying QgsAttributesFormModel model where the view gets data from.
Definition at line 146 of file qgsattributesformview.cpp.
|
protected |
Storage of indicators used with the tree view.
Definition at line 121 of file qgsattributesformview.h.
|
protected |
Definition at line 117 of file qgsattributesformview.h.
|
protected |
Definition at line 118 of file qgsattributesformview.h.