MCPcopy Create free account
hub / github.com/KDE/labplot / paint

Method paint

src/frontend/spreadsheet/SpreadsheetItemDelegate.cpp:33–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33void SpreadsheetItemDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const {
34 QItemDelegate::paint(painter, option, index);
35 if (!index.data(static_cast<int>(SpreadsheetModel::CustomDataRole::MaskingRole)).toBool())
36 return;
37
38 painter->save();
39 painter->fillRect(option.rect, QBrush(m_maskingColor, Qt::BDiagPattern));
40 painter->restore();
41}
42
43void SpreadsheetItemDelegate::setModelData(QWidget* editor, QAbstractItemModel* model, const QModelIndex& index) const {
44 model->setData(index, editor->metaObject()->userProperty().read(editor), Qt::EditRole);

Callers

nothing calls this directly

Calls 3

QBrushClass · 0.50
dataMethod · 0.45
saveMethod · 0.45

Tested by

no test coverage detected