Public Member Functions | Protected Member Functions | List of all members
pqMultiColumnHeaderView Class Reference

QHeaderView that supports showing multiple sections as one. More...

#include <pqMultiColumnHeaderView.h>

Inherits QHeaderView.

Public Member Functions

 pqMultiColumnHeaderView (Qt::Orientation orientation, QWidget *parent=nullptr)
 ~pqMultiColumnHeaderView () override

Protected Member Functions

void paintSection (QPainter *painter, const QRect &rect, int logicalIndex) const override

Detailed Description

QHeaderView that supports showing multiple sections as one.

pqMultiColumnHeaderView extents QHeaderView to support showing multiple adjacent sections as a single section. This is useful for showing vector quantities, for example. Instead of each component taking up header space and making it confusing to understand that the various sections are part of the same vector, pqMultiColumnHeaderView can show all those sections under a single banner. It still supports resizing individual sections thus does not inhibit usability.

pqMultiColumnHeaderView simply combines adjacent sections with same (non-empty) QString value for Qt::DisplayRole. This is done by overriding QHeaderView::paintSection and custom painting such sections spanning multiple sections.

Definition at line 27 of file pqMultiColumnHeaderView.h.

Constructor & Destructor Documentation

◆ pqMultiColumnHeaderView()

pqMultiColumnHeaderView::pqMultiColumnHeaderView ( Qt::Orientation  orientation,
QWidget *  parent = nullptr 

◆ ~pqMultiColumnHeaderView()

pqMultiColumnHeaderView::~pqMultiColumnHeaderView ( )

Member Function Documentation

◆ paintSection()

void pqMultiColumnHeaderView::paintSection ( QPainter *  painter,
const QRect &  rect,
int  logicalIndex 
) const

The documentation for this class was generated from the following file: