MCPcopy Create free account
hub / github.com/KDE/kdevelop / editorEvent

Method editorEvent

plugins/quickopen/expandingtree/expandingdelegate.cpp:307–321  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

305}
306
307bool ExpandingDelegate::editorEvent(QEvent* event, QAbstractItemModel* /*model*/, const QStyleOptionViewItem& /*option*/, const QModelIndex& index)
308{
309 if (event->type() == QEvent::MouseButtonRelease) {
310 const QModelIndex sourceIndex = model()->mapToSource(index);
311 event->accept();
312 model()->setExpanded(sourceIndex, !model()->isExpanded(sourceIndex));
313 heightChanged();
314
315 return true;
316 } else {
317 event->ignore();
318 }
319
320 return false;
321}
322
323QVector<QTextLayout::FormatRange> ExpandingDelegate::highlightingFromVariantList(const QList<QVariant>& customHighlights) const
324{

Callers

nothing calls this directly

Calls 7

modelFunction · 0.85
isExpandedMethod · 0.80
ignoreMethod · 0.80
typeMethod · 0.45
mapToSourceMethod · 0.45
acceptMethod · 0.45
setExpandedMethod · 0.45

Tested by

no test coverage detected