BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
QCheckListStyledItemDelegate Class Reference

Provides custom style delegate for QComboBox to allow checkboxes. More...

Inheritance diagram for QCheckListStyledItemDelegate:
[legend]
Collaboration diagram for QCheckListStyledItemDelegate:
[legend]

Public Member Functions

 QCheckListStyledItemDelegate (QObject *parent=nullptr)
 
 QCheckListStyledItemDelegate (QObject *parent=nullptr)
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
 
void paint (QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override
 

Detailed Description

Provides custom style delegate for QComboBox to allow checkboxes.

Definition at line 59 of file MultiComboPropertyEditor.h.

Constructor & Destructor Documentation

◆ QCheckListStyledItemDelegate() [1/2]

QCheckListStyledItemDelegate::QCheckListStyledItemDelegate ( QObject *  parent = nullptr)

Definition at line 27 of file MultiComboPropertyEditor.cpp.

28  : QStyledItemDelegate(parent)
29 {
30 }

◆ QCheckListStyledItemDelegate() [2/2]

QCheckListStyledItemDelegate::QCheckListStyledItemDelegate ( QObject *  parent = nullptr)
inline

Definition at line 40 of file selectablecomboboxeditor.cpp.

40 : QStyledItemDelegate(parent) {}

Member Function Documentation

◆ paint() [1/2]

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

Definition at line 32 of file MultiComboPropertyEditor.cpp.

34 {
35  QStyleOptionViewItem& styleOption = const_cast<QStyleOptionViewItem&>(option);
36  styleOption.showDecorationSelected = false;
37  QStyledItemDelegate::paint(painter, styleOption, index);
38 }

◆ paint() [2/2]

void QCheckListStyledItemDelegate::paint ( QPainter *  painter,
const QStyleOptionViewItem &  option,
const QModelIndex &  index 
) const
inlineoverride

Definition at line 42 of file selectablecomboboxeditor.cpp.

44  {
45  auto styleOption = const_cast<QStyleOptionViewItem&>(option);
46  styleOption.showDecorationSelected = false;
47  QStyledItemDelegate::paint(painter, styleOption, index);
48  }

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