Abstract class for Python completers. More...
#include <pqPythonCompleter.h>
Public Member Functions | |
pqPythonCompleter (QWidget *parent) | |
![]() | |
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 | 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... | |
PyObject * | derivePyObject (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... | |
virtual QStringList | getPythonCompletions (const QString &pythonObjectName)=0 |
Given a text prompt, return a list of possible completions. More... | |
Abstract class for Python completers.
Child classes must implement how Python attributes are retrieved from a given variable name prompt.
Definition at line 15 of file pqPythonCompleter.h.
|
inline |
Definition at line 18 of file pqPythonCompleter.h.
|
overrideprotectedvirtual |
Return a list of strings that could match the given prompt.
Implements pqWidgetCompleter.
|
overrideprotectedvirtual |
Return the part of the prompt that can be completed.
Implements pqWidgetCompleter.
|
protected |
From a prompt string that can contain multiple tokens, retrieve the last (possibly incomplete) variable name.
|
protected |
Given a PyObject, append all of its attributes in the results list.
|
protected |
Given pythonObjectName
string in the form "X.Y.Z.T" and script locals, return the most derived PyObject that matches the string.
For example, given "X.Y.Z" string and a locals object containing an object X with attribute Z, returns the object X.Y
|
protectedpure virtual |
Given a text prompt, return a list of possible completions.
This method must be implemented in concrete classes.
Implemented in pqPythonCalculatorCompleter, and pqPythonShellCompleter.