QGIS API Documentation 3.43.0-Master (a93bf8b6462)
Public Slots | Public Member Functions | Protected Attributes | List of all members
QgsAttributesFormBaseView Class Reference

Graphical representation for the attribute drag and drop editor. More...

#include <qgsattributesformproperties.h>

Inheritance diagram for QgsAttributesFormBaseView:
Inheritance graph
[legend]

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.
 
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.
 
- Public Member Functions inherited from QgsExpressionContextGenerator
virtual ~QgsExpressionContextGenerator ()=default
 

Protected Attributes

QgsVectorLayermLayer = nullptr
 
QgsAttributesFormProxyModelmModel = nullptr
 

Detailed Description

Graphical representation for the attribute drag and drop editor.

Warning
Not part of stable API and may change in future QGIS releases.
Since
QGIS 3.44

Definition at line 204 of file qgsattributesformproperties.h.

Constructor & Destructor Documentation

◆ QgsAttributesFormBaseView()

QgsAttributesFormBaseView::QgsAttributesFormBaseView ( QgsVectorLayer layer,
QWidget *  parent = nullptr 
)
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 891 of file qgsattributesformproperties.cpp.

Member Function Documentation

◆ createExpressionContext()

QgsExpressionContext QgsAttributesFormBaseView::createExpressionContext ( ) const
overridevirtual

This method needs to be reimplemented in all classes which implement this interface and return an expression context.

Implements QgsExpressionContextGenerator.

Definition at line 905 of file qgsattributesformproperties.cpp.

◆ firstSelectedIndex()

QModelIndex QgsAttributesFormBaseView::firstSelectedIndex ( ) const

Returns the source model index corresponding to the first selected row.

Note
The first selected row is the first one the user selected, and not necessarily the one closer to the header.

Definition at line 897 of file qgsattributesformproperties.cpp.

◆ selectFirstMatchingItem

void QgsAttributesFormBaseView::selectFirstMatchingItem ( const QgsAttributesFormData::AttributesFormItemType itemType,
const QString &  itemId 
)
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 918 of file qgsattributesformproperties.cpp.

◆ setFilterText

void QgsAttributesFormBaseView::setFilterText ( const QString &  text)
slot

Sets the filter text to the underlying proxy model.

Parameters
textFilter text to be used to filter source model items.

Definition at line 935 of file qgsattributesformproperties.cpp.

Member Data Documentation

◆ mLayer

QgsVectorLayer* QgsAttributesFormBaseView::mLayer = nullptr
protected

Definition at line 242 of file qgsattributesformproperties.h.

◆ mModel

QgsAttributesFormProxyModel* QgsAttributesFormBaseView::mModel = nullptr
protected

Definition at line 243 of file qgsattributesformproperties.h.


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