![]() |
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
Definition at line 32 of file PythonInterpreter.h.
|
explicit |
Definition at line 50 of file PythonInterpreter.cpp.
| const PythonConfigPaths & PythonInterpreter::config | ( | ) | const |
Definition at line 320 of file PythonInterpreter.cpp.
Referenced by initialize().
|
slot |
Definition at line 144 of file PythonInterpreter.cpp.
References executeCodeWithState().
Referenced by PythonEditor::PythonEditor().
|
slot |
Definition at line 130 of file PythonInterpreter.cpp.
Referenced by executeCode().
|
slot |
Execution functions (and slots)
Definition at line 52 of file PythonInterpreter.cpp.
References CreateGlobals(), executionFinished(), executionStarted(), and CVLog::Warning().
Referenced by PythonPluginCommand::process().
|
slot |
Definition at line 150 of file PythonInterpreter.cpp.
References CVLog::Error(), executionFinished(), and executionStarted().
Referenced by PluginListModel::handleDoubleClick().
|
slot |
Definition at line 137 of file PythonInterpreter.cpp.
Referenced by PythonRepl::executeCode().
|
signal |
|
signal |
| void PythonInterpreter::finalize | ( | ) |
Definition at line 298 of file PythonInterpreter.cpp.
| void PythonInterpreter::initialize | ( | const PythonConfig & | config | ) |
Definition at line 173 of file PythonInterpreter.cpp.
References config(), error(), CVTools::FromQString(), PythonConfigPaths::pythonHome(), PythonConfigPaths::pythonPath(), PythonVersion(), PythonConfig::System, Version::versionMajor, and Version::versionMinor.
Referenced by PythonPlugin::PythonPlugin().
| bool PythonInterpreter::isExecuting | ( | ) | const |
Definition at line 315 of file PythonInterpreter.cpp.
Referenced by KeyPressEater::eventFilter().
|
static |
Definition at line 293 of file PythonInterpreter.cpp.
Referenced by AboutDialog::AboutDialog(), and PythonPlugin::getActions().