![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
#include <PythonInterpreter.h>
Classes | |
| struct | State |
| Variable state. More... | |
Public Slots | |
| bool | executeFile (const std::string &filePath) |
| Execution functions (and slots) More... | |
| void | executeCode (const std::string &code, QListWidget *output) |
| void | executeCodeWithState (const std::string &code, QListWidget *output, PythonInterpreter::State &state) |
| void | executeStatementWithState (const std::string &code, QListWidget *output, PythonInterpreter::State &state) |
| void | executeFunction (const pybind11::object &function) |
Signals | |
| void | executionStarted () |
| void | executionFinished () |
Public Member Functions | |
| PythonInterpreter (QObject *parent=nullptr) | |
| bool | isExecuting () const |
| void | initialize (const PythonConfig &config) |
| void | finalize () |
| const PythonConfigPaths & | config () const |
Static Public Member Functions | |
| static bool | IsInitialized () |
There should be only one, and it is managed by the PythonPlugin. It centralizes the execution of python scripts.
Only one script can be executed at a time.
Classes that allow user to start the execution of a script should connect the executionStarted & executionFinished to give feedback on when a script is running and whether a new script can be ran
|
explicit |
| const PythonConfigPaths & PythonInterpreter::config | ( | ) | const |
Referenced by initialize().
|
slot |
References executeCodeWithState().
Referenced by PythonEditor::PythonEditor().
|
slot |
Referenced by executeCode().
|
slot |
Execution functions (and slots)
References CreateGlobals(), e, executionFinished(), executionStarted(), and CVLog::Warning().
Referenced by PythonPluginCommand::process().
|
slot |
References e, CVLog::Error(), executionFinished(), and executionStarted().
Referenced by PluginListModel::handleDoubleClick().
|
slot |
Referenced by PythonRepl::executeCode().
|
signal |
|
signal |
| void PythonInterpreter::finalize | ( | ) |
| void PythonInterpreter::initialize | ( | const PythonConfig & | config | ) |
| bool PythonInterpreter::isExecuting | ( | ) | const |
Referenced by KeyPressEater::eventFilter().
|
static |
Referenced by AboutDialog::AboutDialog(), and PythonPlugin::getActions().