10 #include <pybind11/pytypes.h>
14 #include "../../wrapper/pycc/src/casters.h"
41 const QString &
name) noexcept(
false)
43 pybind11::object
instance = class_type();
44 py::list pyActions =
instance.attr(
"getActions")();
46 actions.reserve(pyActions.size());
48 for (
const py::handle &handle : pyActions)
62 QString
name = class_type.attr(
"__name__").cast<QString>();
Main application interface (for plugins)
void setMainAppInterfaceInstance(ecvMainAppInterface *appInterface) noexcept(false)
void unsetMainAppInterfaceInstance() noexcept
Unsets the app interface pointer.
void setCmdLineInterfaceInstance(ccCommandLineInterface *cmdLine) noexcept
void unsetCmdLineInterfaceInstance() noexcept
Unsets the pointer to the cmdline app interface.
pybind11::object target
The target python function (or method)
QString name
Name to be displayed in the UI.
Action(QString name, pybind11::object target, pybind11::object icon=pybind11::none())
pybind11::object icon
Optional path or (bytes, str) where str is the format.
static RegisteredPlugin InstanciatePlugin(pybind11::object class_type) noexcept(false)
static RegisteredPlugin InstanciatePlugin(pybind11::object class_type, const QString &name) noexcept(false)
Instanciate a plugin with a known name.
pybind11::object mainIcon
std::vector< Action > actions
pybind11::object instance