pqTreeWidget.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: ParaView
4  Module: pqTreeWidget.h
5 
6  Copyright (c) 2005-2008 Sandia Corporation, Kitware Inc.
7  All rights reserved.
8 
9  ParaView is a free software; you can redistribute it and/or modify it
10  under the terms of the ParaView license version 1.2.
11 
12  See License_v1.2.txt for the full ParaView license.
13  A copy of this license can be obtained by contacting
14  Kitware Inc.
15  28 Corporate Drive
16  Clifton Park, NY 12065
17  USA
18 
19 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
20 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
21 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
22 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
27 LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
28 NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
29 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
30 
31 =========================================================================*/
32 
33 #ifndef pqTreeWidget_h
34 #define pqTreeWidget_h
35 
36 #include "pqWidgetsModule.h"
37 #include <QTreeWidget>
38 
39 class vtkPVXMLElement;
40 class vtkSMProperty;
41 class vtkSMPropertyGroup;
57 class PQWIDGETS_EXPORT pqTreeWidget : public QTreeWidget
58 {
59  typedef QTreeWidget Superclass;
60  Q_OBJECT
61 public:
62  pqTreeWidget(QWidget* p = nullptr);
63  ~pqTreeWidget() override;
64 
65  bool event(QEvent* e) override;
66 
70  QSize sizeHint() const override;
71  QSize minimumSizeHint() const override;
72 
73  void setMaximumRowCountBeforeScrolling(vtkSMPropertyGroup* smpropertygroup);
74  void setMaximumRowCountBeforeScrolling(vtkSMProperty* smproperty);
75  void setMaximumRowCountBeforeScrolling(vtkPVXMLElement* hints);
76  void setMaximumRowCountBeforeScrolling(int val) { this->MaximumRowCountBeforeScrolling = val; }
77  int maximumRowCountBeforeScrolling() const { return this->MaximumRowCountBeforeScrolling; }
78 
79 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
80  void allOn();
81  void allOff();
82 
83 Q_SIGNALS:
87  void navigatedPastEnd();
88 
89 protected Q_SLOTS:
90  void doToggle(int col);
91  void updateCheckState();
92  void invalidateLayout();
93 
94 private Q_SLOTS:
95  void updateCheckStateInternal();
96 
97 protected:
98  QPixmap** CheckPixmaps;
99  QPixmap pixmap(Qt::CheckState state, bool active);
100 
104  void wheelEvent(QWheelEvent* event) override;
105 
110  QModelIndex moveCursor(CursorAction cursorAction, Qt::KeyboardModifiers modifiers) override;
111 
112  QTimer* Timer;
113 
114  int itemCount(QTreeWidgetItem* item) const;
116 };
117 
118 #endif // !pqTreeWidget_h
a ParaView specific customization of QTreeWidget.
Definition: pqTreeWidget.h:57
int MaximumRowCountBeforeScrolling
Definition: pqTreeWidget.h:115
QPixmap ** CheckPixmaps
Definition: pqTreeWidget.h:98
superclass for all SM properties
QTimer * Timer
Definition: pqTreeWidget.h:112
#define PQWIDGETS_EXPORT
int maximumRowCountBeforeScrolling() const
Definition: pqTreeWidget.h:77
This is used by vtkPVXMLParser to represent an XML document starting at the root element.
void setMaximumRowCountBeforeScrolling(int val)
Definition: pqTreeWidget.h:76