pqPythonCalculatorCompleter.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Kitware Inc.
2 // SPDX-License-Identifier: BSD-3-Clause
3 #ifndef pqPythonCalculatorCompleter_h
4 #define pqPythonCalculatorCompleter_h
5 
6 #include <vtkPython.h>
7 
8 #include "pqPythonCompleter.h"
9 #include "vtkSMSourceProxy.h"
10 
17 {
18 public:
20  : pqPythonCompleter(parent)
21  , Input(input)
22  {
23  this->setCompleteEmptyPrompts(true); // Ovrerride pqPythonCompleter default
24  }
25 
26 protected:
27  QStringList getPythonCompletions(const QString& pythonObjectName) override;
28 
33  void AddArrayNamesToResults(
34  const vtkPVDataSetAttributesInformation* attributesInformation, QStringList& results);
35 
36 private:
37  vtkSMSourceProxy* Input; // Needed to retrieve input field names
38 };
39 #endif
Completer to be used for the Python calculator expression field.
#define PQPYTHON_EXPORT
Abstract class for Python completers.
virtual QStringList getPythonCompletions(const QString &pythonObjectName)=0
Given a text prompt, return a list of possible completions.
proxy for a VTK source on a server
void setCompleteEmptyPrompts(bool newValue)
get/set CompleteEmptyPrompts, indicating whether or not the completer should show anything if an empt...
pqPythonCalculatorCompleter(QWidget *parent, vtkSMSourceProxy *input)