pqTreeWidget.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 #ifndef pqTreeWidget_h
6 #define pqTreeWidget_h
7 
8 #include "pqWidgetsModule.h"
9 #include <QTreeWidget>
10 
11 class vtkPVXMLElement;
12 class vtkSMProperty;
13 class vtkSMPropertyGroup;
29 class PQWIDGETS_EXPORT pqTreeWidget : public QTreeWidget
30 {
31  typedef QTreeWidget Superclass;
32  Q_OBJECT
33 public:
34  pqTreeWidget(QWidget* p = nullptr);
35  ~pqTreeWidget() override;
36 
37  bool event(QEvent* e) override;
38 
42  QSize sizeHint() const override;
43  QSize minimumSizeHint() const override;
44 
45  void setMaximumRowCountBeforeScrolling(vtkSMPropertyGroup* smpropertygroup);
46  void setMaximumRowCountBeforeScrolling(vtkSMProperty* smproperty);
47  void setMaximumRowCountBeforeScrolling(vtkPVXMLElement* hints);
48  void setMaximumRowCountBeforeScrolling(int val) { this->MaximumRowCountBeforeScrolling = val; }
49  int maximumRowCountBeforeScrolling() const { return this->MaximumRowCountBeforeScrolling; }
50 
51 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
52  void allOn();
53  void allOff();
54 
55 Q_SIGNALS:
59  void navigatedPastEnd();
60 
61 protected Q_SLOTS:
62  void doToggle(int col);
63  void updateCheckState();
64  void invalidateLayout();
65 
66 private Q_SLOTS:
67  void updateCheckStateInternal();
68 
69 protected:
70  QPixmap** CheckPixmaps;
71  QPixmap pixmap(Qt::CheckState state, bool active);
72 
76  void wheelEvent(QWheelEvent* event) override;
77 
82  QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override;
83 
84  QTimer* Timer;
85 
86  int itemCount(QTreeWidgetItem* item) const;
88 };
89 
90 #endif // !pqTreeWidget_h
a ParaView specific customization of QTreeWidget.
Definition: pqTreeWidget.h:29
int MaximumRowCountBeforeScrolling
Definition: pqTreeWidget.h:87
QPixmap ** CheckPixmaps
Definition: pqTreeWidget.h:70
superclass for all SM properties
QTimer * Timer
Definition: pqTreeWidget.h:84
#define PQWIDGETS_EXPORT
int maximumRowCountBeforeScrolling() const
Definition: pqTreeWidget.h:49
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
void setMaximumRowCountBeforeScrolling(int val)
Definition: pqTreeWidget.h:48