ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
cvMultiColumnHeaderView Class Reference

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

#include <cvMultiColumnHeaderView.h>

Inheritance diagram for cvMultiColumnHeaderView:
Collaboration diagram for cvMultiColumnHeaderView:

Public Member Functions

 cvMultiColumnHeaderView (Qt::Orientation orientation, QWidget *parent=nullptr)
 
 ~cvMultiColumnHeaderView () 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.

cvMultiColumnHeaderView extends 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, cvMultiColumnHeaderView can show all those sections under a single banner. It still supports resizing individual sections thus does not inhibit usability.

cvMultiColumnHeaderView 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.

Reference: ParaView/Qt/Widgets/pqMultiColumnHeaderView.h

Definition at line 33 of file cvMultiColumnHeaderView.h.

Constructor & Destructor Documentation

◆ cvMultiColumnHeaderView()

cvMultiColumnHeaderView::cvMultiColumnHeaderView ( Qt::Orientation  orientation,
QWidget *  parent = nullptr 
)

Definition at line 15 of file cvMultiColumnHeaderView.cpp.

◆ ~cvMultiColumnHeaderView()

cvMultiColumnHeaderView::~cvMultiColumnHeaderView ( )
overridedefault

Member Function Documentation

◆ paintSection()

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

Definition at line 90 of file cvMultiColumnHeaderView.cpp.


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