pqArraySelectorPropertyWidget.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 pqArraySelectorPropertyWidget_h
5 #define pqArraySelectorPropertyWidget_h
6 
7 #include "pqPropertyWidget.h"
8 #include <QPair> // need for ctor arg
9 #include <QScopedPointer> // needed for ivar
10 
11 #include <initializer_list> // need for ctor arg
12 
39 {
40  Q_OBJECT
42 
43  Q_PROPERTY(QList<QVariant> array READ array WRITE setArray);
44  Q_PROPERTY(QString arrayName READ arrayName WRITE setArrayName);
45 
46 public:
48  vtkSMProperty* smproperty, vtkSMProxy* smproxy, QWidget* parent = nullptr);
50  std::initializer_list<QPair<int, QString>> knownArrays, QWidget* parent = nullptr);
52 
56  QString arrayName() const;
57 
61  int arrayAssociation() const;
62 
66  QList<QVariant> array() const;
67 
68 public Q_SLOTS: // NOLINT(readability-redundant-access-specifiers)
72  void setArray(int assoc, const QString& val);
73 
78  void setArray(const QList<QVariant>& val);
79 
85  void setArrayName(const QString& name);
86 
87 Q_SIGNALS:
88  void arrayChanged();
89 
90 private Q_SLOTS:
91  void domainModified();
92 
93 private: // NOLINT(readability-redundant-access-specifiers)
94  Q_DISABLE_COPY(pqArraySelectorPropertyWidget);
95 
96  class pqInternals;
97  QScopedPointer<pqInternals> Internals;
98 
99  class PropertyLinksConnection;
100 };
101 
102 #endif
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
#define PQCOMPONENTS_EXPORT
superclass for all SM properties
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
pqPropertyWidget subclass for properties with vtkSMArrayListDomain.