QGIS API Documentation 3.41.0-Master (45a0abf3bec)
Loading...
Searching...
No Matches
Public Types | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
QgsFeatureListViewDelegate Class Reference

#include <qgsfeaturelistviewdelegate.h>

Inheritance diagram for QgsFeatureListViewDelegate:
Inheritance graph
[legend]

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

Definition at line 31 of file qgsfeaturelistviewdelegate.h.

Member Enumeration Documentation

◆ Element

Enumerator
EditElement 
SelectionElement 

Definition at line 38 of file qgsfeaturelistviewdelegate.h.

Constructor & Destructor Documentation

◆ QgsFeatureListViewDelegate()

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

Definition at line 31 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 72 of file qgsfeaturelistviewdelegate.cpp.

◆ positionToElement()

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

Definition at line 38 of file qgsfeaturelistviewdelegate.cpp.

◆ setCurrentFeatureEdited()

void QgsFeatureListViewDelegate::setCurrentFeatureEdited ( bool  state)

Definition at line 55 of file qgsfeaturelistviewdelegate.cpp.

◆ setEditSelectionModel()

void QgsFeatureListViewDelegate::setEditSelectionModel ( QItemSelectionModel *  editSelectionModel)

Definition at line 60 of file qgsfeaturelistviewdelegate.cpp.

◆ setFeatureSelectionModel()

void QgsFeatureListViewDelegate::setFeatureSelectionModel ( QgsFeatureSelectionModel featureSelectionModel)

Definition at line 50 of file qgsfeaturelistviewdelegate.cpp.

◆ sizeHint()

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

Definition at line 65 of file qgsfeaturelistviewdelegate.cpp.

Member Data Documentation

◆ ICON_SIZE

const int QgsFeatureListViewDelegate::ICON_SIZE = 24
static

Definition at line 36 of file qgsfeaturelistviewdelegate.h.


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