pqArraySelectionWidget.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 pqArraySelectionWidget_h
5 #define pqArraySelectionWidget_h
6 
7 #include "pqComponentsModule.h" // for exports
8 #include "pqTreeView.h"
9 #include <QMap> // for QMap.
10 #include <QPointer> // for QPointer
11 
12 class pqTimer;
13 
54 {
55  Q_OBJECT
56  typedef pqTreeView Superclass;
57 
58 public:
59  pqArraySelectionWidget(int numColumns, QWidget* parent = nullptr);
60  pqArraySelectionWidget(QWidget* parent = nullptr);
61  ~pqArraySelectionWidget() override;
62 
66  bool event(QEvent* e) override;
67 
69 
72  void setHeaderLabel(const QString& label) { this->setHeaderLabel(0, label); }
73  void setHeaderLabel(int column, const QString& label);
74  QString headerLabel(int column = 0) const;
76 
78 
84  void setIconType(const QString& pname, const QString& icon_type);
85  const QString& iconType(const QString& pname) const;
87 
89 
92  void setColumnData(int column, const QString& pname, QMap<QString, QString>&& mapping);
94 
98  void setColumnItemData(int column, int role, const QVariant& data);
99 
100 Q_SIGNALS:
104  void widgetModified();
105 
106 private:
107  Q_DISABLE_COPY(pqArraySelectionWidget);
108 
112  void propertyChanged(const QString& pname);
113 
114  void updateProperty(const QString& pname, const QVariant& value);
115 
119  void resizeSectionsEventually();
120 
121  bool UpdatingProperty;
122  QPointer<pqTimer> Timer;
123 
124  class Model;
125  friend class Model;
126 
127  Model* realModel() const;
128 
129 private Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
130  void resizeSectionsToContents();
131 };
132 
133 #endif
data
pqArraySelectionWidget is a widget used to allow user to select arrays.
#define PQCOMPONENTS_EXPORT
void setHeaderLabel(const QString &label)
Specify a label to use for the horizontal header for the view.
: QTreeView subclass that add ParaView specific customizations.
Definition: pqTreeView.h:34
value