20 #ifndef _STELMODULE_HPP_ 21 #define _STELMODULE_HPP_ 64 virtual void init() = 0;
76 virtual void update(
double deltaTime) = 0;
97 virtual bool handleMouseMoves(
int x,
int y, Qt::MouseButtons b) {Q_UNUSED(x); Q_UNUSED(y); Q_UNUSED(b);
return false;}
108 virtual bool handlePinch(qreal scale,
bool started) {Q_UNUSED(scale); Q_UNUSED(started);
return false;}
117 #if QT_VERSION >= 0x050500 129 #if QT_VERSION >= 0x050500 143 virtual bool configureGui(
bool show=
true) {Q_UNUSED(show);
return false;}
155 class StelAction*
addAction(
const QString&
id,
const QString& groupId,
const QString& text,
156 QObject* target,
const char* slot,
157 const QString& shortcut=
"",
const QString& altShortcut=
"");
168 const QString& shortcut=
"",
const QString& altShortcut=
"") {
169 return addAction(
id, groupId, text,
this, slot, shortcut, altShortcut);
175 #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 (call to own slot) 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.
virtual void handleMouseClicks(class QMouseEvent *)
Handle mouse clicks.
Action associated to the handleMouseMoves() method.
Wrapper around an argumentless QObject slot or a bool Q_PROPERTY with WRITE method, allowing the slot to be called/property to be toggled using this action object.
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 (call to slot) to the StelActionMgr object.
This is the common base class for all the main components of stellarium.