#include <Libs/Scripting/Python/Core/ctkAbstractPythonManager.h>
Public Types | |
typedef QObject | Superclass |
Signals | |
void | pythonInitialized () |
Public Member Functions | |
void | addObjectToPythonMain (const QString &name, QObject *obj) |
ctkAbstractPythonManager (QObject *_parent=NULL) | |
void | executeFile (const QString &filename) |
QVariant | executeString (const QString &code) |
QVariant | getVariable (const QString &varName) |
PythonQtObjectPtr | mainContext () |
void | registerClassForPythonQt (const QMetaObject *metaobject) |
void | registerCPPClassForPythonQt (const char *name) |
void | registerPythonQtDecorator (QObject *decorator) |
~ctkAbstractPythonManager () | |
Protected Slots | |
void | printStderr (const QString &) |
void | printStdout (const QString &) |
Protected Member Functions | |
void | initPythonQt () |
virtual void | preInitialization () |
virtual QStringList | pythonPaths () |
Definition at line 34 of file ctkAbstractPythonManager.h.
typedef QObject ctkAbstractPythonManager::Superclass |
Definition at line 39 of file ctkAbstractPythonManager.h.
ctkAbstractPythonManager::ctkAbstractPythonManager | ( | QObject * | _parent = NULL |
) |
Definition at line 35 of file ctkAbstractPythonManager.cpp.
ctkAbstractPythonManager::~ctkAbstractPythonManager | ( | ) |
Definition at line 41 of file ctkAbstractPythonManager.cpp.
void ctkAbstractPythonManager::addObjectToPythonMain | ( | const QString & | name, | |
QObject * | obj | |||
) |
Definition at line 144 of file ctkAbstractPythonManager.cpp.
void ctkAbstractPythonManager::executeFile | ( | const QString & | filename | ) |
Execute a python script with the given filename.
Definition at line 134 of file ctkAbstractPythonManager.cpp.
QVariant ctkAbstractPythonManager::executeString | ( | const QString & | code | ) |
Execute a python of python code (can be multiple lines separated with newline) and return the result as a QVariant.
Definition at line 122 of file ctkAbstractPythonManager.cpp.
QVariant ctkAbstractPythonManager::getVariable | ( | const QString & | varName | ) |
Gets the value of the variable looking in the __main__ module. If the variable is not found returns a default initialized QVariant.
Definition at line 154 of file ctkAbstractPythonManager.cpp.
void ctkAbstractPythonManager::initPythonQt | ( | ) | [protected] |
Definition at line 61 of file ctkAbstractPythonManager.cpp.
PythonQtObjectPtr ctkAbstractPythonManager::mainContext | ( | ) |
Definition at line 47 of file ctkAbstractPythonManager.cpp.
void ctkAbstractPythonManager::preInitialization | ( | ) | [protected, virtual] |
Definition at line 99 of file ctkAbstractPythonManager.cpp.
void ctkAbstractPythonManager::printStderr | ( | const QString & | text | ) | [protected, slot] |
Definition at line 171 of file ctkAbstractPythonManager.cpp.
void ctkAbstractPythonManager::printStdout | ( | const QString & | text | ) | [protected, slot] |
Definition at line 165 of file ctkAbstractPythonManager.cpp.
void ctkAbstractPythonManager::pythonInitialized | ( | ) | [signal] |
This signal is emitted after python is initialized. Observers can listen for this signal to handle additional initialization steps.
QStringList ctkAbstractPythonManager::pythonPaths | ( | ) | [protected, virtual] |
Definition at line 93 of file ctkAbstractPythonManager.cpp.
void ctkAbstractPythonManager::registerClassForPythonQt | ( | const QMetaObject * | metaobject | ) |
Definition at line 110 of file ctkAbstractPythonManager.cpp.
void ctkAbstractPythonManager::registerCPPClassForPythonQt | ( | const char * | name | ) |
Definition at line 116 of file ctkAbstractPythonManager.cpp.
void ctkAbstractPythonManager::registerPythonQtDecorator | ( | QObject * | decorator | ) |
Definition at line 104 of file ctkAbstractPythonManager.cpp.