pqPythonManager is a class to facilitate the use of a python interpreter by various paraview GUI components. More...
#include <pqPythonManager.h>
Inherits QObject.
Public Slots | |
void | executeCode (const QByteArray &code, const QVector< QByteArray > &pre_push={}, const QVector< QByteArray > &post_push={}) |
Executes the given code. More... | |
void | executeScript (const QString &filename, vtkTypeUInt32 location=0x10) |
Executes the given script. More... | |
void | executeScriptAndRender (const QString &filename, vtkTypeUInt32 location=0x10) |
Same as executeScript() except that is also triggers a render on all views in the application after the script has been processed. More... | |
void | editMacro (const QString &fileName) |
Launch python editor to edit the macro. More... | |
Public Member Functions | |
pqPythonManager (QObject *parent=nullptr) | |
~pqPythonManager () override | |
pqPythonMacroSupervisor * | macroSupervisor () const |
Provides access to the macro supervisor. More... | |
bool | initializeInterpreter () |
Convienience method to call vtkPythonInterpreter::Initialize() . More... | |
bool | interpreterIsInitialized () |
Returns true if the interpreter has been initialized. More... | |
void | addMacro (const QString &fileName, vtkTypeUInt32 location=0x10) |
Save the macro in ParaView configuration and update widget automatically. More... | |
void | updateMacroList () |
Invalidate the macro list, so the menu/toolbars are updated according to the content of the Macros directories... More... | |
void | addWidgetForRunMacros (QWidget *widget) |
Add a widget to be given macro actions. More... | |
void | addWidgetForEditMacros (QWidget *widget) |
Add a widget to be given macro actions. More... | |
void | addWidgetForDeleteMacros (QWidget *widget) |
Add a widget to be given macro actions. More... | |
pqPythonManager is a class to facilitate the use of a python interpreter by various paraview GUI components.
pqPythonManager is slated for deprecation. It's unclear there's a need for such a manager anymore since Python interpreter is globally accessible via vtkPythonInterpreter.
Definition at line 28 of file pqPythonManager.h.
pqPythonManager::pqPythonManager | ( | QObject * | parent = nullptr | ) |
|
override |
pqPythonMacroSupervisor* pqPythonManager::macroSupervisor | ( | ) | const |
Provides access to the macro supervisor.
bool pqPythonManager::initializeInterpreter | ( | ) |
Convienience method to call vtkPythonInterpreter::Initialize()
.
bool pqPythonManager::interpreterIsInitialized | ( | ) |
Returns true if the interpreter has been initialized.
Same as calling vtkPythonInterpreter::IsInitialized()
.
void pqPythonManager::addWidgetForRunMacros | ( | QWidget * | widget | ) |
Add a widget to be given macro actions.
QActions representing script macros will be added to the widget. This could be a QToolBar, QMenu, or other type of widget.
void pqPythonManager::addWidgetForEditMacros | ( | QWidget * | widget | ) |
Add a widget to be given macro actions.
QActions representing script macros will be added to the widget. This could be a QToolBar, QMenu, or other type of widget.
void pqPythonManager::addWidgetForDeleteMacros | ( | QWidget * | widget | ) |
Add a widget to be given macro actions.
QActions representing script macros will be added to the widget. This could be a QToolBar, QMenu, or other type of widget.
void pqPythonManager::addMacro | ( | const QString & | fileName, |
vtkTypeUInt32 | location = 0x10 |
||
) |
Save the macro in ParaView configuration and update widget automatically.
void pqPythonManager::updateMacroList | ( | ) |
Invalidate the macro list, so the menu/toolbars are updated according to the content of the Macros directories...
|
slot |
Executes the given code.
If the python interpreter hasn't been initialized yet it will be initialized.
code | lines of code to execute |
pre_push | instructions to execute before the code execution |
post_push | instructions to execute after the code execution |
|
slot |
Executes the given script.
If the python interpreter hasn't been initialized yet it will be initialized.
|
slot |
Same as executeScript()
except that is also triggers a render on all views in the application after the script has been processed.
This is used when playing back macros, for example.
|
slot |
Launch python editor to edit the macro.