MCPcopy Create free account
hub / github.com/baldurk/renderdoc / editorEvent

Method editorEvent

qrenderdoc/Code/QRDUtils.cpp:1336–1362  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1334}
1335
1336bool RichTextViewDelegate::editorEvent(QEvent *event, QAbstractItemModel *model,
1337 const QStyleOptionViewItem &option, const QModelIndex &index)
1338{
1339 if(event->type() == QEvent::MouseButtonRelease && index.isValid())
1340 {
1341 QVariant v = index.data();
1342
1343 if(RichResourceTextCheck(v))
1344 {
1345 QRect rect = option.rect;
1346
1347 QIcon icon = index.data(Qt::DecorationRole).value<QIcon>();
1348
1349 if(!icon.isNull())
1350 {
1351 rect.setX(rect.x() +
1352 icon.actualSize(option.decorationSize, QIcon::Normal, QIcon::On).width() + 4);
1353 }
1354
1355 // ignore the return value, we always consume clicks on this cell
1356 RichResourceTextMouseEvent(m_widget, v, rect, option.font, (QMouseEvent *)event);
1357 return true;
1358 }
1359 }
1360
1361 return ForwardingDelegate::editorEvent(event, model, option, index);
1362}
1363
1364bool RichTextViewDelegate::linkHover(QMouseEvent *e, const QFont &font, const QModelIndex &index)
1365{

Callers

nothing calls this directly

Calls 12

RichResourceTextCheckFunction · 0.85
sizeHintFunction · 0.50
QModelIndexClass · 0.50
typeMethod · 0.45
isValidMethod · 0.45
dataMethod · 0.45
isNullMethod · 0.45
setXMethod · 0.45
xMethod · 0.45
widthMethod · 0.45
containsMethod · 0.45

Tested by

no test coverage detected