Public Member Functions | Protected Member Functions | List of all members
pqMaterialAttributesDelegate Class Reference

pqMaterialAttributesDelegate is used to customize material attributes table view. More...

#include <pqMaterialAttributesDelegate.h>

Inherits QStyledItemDelegate.

Public Member Functions

 pqMaterialAttributesDelegate (QObject *parent=nullptr)
 
 ~pqMaterialAttributesDelegate () override=default
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 Create the editor with two columns : one for the property selection and one to modify the value of the property. More...
 
void setEditorData (QWidget *editor, const QModelIndex &index) const override
 do nothing, everything is handled in createEditor method More...
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const override
 Gets data from the editor widget and stores it in the specified model at the item index. More...
 

Protected Member Functions

QWidget * createPropertiesEditor (QVariantList list, QWidget *parent) const
 Generate a custom dialog with appropriate widget from the QVariantList. More...
 
QVariantList getPropertiesFromEditor (QWidget *editor) const
 From the properties editor, create a QVariantList containing each value from widgets. More...
 

Detailed Description

pqMaterialAttributesDelegate is used to customize material attributes table view.

Definition at line 13 of file pqMaterialAttributesDelegate.h.

Constructor & Destructor Documentation

◆ pqMaterialAttributesDelegate()

pqMaterialAttributesDelegate::pqMaterialAttributesDelegate ( QObject *  parent = nullptr)

◆ ~pqMaterialAttributesDelegate()

pqMaterialAttributesDelegate::~pqMaterialAttributesDelegate ( )
overridedefault

Member Function Documentation

◆ paint()

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

◆ createEditor()

QWidget* pqMaterialAttributesDelegate::createEditor ( QWidget *  parent,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
override

Create the editor with two columns : one for the property selection and one to modify the value of the property.

◆ setEditorData()

void pqMaterialAttributesDelegate::setEditorData ( QWidget *  editor,
const QModelIndex &  index 
) const
inlineoverride

do nothing, everything is handled in createEditor method

Definition at line 35 of file pqMaterialAttributesDelegate.h.

◆ setModelData()

void pqMaterialAttributesDelegate::setModelData ( QWidget *  editor,
QAbstractItemModel *  model,
const QModelIndex &  index 
) const
override

Gets data from the editor widget and stores it in the specified model at the item index.

◆ createPropertiesEditor()

QWidget* pqMaterialAttributesDelegate::createPropertiesEditor ( QVariantList  list,
QWidget *  parent 
) const
protected

Generate a custom dialog with appropriate widget from the QVariantList.

◆ getPropertiesFromEditor()

QVariantList pqMaterialAttributesDelegate::getPropertiesFromEditor ( QWidget *  editor) const
protected

From the properties editor, create a QVariantList containing each value from widgets.


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