QGIS API Documentation  3.2.0-Bonn (bc43194)
Public Member Functions | List of all members
QgsColorSwatchDelegate Class Reference

A delegate for showing a color swatch in a list. More...

#include <qgscolorschemelist.h>

Inheritance diagram for QgsColorSwatchDelegate:
Inheritance graph
[legend]

Public Member Functions

 QgsColorSwatchDelegate (QWidget *parent=nullptr)
 
bool editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) override
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
QSize sizeHint (const QStyleOptionViewItem &option, const QModelIndex &index) const override
 

Detailed Description

A delegate for showing a color swatch in a list.

See also
QgsColorSchemeList
Since
QGIS 2.5

Definition at line 36 of file qgscolorschemelist.h.

Constructor & Destructor Documentation

◆ QgsColorSwatchDelegate()

QgsColorSwatchDelegate::QgsColorSwatchDelegate ( QWidget *  parent = nullptr)

Definition at line 676 of file qgscolorschemelist.cpp.

Member Function Documentation

◆ editorEvent()

bool QgsColorSwatchDelegate::editorEvent ( QEvent *  event,
QAbstractItemModel *  model,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
)
override

Definition at line 746 of file qgscolorschemelist.cpp.

◆ paint()

void QgsColorSwatchDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Definition at line 683 of file qgscolorschemelist.cpp.

◆ sizeHint()

QSize QgsColorSwatchDelegate::sizeHint ( const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Definition at line 739 of file qgscolorschemelist.cpp.


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