Workspace 6.21.5
Public Member Functions | List of all members
CustomWidgetItemDelegate Class Reference

Creates an editor widget based on the underlying data's type and preferred display widget.

#include <Tools/GlobalsComparison/Application/Widgets/customwidgetitemdelegate.h>

Inheritance diagram for CustomWidgetItemDelegate:
[legend]

Public Member Functions

 CustomWidgetItemDelegate (int stringHighlightRole, QObject *parent=nullptr)
 
QWidget * createEditor (QWidget *parent, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
 
bool editorEvent (QEvent *event, QAbstractItemModel *model, const QStyleOptionViewItem &option, const QModelIndex &index) Q_DECL_OVERRIDE
 
void setEditorData (QWidget *editor, const QModelIndex &index) const Q_DECL_OVERRIDE
 
void setModelData (QWidget *editor, QAbstractItemModel *model, const QModelIndex &index) const Q_DECL_OVERRIDE
 
void updateEditorGeometry (QWidget *editor, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
 
- Public Member Functions inherited from DifferenceHighlightingStyledItemDelegate
 DifferenceHighlightingStyledItemDelegate (const QBrush &highlightBrush, const QColor &constrastColour, int stringHighlightRole, QObject *parent=nullptr)
 An styled item delegate that colours the display cell of an item to highlight differences between the text displayed and an alternative cell.
 
 DifferenceHighlightingStyledItemDelegate (int stringHighlightRole, QObject *parent=nullptr)
 An styled item delegate that colours the display cell of an item dark or light grey to highlight differences between the text displayed and an alternative cell.
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
 
void setColours (const QBrush &highlightBrush, const QColor &constrastColour)
 

Additional Inherited Members

- Protected Member Functions inherited from DifferenceHighlightingStyledItemDelegate
void drawVerticalLines (QPainter &painter, const int top, const int left, const int width, const QColor &color, const QVector< int > &columns) const
 

Constructor & Destructor Documentation

◆ CustomWidgetItemDelegate()

CustomWidgetItemDelegate ( int  stringHighlightRole,
QObject *  parent = nullptr 
)

Member Function Documentation

◆ createEditor()

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

◆ editorEvent()

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

◆ setEditorData()

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

◆ setModelData()

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

◆ updateEditorGeometry()

void updateEditorGeometry ( QWidget *  editor,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const