| 41 | } |
| 42 | |
| 43 | OverviewTableHeaderView::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 | |
| 70 | const int OverviewTableHeaderView::MARGIN = 4; |
| 71 |
nothing calls this directly
no test coverage detected