QGIS API Documentation 3.99.0-Master (26c88405ac0)
Loading...
Searching...
No Matches
QgsFeatureListViewDelegate Class Reference

Custom item delegate for feature list views. More...

#include <qgsfeaturelistviewdelegate.h>

Inheritance diagram for QgsFeatureListViewDelegate:

Public Types

enum  Element { EditElement , SelectionElement }

Signals

void editButtonClicked (QModelIndex &index)
 Emitted when the edit button is clicked for the feature with matching index.

Public Member Functions

 QgsFeatureListViewDelegate (QgsFeatureListModel *listModel, QObject *parent=nullptr)
Element positionToElement (QPoint pos)
void setCurrentFeatureEdited (bool state)
void setEditSelectionModel (QItemSelectionModel *editSelectionModel)
void setFeatureSelectionModel (QgsFeatureSelectionModel *featureSelectionModel)

Static Public Attributes

static const int ICON_SIZE = 24

Protected Member Functions

void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override

Detailed Description

Custom item delegate for feature list views.

Definition at line 33 of file qgsfeaturelistviewdelegate.h.

Member Enumeration Documentation

◆ Element

Enumerator
EditElement 
SelectionElement 

Definition at line 40 of file qgsfeaturelistviewdelegate.h.

Constructor & Destructor Documentation

◆ QgsFeatureListViewDelegate()

QgsFeatureListViewDelegate::QgsFeatureListViewDelegate ( QgsFeatureListModel * listModel,
QObject * parent = nullptr )
explicit

Definition at line 33 of file qgsfeaturelistviewdelegate.cpp.

Member Function Documentation

◆ editButtonClicked

void QgsFeatureListViewDelegate::editButtonClicked ( QModelIndex & index)
signal

Emitted when the edit button is clicked for the feature with matching index.

◆ paint()

void QgsFeatureListViewDelegate::paint ( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index ) const
overrideprotected

Definition at line 74 of file qgsfeaturelistviewdelegate.cpp.

◆ positionToElement()

QgsFeatureListViewDelegate::Element QgsFeatureListViewDelegate::positionToElement ( QPoint pos)

Definition at line 40 of file qgsfeaturelistviewdelegate.cpp.

◆ setCurrentFeatureEdited()

void QgsFeatureListViewDelegate::setCurrentFeatureEdited ( bool state)

Definition at line 57 of file qgsfeaturelistviewdelegate.cpp.

◆ setEditSelectionModel()

void QgsFeatureListViewDelegate::setEditSelectionModel ( QItemSelectionModel * editSelectionModel)

Definition at line 62 of file qgsfeaturelistviewdelegate.cpp.

◆ setFeatureSelectionModel()

void QgsFeatureListViewDelegate::setFeatureSelectionModel ( QgsFeatureSelectionModel * featureSelectionModel)

Definition at line 52 of file qgsfeaturelistviewdelegate.cpp.

◆ sizeHint()

QSize QgsFeatureListViewDelegate::sizeHint ( const QStyleOptionViewItem & option,
const QModelIndex & index ) const
overrideprotected

Definition at line 67 of file qgsfeaturelistviewdelegate.cpp.

Member Data Documentation

◆ ICON_SIZE

const int QgsFeatureListViewDelegate::ICON_SIZE = 24
static

Definition at line 38 of file qgsfeaturelistviewdelegate.h.


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