pqCheckableHeaderView.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 pqCheckableHeaderView_h
5 #define pqCheckableHeaderView_h
6 
7 #include "pqWidgetsModule.h"
8 #include <QHeaderView>
9 
14 class pqCheckableHeaderViewInternal;
15 
31 class PQWIDGETS_EXPORT pqCheckableHeaderView : public QHeaderView
32 {
33  Q_OBJECT
34 
35 public:
42  pqCheckableHeaderView(Qt::Orientation orientation, QWidget* parent = nullptr);
43  ~pqCheckableHeaderView() override;
44 
50  QVariant getCheckState(int section);
51 
52 Q_SIGNALS:
61  void checkStateChanged(int section) const;
62 
63 protected:
74  void paintSection(QPainter* painter, const QRect& rect, int logicalIndex) const override;
75 
84  void mousePressEvent(QMouseEvent* event) override;
85 
93  void updateModelCheckState(int section);
94 
95 private:
96  pqCheckableHeaderViewInternal* Internal;
97 };
98 
99 #endif // pqCheckableHeaderView_h
A convenience QHeaderView painted with a QCheckBox.
#define PQWIDGETS_EXPORT
orientation