pqMultiColumnHeaderView.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-FileCopyrightText: Copyright (c) Sandia Corporation
3 // SPDX-License-Identifier: BSD-3-Clause
4 #ifndef pqMultiColumnHeaderView_h
5 #define pqMultiColumnHeaderView_h
6 
7 #include "pqWidgetsModule.h" // for exports
8 #include <QHeaderView>
9 
27 class PQWIDGETS_EXPORT pqMultiColumnHeaderView : public QHeaderView
28 {
29  Q_OBJECT;
30  typedef QHeaderView Superclass;
31 
32 public:
33  pqMultiColumnHeaderView(Qt::Orientation orientation, QWidget* parent = nullptr);
34  ~pqMultiColumnHeaderView() override;
35 
36 protected:
37  void paintSection(QPainter* painter, const QRect& rect, int logicalIndex) const override;
38 
39 private:
40  QPair<int, int> sectionSpan(int visualIndex) const;
41  QString sectionDisplayText(int logicalIndex) const;
42 
43  Q_DISABLE_COPY(pqMultiColumnHeaderView);
44 };
45 
46 #endif
QHeaderView that supports showing multiple sections as one.
#define PQWIDGETS_EXPORT
orientation