Manage a collection of StelModules including both core and plugin modules.
More...
#include <StelModuleMgr.hpp>
|
void | extensionsAdded (QObjectList newExtensions) |
| Called whenever new plugin extensions are added.
|
|
The order in which some actions like draw or update are called for each module can be retrieved with the getCallOrders() method.
◆ getExtensionList()
QObjectList StelModuleMgr::getExtensionList |
( |
| ) |
const |
|
inline |
If using this method, you probably also want to subscribe to the extensionsAdded() signal to handle all possible initialization orders.
◆ getModule()
StelModule* StelModuleMgr::getModule |
( |
const QString & |
moduleID, |
|
|
bool |
noWarning = false |
|
) |
| const |
- Parameters
-
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. |
◆ loadPlugin()
StelModule* StelModuleMgr::loadPlugin |
( |
const QString & |
moduleID | ) |
|
- Parameters
-
moduleID | the name of the module = name of the dynamic library file without extension (e.g "mymodule" for mymodule.so or mymodule.dll) |
- Returns
- the loaded module or Q_NULLPTR in case of error. The returned Stelmodule still needs to be initialized
◆ registerModule()
void StelModuleMgr::registerModule |
( |
StelModule * |
m, |
|
|
bool |
generateCallingLists = false |
|
) |
| |
◆ setPluginLoadAtStartup()
void StelModuleMgr::setPluginLoadAtStartup |
( |
const QString & |
key, |
|
|
bool |
b |
|
) |
| |
◆ unloadModule()
void StelModuleMgr::unloadModule |
( |
const QString & |
moduleID, |
|
|
bool |
alsoDelete = true |
|
) |
| |
The program will hang if other modules depend on the removed one
- Parameters
-
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. |