#include <Libs/Scripting/Python/Core/ctkAbstractPythonManager.h>
|
QScopedPointer< ctkAbstractPythonManagerPrivate > | d_ptr |
|
Definition at line 37 of file ctkAbstractPythonManager.h.
◆ Superclass
◆ ExecuteStringMode
◆ ctkAbstractPythonManager()
ctkAbstractPythonManager::ctkAbstractPythonManager |
( |
QObject * |
_parent = NULL | ) |
|
◆ ~ctkAbstractPythonManager()
virtual ctkAbstractPythonManager::~ctkAbstractPythonManager |
( |
| ) |
|
|
virtual |
◆ addObjectToPythonMain()
void ctkAbstractPythonManager::addObjectToPythonMain |
( |
const QString & |
name, |
|
|
QObject * |
obj |
|
) |
| |
◆ addWrapperFactory()
void ctkAbstractPythonManager::addWrapperFactory |
( |
PythonQtForeignWrapperFactory * |
factory | ) |
|
◆ executeFile()
void ctkAbstractPythonManager::executeFile |
( |
const QString & |
filename | ) |
|
Execute a python script with the given filename.
◆ executeInitializationScripts()
virtual void ctkAbstractPythonManager::executeInitializationScripts |
( |
| ) |
|
|
protectedvirtual |
◆ executeString()
Execute a python of python code (can be multiple lines separated with newline) and return the result as a QVariant.
◆ getVariable()
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.
◆ initializationFlags()
int ctkAbstractPythonManager::initializationFlags |
( |
| ) |
const |
◆ initialize()
bool ctkAbstractPythonManager::initialize |
( |
| ) |
|
◆ initPythonQt()
void ctkAbstractPythonManager::initPythonQt |
( |
int |
flags | ) |
|
|
protected |
◆ isPythonInitialized()
bool ctkAbstractPythonManager::isPythonInitialized |
( |
| ) |
const |
◆ mainContext()
PythonQtObjectPtr ctkAbstractPythonManager::mainContext |
( |
| ) |
|
Return a reference to the python main context. Calling this function implicitly call initialize() if it hasn't been done.
◆ preInitialization()
virtual void ctkAbstractPythonManager::preInitialization |
( |
| ) |
|
|
protectedvirtual |
Overload this function to load Decorator and pythonQt wrapper at initialization time.
Reimplemented in ctkSimplePythonManager.
◆ printStderr
void ctkAbstractPythonManager::printStderr |
( |
const QString & |
| ) |
|
|
protectedslot |
◆ printStdout
void ctkAbstractPythonManager::printStdout |
( |
const QString & |
| ) |
|
|
protectedslot |
◆ pythonAttributes()
QStringList ctkAbstractPythonManager::pythonAttributes |
( |
const QString & |
pythonVariableName, |
|
|
const QString & |
module = QLatin1String("__main__") , |
|
|
bool |
appendParenthesis = false |
|
) |
| const |
Given a python variable name, lookup its attributes and return them in a string list. By default the attributes are looked up from main
. If the argument appendParenthesis
is set to True, "()" will be appended to attributes being Python callable.
◆ pythonErrorOccured()
bool ctkAbstractPythonManager::pythonErrorOccured |
( |
| ) |
const |
Returns True if a python error occured.
- See also
- PythonQt::hadError()
◆ pythonInitialized
void ctkAbstractPythonManager::pythonInitialized |
( |
| ) |
|
|
signal |
This signal is emitted after python is initialized and scripts are executed
- See also
- preInitialization
-
executeScripts
◆ pythonPaths()
virtual QStringList ctkAbstractPythonManager::pythonPaths |
( |
| ) |
|
|
protectedvirtual |
◆ pythonPreInitialized
void ctkAbstractPythonManager::pythonPreInitialized |
( |
| ) |
|
|
signal |
This signal is emitted after python is pre-initialized. Observers can listen for this signal to handle additional initialization steps.
- See also
- preInitialization
◆ registerClassForPythonQt()
void ctkAbstractPythonManager::registerClassForPythonQt |
( |
const QMetaObject * |
metaobject | ) |
|
◆ registerCPPClassForPythonQt()
void ctkAbstractPythonManager::registerCPPClassForPythonQt |
( |
const char * |
name | ) |
|
◆ registerPythonQtDecorator()
void ctkAbstractPythonManager::registerPythonQtDecorator |
( |
QObject * |
decorator | ) |
|
◆ resetErrorFlag()
void ctkAbstractPythonManager::resetErrorFlag |
( |
| ) |
|
Reset error flag
- See also
- PythonQt::clearError()
◆ setInitializationFlags()
void ctkAbstractPythonManager::setInitializationFlags |
( |
int |
flags | ) |
|
Calling this function after mainContext() has been called at least once is a no-op. If not overridden calling this function, the default initialization flags are PythonQt::IgnoreSiteModule and PythonQt::RedirectStdOut.
- See also
- PythonQt::InitFlags
◆ setInitializationFunction()
void ctkAbstractPythonManager::setInitializationFunction |
( |
void(*)() |
initFunction | ) |
|
◆ setSystemExitExceptionHandlerEnabled()
void ctkAbstractPythonManager::setSystemExitExceptionHandlerEnabled |
( |
bool |
value | ) |
|
- See also
- PythonQt::setSystemExitExceptionHandlerEnabled
◆ systemExitExceptionHandlerEnabled()
bool ctkAbstractPythonManager::systemExitExceptionHandlerEnabled |
( |
| ) |
const |
- See also
- PythonQt::systemExitExceptionHandlerEnabled
◆ systemExitExceptionRaised
void ctkAbstractPythonManager::systemExitExceptionRaised |
( |
int |
exitCode | ) |
|
|
signal |
◆ d_ptr
QScopedPointer<ctkAbstractPythonManagerPrivate> ctkAbstractPythonManager::d_ptr |
|
protected |
The documentation for this class was generated from the following file: