20 #ifndef _STELMODULEMGR_HPP_ 21 #define _STELMODULEMGR_HPP_ 26 #include "StelModule.hpp" 27 #include "StelPluginInterface.hpp" 31 #define GETSTELMODULE( m ) (( m *)StelApp::getInstance().getModuleMgr().getModule( #m )) 54 void unloadModule(
const QString& moduleID,
bool alsoDelete=
true);
81 return callOrders[action];
106 void generateCallingLists();
109 QMap<QString, StelModule*> modules;
112 QMap<StelModule::StelModuleActionName, QList<StelModule*> > callOrders;
115 bool callingListsToRegenerate;
117 QMap<QString, StelModuleMgr::PluginDescriptor> pluginDescriptorList;
118 bool pluginDescriptorListLoaded;
121 #endif // _STELMODULEMGR_HPP_ StelModule * getModule(const QString &moduleID, bool noWarning=false)
Get the corresponding module or NULL if can't find it.
Define the interface to implement when creating a plugin.
Contains the information read from the module.ini file.
void update()
Regenerate calling lists if necessary.
bool loadAtStartup
If true, the module is automatically loaded at startup.
const QList< StelModule * > & getCallOrders(StelModule::StelModuleActionName action)
Get the list of modules in the correct order for calling the given action.
QList< StelModule * > getAllModules()
Get the list of all the currently registered modules.
Manage a collection of StelModules including both core and plugin modules.
QList< PluginDescriptor > getPluginsList()
Return the list of all the external module found in the modules directories.
bool loaded
True if the plugin is currently loaded.
StelModuleActionName
Define the possible action for which an order is defined.
void registerModule(StelModule *m, bool generateCallingLists=false)
Register a new StelModule to the list The module is later referenced by its QObject name...
void unloadAllPlugins()
Unload all plugins.
void unloadModule(const QString &moduleID, bool alsoDelete=true)
Unregister and delete a StelModule.
void setPluginLoadAtStartup(const QString &key, bool b)
Define whether a plugin should be loaded at startup.
StelModule * loadPlugin(const QString &moduleID)
Load dynamically a module.
StelPluginInfo info
The static info for the plugin.
This is the common base class for all the main components of stellarium.
Contains information about a Stellarium plugin.