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);
62 QObjectList loadExtensions(
const QString& moduleID);
83 return callOrders[action];
116 void generateCallingLists();
119 QMap<QString, StelModule*> modules;
122 QObjectList extensions;
125 QMap<StelModule::StelModuleActionName, QList<StelModule*> > callOrders;
128 bool callingListsToRegenerate;
130 QMap<QString, StelModuleMgr::PluginDescriptor> pluginDescriptorList;
131 bool pluginDescriptorListLoaded;
134 #endif // _STELMODULEMGR_HPP_ StelModule * getModule(const QString &moduleID, bool noWarning=false)
Get the corresponding module or Q_NULLPTR 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.
QObjectList getExtensionList()
Returns the list of all currently registered extensions.
const QList< StelModule * > & getCallOrders(StelModule::StelModuleActionName action)
Get the list of modules in the correct order for calling the given action.
void extensionsAdded(QObjectList newExtensions)
Called whenever new plugin extensions are added.
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.