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

Method data

plugins/quickopen/expandingtree/expandingwidgetmodel.cpp:75–98  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

73}
74
75QVariant ExpandingWidgetModel::data(const QModelIndex& index, int role) const
76{
77 switch (role) {
78 case Qt::BackgroundRole:
79 {
80 if (index.column() == 0) {
81 //Highlight by match-quality
82 uint color = matchColor(index);
83 if (color) {
84 return QBrush(color);
85 }
86 }
87 //Use a special background-color for expanded items
88 if (isExpanded(index)) {
89 if (index.row() & 1) {
90 return doAlternate(treeView()->palette().toolTipBase().color());
91 } else {
92 return treeView()->palette().toolTipBase();
93 }
94 }
95 }
96 }
97 return QVariant();
98}
99
100QModelIndex ExpandingWidgetModel::mapFromSource(const QModelIndex& index) const
101{

Callers 7

drawBranchesMethod · 0.45
getUsedBackgroundColorFunction · 0.45
itemsFunction · 0.45
testProjectFileFilterMethod · 0.45

Calls 5

isExpandedFunction · 0.85
doAlternateFunction · 0.85
QVariantClass · 0.70
columnMethod · 0.45
rowMethod · 0.45