#ifndef PLUGINMANAGER_H #define PLUGINMANAGER_H #include #include class CutterPlugin; class PluginManager: public QObject { Q_OBJECT public: static PluginManager *getInstance(); PluginManager(); ~PluginManager(); /*! * \brief Load all plugins, should be called once on application start */ void loadPlugins(); /*! * \brief Destroy all loaded plugins, should be called once on application shutdown */ void destroyPlugins(); const QList &getPlugins() { return plugins; } private: QList plugins; void loadNativePlugins(const QDir &directory); #ifdef CUTTER_ENABLE_PYTHON void loadPythonPlugins(const QDir &directory); CutterPlugin *loadPythonPlugin(const char *moduleName); #endif }; #define Plugins() (PluginManager::getInstance()) #endif //PLUGINMANAGER_H