20 #ifndef _STELMODULE_HPP_
21 #define _STELMODULE_HPP_
62 virtual void init() = 0;
74 virtual void update(
double deltaTime) = 0;
95 virtual bool handleMouseMoves(
int x,
int y, Qt::MouseButtons b) {Q_UNUSED(x); Q_UNUSED(y); Q_UNUSED(b);
return false;}
106 virtual bool handlePinch(qreal scale,
bool started) {Q_UNUSED(scale); Q_UNUSED(started);
return false;}
137 virtual bool configureGui(
bool show=
true) {Q_UNUSED(show);
return false;}
142 class StelAction*
addAction(
const QString&
id,
const QString& groupId,
const QString& text,
143 QObject* target,
const char* slot,
144 const QString& shortcut=
"",
const QString& altShortcut=
"");
149 const QString& shortcut=
"",
const QString& altShortcut=
"") {
150 return addAction(
id, groupId, text,
this, slot, shortcut, altShortcut);
156 #endif // _STELMODULE_HPP_
virtual QString getAuthorName() const
Get the name of the module author.
virtual void deinit()
Called before the module will be delete, and before the openGL context is suppressed.
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 to the StelActionMgr object.
Add the StelObject to the current list of selected ones.
virtual QString getModuleVersion() const
Get the version of the module, default is stellarium main version.
virtual bool configureGui(bool show=true)
Detect or show the configuration GUI elements for the module.
Action associated to the handleKeys() method.
Main class for Stellarium core processing.
virtual bool handlePinch(qreal scale, bool started)
Handle pinch gesture events.
virtual void handleKeys(class QKeyEvent *e)
Handle key events.
Q_DECLARE_METATYPE(SphericalRegionP) QDataStream &operator<<(QDataStream &out
Serialize the passed SphericalRegionP into a binary blob.
virtual void handleMouseClicks(class QMouseEvent *)
Handle mouse clicks.
Action associated to the handleMouseMoves() method.
virtual void update(double deltaTime)=0
Update the module with respect to the time.
virtual bool handleMouseMoves(int x, int y, Qt::MouseButtons b)
Handle mouse moves.
Subtract the StelObject from the current list of selected ones.
Action associated to the draw() method.
virtual void handleMouseWheel(class QWheelEvent *)
Handle mouse wheel.
virtual QString getAuthorEmail() const
Get the email adress of the module author.
virtual void init()=0
Initialize itself.
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.
StelModuleActionName
Define the possible action for which an order is defined.
Action associated to the handleMouseClicks() method.
StelModuleSelectAction
Enum used when selecting objects to define whether to add to, replace, or remove from the existing se...
virtual void draw(StelCore *core)
Execute all the drawing functions for this module.
Set the StelObject as the new list of selected ones.
Action associated to the update() method.
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 to the StelActionMgr object.
This is the common base class for all the main components of stellarium.