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

Method paint

plugins/documentview/kdevdocumentviewdelegate.cpp:17–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15{}
16
17void KDevDocumentViewDelegate::paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const
18{
19 const QAbstractItemModel * model = index.model();
20 Q_ASSERT( model );
21
22 if ( !model->parent( index ).isValid() )
23 {
24 // this is a top-level item.
25 QStyleOptionViewItem o = option;
26 o.textElideMode = Qt::ElideLeft;
27 QItemDelegate::paint( painter, o, index );
28 }
29 else
30 {
31 QItemDelegate::paint( painter, option, index );
32 }
33}
34
35#include "moc_kdevdocumentviewdelegate.cpp"

Callers

nothing calls this directly

Calls 4

paintFunction · 0.85
modelMethod · 0.45
isValidMethod · 0.45
parentMethod · 0.45

Tested by

no test coverage detected