pqTreeWidgetSelectionHelper.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 pqTreeWidgetSelectionHelper_h
5 #define pqTreeWidgetSelectionHelper_h
6 
7 #include "pqWidgetsModule.h"
8 #include <QItemSelection>
9 #include <QObject>
10 
11 class QTreeWidget;
12 class QTreeWidgetItem;
24 {
25  Q_OBJECT
26  typedef QObject Superclass;
27 
28 public:
29  pqTreeWidgetSelectionHelper(QTreeWidget* treeWidget);
30  ~pqTreeWidgetSelectionHelper() override;
31 
32 protected Q_SLOTS:
33  void onItemPressed(QTreeWidgetItem* item, int column);
34  void showContextMenu(const QPoint&);
35 
36 private:
37  Q_DISABLE_COPY(pqTreeWidgetSelectionHelper)
38 
39  void setSelectedItemsCheckState(Qt::CheckState state);
40 
41  QTreeWidget* TreeWidget;
42  QItemSelection Selection;
43  int PressState;
44 };
45 
46 #endif
#define PQWIDGETS_EXPORT
pqTreeWidgetSelectionHelper enables multiple element selection and the toggling on then changing the ...