ACloudViewer  3.9.4
A Modern Library for 3D Data Processing
PythonActionLauncher.h
Go to the documentation of this file.
1 // ----------------------------------------------------------------------------
2 // - CloudViewer: www.cloudViewer.org -
3 // ----------------------------------------------------------------------------
4 // Copyright (c) 2018-2024 www.cloudViewer.org
5 // SPDX-License-Identifier: MIT
6 // ----------------------------------------------------------------------------
7 
8 #pragma once
9 
10 #include <QListWidget>
11 #include <QWidget>
12 
13 class Ui_ActionLauncher;
15 class PythonInterpreter;
16 class PluginListModel;
17 
18 class PythonActionLauncher : public QWidget
19 {
20  Q_OBJECT
21 
22  friend PluginListModel;
23 
24  public:
25  explicit PythonActionLauncher(const PythonPluginManager *pluginManager,
26  PythonInterpreter *interpreter,
27  QWidget *parent = nullptr);
28 
29  protected:
30  void showEvent(QShowEvent *event) override;
31  void populateToolBox();
32  void clearToolBox();
33  void disable();
34  void enable();
35 
36  private: // Members
37  Ui_ActionLauncher *m_ui;
38  const PythonPluginManager *m_pluginManager;
39  PythonInterpreter *m_interpreter;
40 };
PythonActionLauncher::enable
void enable()
Definition: PythonActionLauncher.cpp:93
PythonInterpreter::executionStarted
void executionStarted()
PythonActionLauncher.h
PythonActionLauncher::PythonActionLauncher
PythonActionLauncher(const PythonPluginManager *pluginManager, PythonInterpreter *interpreter, QWidget *parent=nullptr)
Definition: PythonActionLauncher.cpp:64
PythonActionLauncher::clearToolBox
void clearToolBox()
Definition: PythonActionLauncher.cpp:98
PluginListModel::PluginListModel
PluginListModel(const Runtime::RegisteredPlugin *plugin, PythonActionLauncher *parent)
Definition: PythonActionLauncher.cpp:27
PythonPluginManager::plugins
const std::vector< Runtime::RegisteredPlugin > & plugins() const
Returns the currently loaded plugins.
Definition: PythonPluginManager.cpp:16
ACTION_LAUNCHER_ICON_PATH
#define ACTION_LAUNCHER_ICON_PATH
Definition: Resources.h:21
PythonInterpreter
Definition: PythonInterpreter.h:32
event
MouseEvent event
Definition: BitmapWindowSystem.cpp:61
PluginListModel::rowCount
int rowCount(const QModelIndex &parent) const override
Definition: PythonActionLauncher.cpp:32
PythonActionLauncher::showEvent
void showEvent(QShowEvent *event) override
Definition: PythonActionLauncher.cpp:82
PluginListModel::data
QVariant data(const QModelIndex &index, int role) const override
Definition: PythonActionLauncher.cpp:38
PythonInterpreter::executeFunction
void executeFunction(const pybind11::object &function)
Definition: PythonInterpreter.cpp:150
PythonActionLauncher
Definition: PythonActionLauncher.h:18
PythonActionLauncher::disable
void disable()
Definition: PythonActionLauncher.cpp:89
PythonActionLauncher::populateToolBox
void populateToolBox()
Definition: PythonActionLauncher.cpp:109
PluginListModel::handleDoubleClick
void handleDoubleClick(const QModelIndex &index)
Definition: PythonActionLauncher.cpp:48
PluginListModel
Definition: PythonActionLauncher.cpp:22
PythonPluginManager
Definition: PythonPluginManager.h:16
PythonInterpreter.h
Resources.h
PythonInterpreter::executionFinished
void executionFinished()
Runtime::RegisteredPlugin
Definition: Runtime.h:21
PythonPluginManager.h
PythonStdErrOutRedirect.h
Runtime::RegisteredPlugin::actions
std::vector< Action > actions
Definition: Runtime.h:68