#ifndef _PLUGIN_MANAGER_H_ #define _PLUGIN_MANAGER_H_ #include #include #include #include #include #include class PluginInterface; class PluginManager: public QObject { Q_OBJECT public: PluginManager(); ~PluginManager(); void defaultLoad(QString baseDir = ""); QStringList availablePlugins(); QStringList loadedPlugins(); bool isLoaded(QString pluginName); void unloadPlugin(QString pluginName); public slots: void loadPlugin(QString pluginName); void readPluginFromFile(QString fullFileName); // void loadPluginFromFile(QString fileName); signals: void loadDone(QString pluginName, QWidget* pluginWidget); void loadFailed(QString pluginName, QString errorMessage); void installComplete(QString pluginName); void installFailed(QString pluginFileName, QString errorMessage); protected: //QList loaders; QList widgets; // QList widgets; QStringList fileNames; QList names; // QList states; PluginInterface* loadPluginInterface(QString fileName, QString& errorMessage) ; }; #endif