pqIndexSelectionWidget.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 pqIndexSelectionWidget_h
6 #define pqIndexSelectionWidget_h
7 
8 #include "pqComponentsModule.h"
9 #include "pqPropertyWidget.h"
10 
11 #include <QMap>
12 #include <QString>
13 
14 class QFormLayout;
15 class QGroupBox;
16 class QVBoxLayout;
17 
23 {
24  Q_OBJECT
26 
27 public:
28  pqIndexSelectionWidget(vtkSMProxy* proxy, vtkSMProperty* property, QWidget* parent = nullptr);
29  ~pqIndexSelectionWidget() override;
30 
31 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
32  void setHeaderLabel(const QString& str);
33  void setPushPropertyName(const QByteArray& pName);
34 
35 Q_SIGNALS:
36  void widgetModified();
37 
38 protected Q_SLOTS:
39  void currentChanged(const QString& current);
40  void currentChanged(int current);
41  void currentChanged(); // pqLineEdit::textChangedAndEditingFinished() handler
42 
47  void updateProperty();
51  void updatePropertyImpl();
52 
53 protected: // NOLINT(readability-redundant-access-specifiers)
54  bool eventFilter(QObject* obj, QEvent* e) override;
58  void propertyChanged();
59 
60 private:
61  Q_DISABLE_COPY(pqIndexSelectionWidget)
62 
63  void buildWidget(vtkSMProperty* infoProp);
64  void addRow(const QString& key, int current, int size);
65 
69  QByteArray PushPropertyName;
70 
71  bool PropertyUpdatePending; // Only update the property once per 250 ms.
72  bool IgnorePushPropertyUpdates; // don't react to our own updates.
73 
74  QGroupBox* GroupBox;
75  QVBoxLayout* VBox;
76  QFormLayout* Form;
77 
78  class pqInternals;
79  pqInternals* Internals;
80 };
81 
82 #endif // pqIndexSelectionWidget_h
pqIndexSelectionWidget displays a list of labels and slider widgets, intended to be used for selectin...
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
#define PQCOMPONENTS_EXPORT
superclass for all SM properties
size
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
key