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

Method sizeHintForColumn

kdevplatform/util/focusedtreeview.cpp:64–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64int FocusedTreeView::sizeHintForColumn(int column) const
65{
66 QModelIndex i = indexAt(QPoint(0, 0));
67 if (i.isValid()) {
68 QSize hint = sizeHintForIndex(i);
69 int maxWidth = hint.width();
70 if (hint.height()) {
71 //Also consider one item above, because else we can get problems with
72 //the vertical scroll-bar
73 for (int a = -1; a < (height() / hint.height()) + 1; ++a) {
74 QModelIndex current = i.sibling(i.row() + a, column);
75 QSize tempHint = sizeHintForIndex(current);
76 if (tempHint.width() > maxWidth)
77 maxWidth = tempHint.width();
78 }
79 }
80 return maxWidth;
81 }
82 return columnWidth(column);
83}
84
85void FocusedTreeView::fitColumns()
86{

Callers

nothing calls this directly

Calls 4

siblingMethod · 0.80
QPointClass · 0.50
isValidMethod · 0.45
rowMethod · 0.45

Tested by

no test coverage detected