Public Slots | Public Member Functions | List of all members
pqPythonManager Class Reference

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 executeScript (const QString &filename)
 Executes the given script. More...
 
void executeScriptAndRender (const QString &filename)
 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=NULL)
 
 ~pqPythonManager () override
 
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)
 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...
 

Detailed Description

pqPythonManager is a class to facilitate the use of a python interpreter by various paraview GUI components.

Roadmap

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 54 of file pqPythonManager.h.

Constructor & Destructor Documentation

◆ pqPythonManager()

pqPythonManager::pqPythonManager ( QObject *  parent = NULL)

◆ ~pqPythonManager()

pqPythonManager::~pqPythonManager ( )
override

Member Function Documentation

◆ initializeInterpreter()

bool pqPythonManager::initializeInterpreter ( )

Convienience method to call vtkPythonInterpreter::Initialize().

◆ interpreterIsInitialized()

bool pqPythonManager::interpreterIsInitialized ( )

Returns true if the interpreter has been initialized.

Same as calling vtkPythonInterpreter::IsInitialized().

◆ addWidgetForRunMacros()

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.

◆ addWidgetForEditMacros()

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.

◆ addWidgetForDeleteMacros()

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.

◆ addMacro()

void pqPythonManager::addMacro ( const QString &  fileName)

Save the macro in ParaView configuration and update widget automatically.

◆ updateMacroList()

void pqPythonManager::updateMacroList ( )

Invalidate the macro list, so the menu/toolbars are updated according to the content of the Macros directories...

◆ executeScript

void pqPythonManager::executeScript ( const QString &  filename)
slot

Executes the given script.

If the python interpreter hasn't been initialized yet it will be initialized.

◆ executeScriptAndRender

void pqPythonManager::executeScriptAndRender ( const QString &  filename)
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.

◆ editMacro

void pqPythonManager::editMacro ( const QString &  fileName)
slot

Launch python editor to edit the macro.


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