module_loader.h

Go to the documentation of this file.
00001 
00023 #ifndef MODULE_LOADER_H
00024 #define MODULE_LOADER_H
00025 
00026 #include <QPluginLoader>
00027 
00028 #include "graphic_items.h"
00029 #include "module_interface.h"
00030 #include "lcdpaintengine.h"
00031 
00032 class ModuleLoader : public QObject
00033 {
00034         Q_OBJECT
00035 
00036         signals:
00037                 void newPlugin(const QString&, const QString&, const QIcon&);
00038                 void newController(const QString&, const QString&, const QIcon&);
00039                 void newPluginGroup(const QString&, const QString&, const QIcon&);
00040                 void newControllerGroup(const QString&, const QString&, const QIcon&);
00041 
00042         public:
00043                 void initModuleDir(const QDir&);
00044 
00045         protected:
00046                 bool loadModule(const QString&);
00047 
00048                 ModuleInterface* m_module;
00049 
00050         private:
00051                 static QMap<QString, QString> m_modulePaths;
00052                 static QList<QString> m_moduleNames;
00053                 QPluginLoader m_loader;
00054 };
00055 
00056 class ControllerLoader : public ModuleLoader
00057 {
00058         public:
00059                 ControllerInterface* load(const QString&);
00060                 bool initController();
00061 
00062         private:
00063                 ControllerInterface* m_controller;
00064 };
00065 
00066 class PluginLoader : public ModuleLoader
00067 {
00068         public:
00069                 PluginInterface* load(const QString&);
00070                 bool initPlugin();
00071 
00072         private:
00073                 PluginInterface* m_plugin;
00074 };
00075 
00076 #endif

Generated on Thu Apr 5 13:06:31 2007 for LCDBuilder by  doxygen 1.4.7