pqPythonCalculatorWidget.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 #ifndef pqPythonCalculatorWidget_h
4 #define pqPythonCalculatorWidget_h
5 
6 #include "pqComponentsModule.h" // For PQCOMPONENTS_EXPORT.
8 
9 #include <QScopedPointer> // For QScopedPointer
10 #include <QString> // For QString
11 
12 class pqTreeWidget;
13 class QTreeWidgetItem;
14 
19 class PQCOMPONENTS_EXPORT pqPythonCalculatorWidget : public pqStringVectorPropertyWidget
20 {
21  Q_OBJECT
22  typedef pqStringVectorPropertyWidget Superclass;
23 
24 public:
25  pqPythonCalculatorWidget(vtkSMProxy* proxy, vtkSMProperty* property, QWidget* parent = nullptr);
26  ~pqPythonCalculatorWidget() override;
27 
28 protected Q_SLOTS:
29  void updateInputs();
30  void updateArrays();
31  void arrayChosen(int index);
32  void functionActivated(QTreeWidgetItem* item, int column);
33  void filterFunctions(const QString& text);
34 
35 private:
36  Q_DISABLE_COPY(pqPythonCalculatorWidget)
37 
38  QString escapeArrayName(const QString& name) const;
39  int currentInputIndex() const;
40 
41  class pqInternals;
42  QScopedPointer<pqInternals> Internals;
43 };
44 
45 #endif
a ParaView specific customization of QTreeWidget.
Definition: pqTreeWidget.h:29
superclass for all SM properties
pqPythonCalculatorWidget is a property-widget that shows a Python calculator expression editor with i...
name
proxy for a VTK object(s) on a server
Definition: vtkSMProxy.h:140
index