|
QtiPlot
0.9.8.2
|
#include <PythonScript.h>
Public Slots | |
| bool | compile (bool for_eval=true) |
| QVariant | eval () |
| bool | exec () |
| void | setContext (QObject *context) |
| bool | setDouble (double val, const char *name) |
| bool | setInt (int val, const char *name) |
| bool | setQObject (QObject *val, const char *name) |
Public Slots inherited from Script | |
| virtual bool | compile (bool for_eval=true) |
| Compile the Code. Return true if the implementation doesn't support compilation. More... | |
| virtual QVariant | eval () |
| Evaluate the Code, returning QVariant() on an error / exception. More... | |
| virtual bool | exec () |
| Execute the Code, returning false on an error / exception. More... | |
| virtual bool | setDouble (double, const char *) |
| virtual bool | setInt (int, const char *) |
| virtual bool | setQObject (const QObject *, const char *) |
Public Member Functions | |
| PythonScript (PythonScripting *env, const QString &code, QObject *context=0, const QString &name="<input>") | |
| void | write (const QString &text) |
| ~PythonScript () | |
Public Member Functions inherited from Script | |
| virtual void | addCode (const QString &code) |
| Append to the code that will be executed when calling exec() or eval() More... | |
| const QString | code () const |
| Return the code that will be executed when calling exec() or eval() More... | |
| QObject * | context () const |
| Return the context in which the code is to be executed. More... | |
| bool | emitErrors () const |
| Return whether errors / exceptions are to be emitted or silently ignored. More... | |
| const QString | name () const |
| Like QObject::name, but with unicode support. More... | |
| Script (ScriptingEnv *env, const QString &code, QObject *context=0, const QString &name="<input>") | |
| ScriptingEnv * | scriptingEnv () |
| virtual void | setCode (const QString &code) |
| Set the code that will be executed when calling exec() or eval() More... | |
| virtual void | setContext (QObject *context) |
| Set the context in which the code is to be executed. More... | |
| void | setEmitErrors (bool yes) |
| Set whether errors / exceptions are to be emitted or silently ignored. More... | |
| void | setName (const QString &name) |
| Like QObject::setName, but with unicode support. More... | |
| ~Script () | |
Private Member Functions | |
| void | beginStdoutRedirect () |
| void | endStdoutRedirect () |
| PythonScripting * | env () |
Private Attributes | |
| bool | hasOldGlobals |
| bool | isFunction |
| PyObject * | modGlobalDict |
| PyObject * | modLocalDict |
| PyObject * | PyCode |
| PyObject * | stderrSave |
| PyObject * | stdoutSave |
Additional Inherited Members | |
Signals inherited from Script | |
| void | codeChanged () |
| This is emitted whenever the code to be executed by exec() and eval() is changed. More... | |
| void | error (const QString &message, const QString &scriptName, int lineNumber) |
| signal an error condition / exception More... | |
| void | print (const QString &output) |
| output generated by the code More... | |
Protected Types inherited from Script | |
| enum | compileStatus { notCompiled, isCompiled, compileErr } |
Protected Member Functions inherited from Script | |
| void | emit_error (const QString &message, int lineNumber) |
Protected Attributes inherited from Script | |
| QString | Code |
| enum Script::compileStatus | compiled |
| QObject * | Context |
| bool | EmitErrors |
| ScriptingEnv * | Env |
| QString | Name |
| PythonScript::PythonScript | ( | PythonScripting * | env, |
| const QString & | code, | ||
| QObject * | context = 0, |
||
| const QString & | name = "<input>" |
||
| ) |
References Script::Context, env(), modGlobalDict, modLocalDict, PyCode, and setQObject().
| PythonScript::~PythonScript | ( | ) |
References modGlobalDict, modLocalDict, and PyCode.
|
private |
References env(), PythonScripting::setQObject(), stderrSave, and stdoutSave.
|
slot |
|
private |
References env(), stderrSave, and stdoutSave.
|
inlineprivate |
References Script::Env.
Referenced by beginStdoutRedirect(), compile(), endStdoutRedirect(), eval(), exec(), PythonScript(), setDouble(), setInt(), and setQObject().
|
slot |
|
slot |
|
slot |
References Script::Context, Script::setContext(), and setQObject().
|
slot |
References Script::compiled, env(), modGlobalDict, modLocalDict, and Script::notCompiled.
|
slot |
References Script::compiled, env(), modGlobalDict, modLocalDict, and Script::notCompiled.
|
slot |
References Script::compiled, env(), modGlobalDict, modLocalDict, and Script::notCompiled.
Referenced by PythonScript(), and setContext().
|
inline |
References Script::print().
|
private |
Referenced by compile(), eval(), exec(), PythonScript(), setDouble(), setInt(), setQObject(), and ~PythonScript().
|
private |
Referenced by compile(), eval(), exec(), PythonScript(), setDouble(), setInt(), setQObject(), and ~PythonScript().
|
private |
Referenced by compile(), eval(), exec(), PythonScript(), and ~PythonScript().
|
private |
Referenced by beginStdoutRedirect(), and endStdoutRedirect().
|
private |
Referenced by beginStdoutRedirect(), and endStdoutRedirect().
1.8.6