pqCheckBoxDelegate.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 
5 #include "pqCoreModule.h"
6 #include <QStyledItemDelegate>
7 
15 class PQCORE_EXPORT pqCheckBoxDelegate : public QStyledItemDelegate
16 {
17  Q_OBJECT
18 
19 public:
21  {
24  NOT_EXPANDED_DISABLED
25  };
26 
27  pqCheckBoxDelegate(QObject* parent);
28  ~pqCheckBoxDelegate() override;
29 
30  void paint(
31  QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override;
32  bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option,
33  const QModelIndex& index) override;
34 
35 private:
36  Q_DISABLE_COPY(pqCheckBoxDelegate)
37  struct pqInternals;
38  pqInternals* Internals;
39 };
#define PQCORE_EXPORT
Definition: pqCoreModule.h:15
Delegate for QTableView to draw a checkbox as an left-right (unchecked) and top-bottom (checked) arro...