Public Member Functions | Protected Member Functions | List of all members
pqPythonCalculatorCompleter Class Reference

Completer to be used for the Python calculator expression field. More...

#include <pqPythonCalculatorCompleter.h>

Inheritance diagram for pqPythonCalculatorCompleter:
Inheritance graph
[legend]
Collaboration diagram for pqPythonCalculatorCompleter:
Collaboration graph
[legend]

Public Member Functions

 pqPythonCalculatorCompleter (QWidget *parent, vtkSMSourceProxy *input)
 
- Public Member Functions inherited from pqPythonCompleter
 pqPythonCompleter (QWidget *parent)
 
- Public Member Functions inherited from pqWidgetCompleter
 pqWidgetCompleter (QWidget *parent)
 
virtual void updateCompletionModel (const QString &prompt)
 This method is called by the client to request an update on the internal completion model, given a text prompt. More...
 
bool getCompleteEmptyPrompts ()
 get/set CompleteEmptyPrompts, indicating whether or not the completer should show anything if an empty prompt is given. More...
 
void setCompleteEmptyPrompts (bool newValue)
 get/set CompleteEmptyPrompts, indicating whether or not the completer should show anything if an empty prompt is given. More...
 

Protected Member Functions

QStringList getPythonCompletions (const QString &pythonObjectName) override
 Given a text prompt, return a list of possible completions. More...
 
void AddArrayNamesToResults (const vtkPVDataSetAttributesInformation *attributesInformation, QStringList &results)
 Append the names of arrays of the dataset attributes information object at the end of the results list. More...
 
- Protected Member Functions inherited from pqPythonCompleter
QStringList getCompletions (const QString &prompt) override
 Return a list of strings that could match the given prompt. More...
 
QString getCompletionPrefix (const QString &prompt) override
 Return the part of the prompt that can be completed. More...
 
QString getVariableToComplete (const QString &prompt)
 From a prompt string that can contain multiple tokens, retrieve the last (possibly incomplete) variable name. More...
 
void appendPyObjectAttributes (PyObject *object, QStringList &results)
 Given a PyObject, append all of its attributes in the results list. More...
 
PyObjectderivePyObject (const QString &pythonObjectName, PyObject *locals)
 Given pythonObjectName string in the form "X.Y.Z.T" and script locals, return the most derived PyObject that matches the string. More...
 

Detailed Description

Completer to be used for the Python calculator expression field.

Looks up attributes of Python objects, static calculator-specific variables and data set field names.

Definition at line 16 of file pqPythonCalculatorCompleter.h.

Constructor & Destructor Documentation

◆ pqPythonCalculatorCompleter()

pqPythonCalculatorCompleter::pqPythonCalculatorCompleter ( QWidget *  parent,
vtkSMSourceProxy input 
)
inline

Definition at line 19 of file pqPythonCalculatorCompleter.h.

Member Function Documentation

◆ getPythonCompletions()

QStringList pqPythonCalculatorCompleter::getPythonCompletions ( const QString &  pythonObjectName)
overrideprotectedvirtual

Given a text prompt, return a list of possible completions.

This method must be implemented in concrete classes.

Implements pqPythonCompleter.

◆ AddArrayNamesToResults()

void pqPythonCalculatorCompleter::AddArrayNamesToResults ( const vtkPVDataSetAttributesInformation attributesInformation,
QStringList &  results 
)
protected

Append the names of arrays of the dataset attributes information object at the end of the results list.


The documentation for this class was generated from the following file: