33 Q_PLUGIN_METADATA(IID
"ecvcorp.cloudviewer.plugin.PythonRuntime" FILE
"../info.json")
55 void finalizeInterpreter();
57 void showEditor() const;
58 void showAboutDialog() const;
59 void showFileRunner() const;
60 void showPackageManager();
61 void showPythonActionLauncher() const;
62 void showSettings() const;
63 static
void showDocumentation();
66 void addScriptAction();
67 void addScript(QString
path);
68 void executeScript(QString
path);
69 void removeScript(QString
name, QAction *self);
71 void populatePluginSubMenu();
73 void handlePluginActionClicked(
bool checked);
74 void handlePythonExecutionStarted();
75 void handlePythonExecutionFinished();
89 QAction *m_showEditor{
nullptr};
90 QAction *m_showRepl{
nullptr};
91 QAction *m_showDoc{
nullptr};
92 QAction *m_showFileRunner{
nullptr};
93 QAction *m_showAboutDialog{
nullptr};
94 QAction *m_showPackageManager{
nullptr};
95 QAction *m_showActionLauncher{
nullptr};
96 QAction *m_showSettings{
nullptr};
99 QMenu *m_drawScriptRegister{
nullptr};
100 QMenu *m_pluginsMenu{
nullptr};
103 std::map<const QAction *, const Runtime::RegisteredPlugin::Action *> m_pluginActions;
106 QAction *m_addScript{
nullptr};
107 QMenu *m_removeScript{
nullptr};
108 std::map<QString, QAction *> m_scriptList;
109 QStringList m_savedPath;
110 QString m_saveFilePath;
"Entry point" of the plugin
void setMainAppInterface(ecvMainAppInterface *app) override
Sets application entry point.
QList< QAction * > getActions() override
Get a list of actions for this plugin.
void stop() override
Stops the plugin.
PythonPlugin(QObject *parent=nullptr)
PythonPlugin & operator=(const PythonPlugin &)=delete
void registerCommands(ccCommandLineInterface *cmd) override
~PythonPlugin() noexcept override
PythonPlugin(PythonPlugin &&)=delete
PythonPlugin(const PythonPlugin &)=delete
PythonPlugin & operator=(PythonPlugin &&)=delete
Homemade REPL (Read Print Eval Loop)
Standard ECV plugin interface.
Standard ECV plugin interface.
Main application interface (for plugins)
static const std::string path