Updraft  1.0
Open source glider flight visualisation tool.
pluginmanager.h
Go to the documentation of this file.
00001 #ifndef UPDRAFT_SRC_CORE_PLUGINMANAGER_H_
00002 #define UPDRAFT_SRC_CORE_PLUGINMANAGER_H_
00003 
00004 #include <QtGui>
00005 #include <QDir>
00006 
00007 namespace Updraft {
00008 
00009 // Forward declarations
00010 class PluginBase;
00011 
00012 namespace Core {
00013 
00015 class PluginManager {
00016  public:
00019   PluginManager();
00020   ~PluginManager();
00021 
00025   PluginBase* getPlugin(const QString &name);
00026 
00030   QDir getPluginDir(const QString &name);
00031 
00034   QVector<PluginBase*> getAllPlugins();
00035 
00036  private:
00038   struct LoadedPlugin {
00040     PluginBase* plugin;
00042     QDir dir;
00043   };
00044 
00050   PluginBase* load(const QString &fileName);
00051 
00060   PluginBase* finishLoading(QObject* obj, const QDir &dir);
00061 
00063   QMap<QString, LoadedPlugin*> plugins;
00064 };
00065 
00066 }  // namespace Core
00067 }  // namespace Updraft
00068 
00069 #endif  // UPDRAFT_SRC_CORE_PLUGINMANAGER_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines