StelModule.hpp   StelModule.hpp 
skipping to change at line 39 skipping to change at line 39
//! This is the common base class for all the main components of stellarium . //! This is the common base class for all the main components of stellarium .
//! Standard StelModules are the one displaying the stars, the constellatio ns, the planets etc.. //! Standard StelModules are the one displaying the stars, the constellatio ns, the planets etc..
//! Every new module derived class should implement the methods defined in StelModule.hpp. //! 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. //! 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 //! 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, //! Because StelModules are very generic components, it is also possible to load them dynamically,
//! thus enabling creation of external plug-ins for stellarium. //! thus enabling creation of external plug-ins for stellarium.
//! @sa StelObjectModule for StelModule managing collections of StelObject. //! @sa StelObjectModule for StelModule managing collections of StelObject.
//! @sa @ref plugins for documentation on how to develop external plugins. //! @sa @ref plugins for documentation on how to develop external plugins.
//!
//! There are several signals that StelApp emits that subclasses may be int
erested in:
//! laguageChanged()
//! Update i18n strings from english names according to current global s
ky and application language.
//! This method also reload the proper fonts depending on the language.
//! The translation shall be done using the StelTranslator provided by t
he StelApp singleton instance.
//! skyCultureChanged(const QString&)
//! Update sky culture, i.e. load data if necessary and translate them t
o current sky language if needed.
//! colorSchemeChanged(const QString&)
//! Load the given color style
class StelModule : public QObject class StelModule : public QObject
{ {
// Do not add Q_OBJECT here!! // Do not add Q_OBJECT here!!
// This make this class compiled by the Qt moc compiler and for some unknown reasons makes it impossible to dynamically // This make this class compiled by the Qt moc compiler and for some unknown reasons makes it impossible to dynamically
// load plugins on windows. // load plugins on windows.
public: public:
StelModule() {;} StelModule() {;}
virtual ~StelModule() {;} virtual ~StelModule() {;}
skipping to change at line 71 skipping to change at line 81
//! Iterate through the drawing sequence. //! Iterate through the drawing sequence.
//! This allow us to split the slow drawing operation into small par ts, //! This allow us to split the slow drawing operation into small par ts,
//! we can then decide to pause the painting for this frame and used the cached image instead. //! we can then decide to pause the painting for this frame and used the cached image instead.
//! @return true if we should continue drawing (by calling the metho d again) //! @return true if we should continue drawing (by calling the metho d again)
virtual bool drawPartial(StelCore* core); virtual bool drawPartial(StelCore* core);
//! Update the module with respect to the time. //! Update the module with respect to the time.
//! @param deltaTime the time increment in second since last call. //! @param deltaTime the time increment in second since last call.
virtual void update(double deltaTime) = 0; virtual void update(double deltaTime) = 0;
//! Update i18n strings from english names according to current glob
al sky and application language.
//! This method also reload the proper fonts depending on the langua
ge.
//! The translation shall be done using the StelTranslator provided
by the StelApp singleton instance.
virtual void updateI18n() {;}
//! Update sky culture, i.e. load data if necessary and translate th
em to current sky language if needed.
//! @param skyCultureDir the name of the directory containing the sk
y culture to use.
virtual void updateSkyCulture(const QString& skyCultureDir) {Q_UNUSE
D(skyCultureDir);}
//! Get the version of the module, default is stellarium main versio n //! Get the version of the module, default is stellarium main versio n
virtual QString getModuleVersion() const; virtual QString getModuleVersion() const;
//! Get the name of the module author //! Get the name of the module author
virtual QString getAuthorName() const {return "Stellarium's Team";} virtual QString getAuthorName() const {return "Stellarium's Team";}
//! Get the email adress of the module author //! Get the email adress of the module author
virtual QString getAuthorEmail() const {return "http://www.stellariu m.org";} virtual QString getAuthorEmail() const {return "http://www.stellariu m.org";}
//! Handle mouse clicks. Please note that most of the interactions w ill be done through the GUI module. //! Handle mouse clicks. Please note that most of the interactions w ill be done through the GUI module.
skipping to change at line 114 skipping to change at line 115
virtual void handleKeys(class QKeyEvent* e) {Q_UNUSED(e);} virtual void handleKeys(class QKeyEvent* e) {Q_UNUSED(e);}
//! Enum used when selecting objects to define whether to add to, re place, or remove from the existing selection list. //! Enum used when selecting objects to define whether to add to, re place, or remove from the existing selection list.
enum StelModuleSelectAction enum StelModuleSelectAction
{ {
AddToSelection, //!< Add the StelObject to the current l ist of selected ones. AddToSelection, //!< Add the StelObject to the current l ist of selected ones.
ReplaceSelection, //!< Set the StelObject as the new l ist of selected ones. ReplaceSelection, //!< Set the StelObject as the new l ist of selected ones.
RemoveFromSelection //!< Subtract the StelObject from the cu rrent list of selected ones. RemoveFromSelection //!< Subtract the StelObject from the cu rrent list of selected ones.
}; };
//! Indicate that the user requested selection of StelObjects.
//! The StelModule should then manage by themself how they handle th
e event
//! @param action define if the user requested that the objects are
added to the selection or just replace it
virtual void selectedObjectChangeCallBack(StelModuleSelectAction act
ion=ReplaceSelection) {Q_UNUSED(action);}
//! Load the given color style
//! @param section the name of the config section containing all nec
essary information on how to style widgets and text
virtual void setStelStyle(const QString& section) {Q_UNUSED(section)
;}
//! Define the possible action for which an order is defined //! Define the possible action for which an order is defined
enum StelModuleActionName enum StelModuleActionName
{ {
ActionDraw, //!< Action associated to the draw( ) method ActionDraw, //!< Action associated to the draw( ) method
ActionUpdate, //!< Action associated to the updat e() method ActionUpdate, //!< Action associated to the updat e() method
ActionHandleMouseClicks, //!< Action associated to the handl eMouseClicks() method ActionHandleMouseClicks, //!< Action associated to the handl eMouseClicks() method
ActionHandleMouseMoves, //!< Action associated to the handl eMouseMoves() method ActionHandleMouseMoves, //!< Action associated to the handl eMouseMoves() method
ActionHandleKeys //!< Action associated to the handl eKeys() method ActionHandleKeys //!< Action associated to the handl eKeys() method
}; };
skipping to change at line 145 skipping to change at line 137
//! the stars module will be drawn before the constellations //! the stars module will be drawn before the constellations
//! @param actionName the name of the action for which we want the c all order //! @param actionName the name of the action for which we want the c all order
//! @return the value defining the order. The closer to 0 the earlie r the module's action will be called //! @return the value defining the order. The closer to 0 the earlie r the module's action will be called
virtual double getCallOrder(StelModuleActionName actionName) const { Q_UNUSED(actionName); return 0;} virtual double getCallOrder(StelModuleActionName actionName) const { Q_UNUSED(actionName); return 0;}
//! Detect or show the configuration GUI elements for the module. T his is to be used with //! Detect or show the configuration GUI elements for the module. T his is to be used with
//! plugins to display a configuration dialog from the plugin list w indow. //! plugins to display a configuration dialog from the plugin list w indow.
//! @param show if true, make the configuration GUI visible. If fal se, hide the config GUI if there is one. //! @param show if true, make the configuration GUI visible. If fal se, hide the config GUI if there is one.
//! @return true if the module has a configuration GUI, else false. //! @return true if the module has a configuration GUI, else false.
virtual bool configureGui(bool show=true) {Q_UNUSED(show); return fa lse;} virtual bool configureGui(bool show=true) {Q_UNUSED(show); return fa lse;}
}; };
#endif // _STELMODULE_HPP_ #endif // _STELMODULE_HPP_
 End of changes. 4 change blocks. 
30 lines changed or deleted 14 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/