MCPcopy Create free account
hub / github.com/davy7125/polyphone / OverviewTableHeaderView

Method OverviewTableHeaderView

sources/editor/overview/tablepageoverview.cpp:43–68  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43OverviewTableHeaderView::OverviewTableHeaderView(QWidget *parent) : QHeaderView(Qt::Horizontal, parent)
44{
45#if QT_VERSION >= QT_VERSION_CHECK(5, 0, 0)
46 this->setSectionResizeMode(QHeaderView::ResizeToContents);
47#else
48 this->setResizeMode(QHeaderView::ResizeToContents);
49#endif
50
51 // Text in bold
52 this->setHighlightSections(false);
53 QFont font = this->font();
54 font.setBold(true);
55 this->setFont(font);
56
57 // Height of the header
58 QFontMetrics fm(this->font());
59 _height = fm.height() * 2 + 8;
60
61 // Pixmap, text color for painting a section
62 _arrowDown = ContextManager::theme()->getColoredSvg(":/icons/arrow_down.svg", QSize(12, 12), ThemeManager::LIST_TEXT);
63 _arrowUp = ContextManager::theme()->getColoredSvg(":/icons/arrow_up.svg", QSize(12, 12), ThemeManager::LIST_TEXT);
64 _textColor = ContextManager::theme()->getColor(ThemeManager::LIST_TEXT);
65
66 // The sections can be clicked for sorting rows
67 this->setSectionsClickable(true);
68}
69
70const int OverviewTableHeaderView::MARGIN = 4;
71

Callers

nothing calls this directly

Calls 2

getColoredSvgMethod · 0.80
getColorMethod · 0.45

Tested by

no test coverage detected