Stellarium
0.21.3
|
#include <StelModuleMgr.hpp>
Data Structures | |
struct | PluginDescriptor |
Contains the information read from the module.ini file. More... | |
Signals | |
void | extensionsAdded (QObjectList newExtensions) |
Called whenever new plugin extensions are added. | |
Public Member Functions | |
void | update () |
Regenerate calling lists if necessary. | |
void | registerModule (StelModule *m, bool generateCallingLists=false) |
Register a new StelModule to the list The module is later referenced by its QObject name. | |
void | unloadModule (const QString &moduleID, bool alsoDelete=true) |
Unregister and delete a StelModule. More... | |
StelModule * | loadPlugin (const QString &moduleID) |
Load dynamically a module. More... | |
QObjectList | loadExtensions (const QString &moduleID) |
void | unloadAllPlugins () |
Unload all plugins. | |
void | setPluginLoadAtStartup (const QString &key, bool b) |
Define whether a plugin should be loaded at startup. More... | |
bool | isPluginLoaded (const QString &moduleID) |
QString | getStandardSupportLinksInfo (QString moduleName, bool furtherInfo=false) |
StelModule * | getModule (const QString &moduleID, bool noWarning=false) const |
Get the corresponding module or Q_NULLPTR if can't find it. More... | |
QList< StelModule * > | getAllModules () const |
Get the list of all the currently registered modules. | |
const QList< StelModule * > & | getCallOrders (StelModule::StelModuleActionName action) |
Get the list of modules in the correct order for calling the given action. | |
QList< PluginDescriptor > | getPluginsList () |
Return the list of all the external module found in the modules directories. | |
QObjectList | getExtensionList () const |
Returns the list of all currently registered extensions. More... | |
Manage a collection of StelModules including both core and plugin modules. The order in which some actions like draw or update are called for each module can be retrieved with the getCallOrders() method.
|
inline |
If using this method, you probably also want to subscribe to the extensionsAdded() signal to handle all possible initialization orders.
StelModule* StelModuleMgr::getModule | ( | const QString & | moduleID, |
bool | noWarning = false |
||
) | const |
moduleID | the QObject name of the module instance, by convention it is equal to the class name. |
noWarning | if true, don't display any warning if the module is not found. |
StelModule* StelModuleMgr::loadPlugin | ( | const QString & | moduleID | ) |
moduleID | the name of the module = name of the dynamic library file without extension (e.g "mymodule" for mymodule.so or mymodule.dll) |
void StelModuleMgr::setPluginLoadAtStartup | ( | const QString & | key, |
bool | b | ||
) |
key | the key of the plugin as in the PluginDescriptor class. |
b | the value to set. |
void StelModuleMgr::unloadModule | ( | const QString & | moduleID, |
bool | alsoDelete = true |
||
) |
The program will hang if other modules depend on the removed one
moduleID | the unique ID of the module, by convention equal to the class name |
alsoDelete | if true also delete the StelModule instance, otherwise it has to be deleted by external code. |