pqScalarValueListPropertyWidget.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 pqScalarValueListPropertyWidget_h
5 #define pqScalarValueListPropertyWidget_h
6 
7 #include "pqPropertyWidget.h"
8 
9 #include <QVariant>
10 #include <string>
11 #include <vector>
12 
13 class QListWidgetItem;
14 class vtkPVXMLElement;
18 
26 class PQCOMPONENTS_EXPORT pqScalarValueListPropertyWidget : public pqPropertyWidget
27 {
28  Q_OBJECT
29  Q_PROPERTY(QVariantList scalars READ scalars WRITE setScalars)
30 
31  typedef pqPropertyWidget Superclass;
32 
33 public:
35  vtkSMProperty* property, vtkSMProxy* proxy, QWidget* parent = nullptr);
37 
38  void setScalars(const QVariantList& scalars);
39  QVariantList scalars() const;
40 
42 
46  void setRangeDomain(vtkSMDoubleRangeDomain* smRangeDomain);
47  void setRangeDomain(vtkSMIntRangeDomain* smRangeDomain);
48  void setRangeDomain(vtkSMTimeStepsDomain* timestepsDomain);
50 
51  void setShowLabels(bool);
52  void setLabels(const std::vector<std::string>& labels);
53 
54 Q_SIGNALS:
55  void scalarsChanged();
56 
57 private Q_SLOTS:
58  void smRangeModified();
59 
63  void add();
64  void addRange();
65  void remove();
66  void removeAll();
67  void editPastLastRow();
68  void restoreDefaults();
69 
70 private: // NOLINT(readability-redundant-access-specifiers)
71  Q_DISABLE_COPY(pqScalarValueListPropertyWidget)
72 
73  bool getRange(double& range_min, double& range_max);
74  bool getRange(int& range_min, int& range_max);
75 
76  class pqInternals;
77  pqInternals* Internals;
78 };
79 
80 #endif // pqScalarValueListPropertyWidget_h
type specific extension to vtkSMRangeDomainTemplate for ints.
pqPropertyWidget represents a widget created for each property of a proxy on the pqPropertiesPanel (f...
type specific extension to vtkSMRangeDomainTemplate for doubles.
pqScalarValueListPropertyWidget provides a table widget to which users are add values e...
superclass for all SM properties
A domain providing timesteps from its "Input" property.
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
This is used by vtkPVXMLParser to represent an XML document starting at the root element.