|
| StelModule () |
| Constructor. Every derived class MUST call setObjectName(className) in its constructor.
|
|
virtual void | init ()=0 |
| Initialize itself. More...
|
|
virtual void | deinit () |
| Called before the module will be deleted, and before the OpenGL context is suppressed. More...
|
|
virtual QSettings * | getSettings () |
| Return module-specific settings. More...
|
|
virtual void | draw (StelCore *core) |
| Execute all the drawing functions for this module. More...
|
|
virtual void | update (double deltaTime) |
| Update the module with respect to the time. More...
|
|
virtual QString | getModuleVersion () const |
| Get the version of the module, default is stellarium main version.
|
|
virtual QString | getAuthorName () const |
| Get the name of the module author.
|
|
virtual QString | getAuthorEmail () const |
| Get the email address of the module author.
|
|
virtual void | handleMouseClicks (class QMouseEvent *) |
| Handle mouse clicks. More...
|
|
virtual void | handleMouseWheel (class QWheelEvent *) |
| Handle mouse wheel. More...
|
|
virtual bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) |
| Handle mouse moves. More...
|
|
virtual void | handleKeys (class QKeyEvent *e) |
| Handle key events. More...
|
|
virtual bool | handlePinch (qreal scale, bool started) |
| Handle pinch gesture events. More...
|
|
virtual double | getCallOrder (StelModuleActionName actionName) const |
| Return the value defining the order of call for the given action For example if stars.callOrder[ActionDraw] == 10 and constellation.callOrder[ActionDraw] == 11, the stars module will be drawn before the constellations. More...
|
|
virtual bool | configureGui (bool show=true) |
| Detect or show the configuration GUI elements for the module. More...
|
|
|
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
| convenience methods to add an action (call to slot) to the StelActionMgr object. More...
|
|
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
| convenience methods to add an action (call to own slot) to the StelActionMgr object. More...
|
|
StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *contextObject, std::function< void()> lambda, const QString &shortcut="", const QString &altShortcut="") |
| convenience methods to add an action (call to Lambda functor) to the StelActionMgr object. More...
|
|
Standard StelModules are the one displaying the stars, the constellations, the planets etc.. Every new module derived class should implement the methods defined in StelModule.hpp. Once a module is registered into the StelModuleMgr, it is automatically managed by the program. It can be called using the GETSTELMODULE macro, passing as argument its name, which is also the QObject name Because StelModules are very generic components, it is also possible to load them dynamically, thus enabling creation of external plug-ins for stellarium.
- See also
- StelObjectModule for StelModule managing collections of StelObject.
-
Plugins for documentation on how to develop external plugins.
There are several signals that StelApp emits that subclasses may be interested in: laguageChanged() Update i18n strings from english names according to current global sky and application language. This method also reload the proper fonts depending on the language. The translation shall be done using the StelTranslator provided by the StelApp singleton instance. skyCultureChanged(const QString&) Update sky culture, i.e. load data if necessary and translate them to current sky language if needed. colorSchemeChanged(const QString&) Load the given color style
virtual bool StelModule::configureGui |
( |
bool |
show = true | ) |
|
|
inlinevirtual |
This is to be used with plugins to display a configuration dialog from the plugin list window.
- Parameters
-
show | if true, make the configuration GUI visible. If false, hide the config GUI if there is one. |
- Returns
- true if the module has a configuration GUI, else false.
Reimplemented in Satellites, ArchaeoLines, Exoplanets, Pulsars, Quasars, Oculars, MeteorShowersMgr, Novae, Supernovae, AngleMeasure, RemoteSync, RemoteControl, Observability, TelescopeControl, Calendars, Scenery3d, NavStars, PointerCoordinates, EquationOfTime, SolarSystemEditor, and OnlineQueries.
- Parameters
-
actionName | the name of the action for which we want the call order |
- Returns
- the value defining the order. The closer to 0 the earlier the module's action will be called
Reimplemented in NebulaMgr, LandscapeMgr, ArchaeoLines, Satellites, GridLinesMgr, SolarSystem, StarMgr, StelMovementMgr, Oculars, ScreenImageMgr, MeteorShowersMgr, ConstellationMgr, Scenery3d, Exoplanets, Pulsars, AsterismMgr, Quasars, NavStars, AngleMeasure, PointerCoordinates, ZodiacalLight, Supernovae, Novae, SpecialMarkersMgr, RemoteSync, EquationOfTime, RemoteControl, SolarSystemEditor, MilkyWay, Observability, LabelMgr, MarkerMgr, NomenclatureMgr, StelSkyLayerMgr, HipsMgr, CustomObjectMgr, HighlightMgr, TextUserInterface, SporadicMeteorMgr, Oculus, ToastMgr, HelloStelModule, SimpleDrawLine, TelescopeControl, and Calendars.
virtual void StelModule::init |
( |
| ) |
|
|
pure virtual |
If the initialization takes significant time, the progress should be displayed on the loading bar.
Implemented in MeteorShowers, NebulaMgr, LandscapeMgr, ArchaeoLines, Satellites, GridLinesMgr, SolarSystem, StarMgr, Oculars, ScreenImageMgr, MeteorShowersMgr, StelMovementMgr, ConstellationMgr, Scenery3d, Exoplanets, Pulsars, Quasars, AsterismMgr, NavStars, AngleMeasure, PointerCoordinates, Supernovae, Novae, ZodiacalLight, RemoteSync, EquationOfTime, SpecialMarkersMgr, RemoteControl, SolarSystemEditor, Observability, OnlineQueries, MilkyWay, SpecificTimeMgr, NomenclatureMgr, LabelMgr, MarkerMgr, HipsMgr, StelSkyLayerMgr, StelObjectMgr, CustomObjectMgr, HighlightMgr, TextUserInterface, SporadicMeteorMgr, StelGeodesicGridDrawer, Oculus, ToastMgr, HelloStelModule, SimpleDrawLine, TelescopeControl, and Calendars.