Slicer  5.0
Slicer is a multi-platform, free and open source software package for visualization and medical image computing
List of all members | Public Types | Properties | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes
qSlicerCorePythonManager Class Reference

#include <Base/QTCore/qSlicerCorePythonManager.h>

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

Public Types

typedef ctkAbstractPythonManager Superclass
 

Properties

QStringList pythonPaths
 List of directories containing Python modules. More...
 

Public Member Functions

Q_INVOKABLE void addVTKObjectToPythonMain (const QString &name, vtkObject *object)
 Convenient function allowing to add a VTK object to the interpreter main module. More...
 
Q_INVOKABLE void appendPythonPath (const QString &path)
 
Q_INVOKABLE void appendPythonPaths (const QStringList &paths)
 Append paths to sys.path. More...
 
QStringList pythonPaths () override
 List of directories containing Python modules. More...
 
 qSlicerCorePythonManager (QObject *parent=nullptr)
 
 ~qSlicerCorePythonManager () override
 

Static Public Member Functions

static Q_INVOKABLE QString toPythonStringLiteral (QString path)
 

Protected Member Functions

void preInitialization () override
 

Protected Attributes

ctkVTKPythonQtWrapperFactory * Factory
 

Detailed Description

Definition at line 33 of file qSlicerCorePythonManager.h.

Member Typedef Documentation

◆ Superclass

typedef ctkAbstractPythonManager qSlicerCorePythonManager::Superclass

Definition at line 41 of file qSlicerCorePythonManager.h.

Property Documentation

◆ pythonPaths

QStringList qSlicerCorePythonManager::pythonPaths
read

List of directories containing Python modules.

Definition at line 38 of file qSlicerCorePythonManager.h.

Constructor & Destructor Documentation

◆ qSlicerCorePythonManager()

qSlicerCorePythonManager::qSlicerCorePythonManager ( QObject *  parent = nullptr)

◆ ~qSlicerCorePythonManager()

qSlicerCorePythonManager::~qSlicerCorePythonManager ( )
override

Member Function Documentation

◆ addVTKObjectToPythonMain()

Q_INVOKABLE void qSlicerCorePythonManager::addVTKObjectToPythonMain ( const QString &  name,
vtkObject *  object 
)

Convenient function allowing to add a VTK object to the interpreter main module.

◆ appendPythonPath()

Q_INVOKABLE void qSlicerCorePythonManager::appendPythonPath ( const QString &  path)

Append path to sys.path

Todo:
Add these methods to ctkAbstractPythonManager
See also
appendPythonPaths

◆ appendPythonPaths()

Q_INVOKABLE void qSlicerCorePythonManager::appendPythonPaths ( const QStringList &  paths)

Append paths to sys.path.

◆ preInitialization()

void qSlicerCorePythonManager::preInitialization ( )
overrideprotected

◆ pythonPaths()

QStringList qSlicerCorePythonManager::pythonPaths ( )
override

List of directories containing Python modules.

◆ toPythonStringLiteral()

static Q_INVOKABLE QString qSlicerCorePythonManager::toPythonStringLiteral ( QString  path)
static

Convert a string to a safe python string literal. Backslash, single-quote characters are escaped and the string is enclosed between single quotes.

Deprecated. Use ctkAbstractPythonManager::toPythonStringLiteral() method instead.

Member Data Documentation

◆ Factory

ctkVTKPythonQtWrapperFactory* qSlicerCorePythonManager::Factory
protected

Definition at line 70 of file qSlicerCorePythonManager.h.


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