StelModule.hpp   StelModule.hpp 
skipping to change at line 54 skipping to change at line 54
// load plugins on windows. // load plugins on windows.
public: public:
StelModule() {;} StelModule() {;}
virtual ~StelModule() {;} virtual ~StelModule() {;}
//! Initialize itself. //! Initialize itself.
//! If the initialization takes significant time, the progress shoul d be displayed on the loading bar. //! If the initialization takes significant time, the progress shoul d be displayed on the loading bar.
virtual void init() = 0; virtual void init() = 0;
//! Called before the module will be delete, and before the openGL c
ontext is suppressed.
//! Deinitialize all openGL texture in this method.
virtual void deinit() {;}
//! Execute all the drawing functions for this module. //! Execute all the drawing functions for this module.
//! @param core the core to use for the drawing //! @param core the core to use for the drawing
virtual void draw(StelCore* core) = 0; virtual void draw(StelCore* core) {};
//! Iterate through the drawing sequence.
//! 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.
//! @return true if we should continue drawing (by calling the metho
d again)
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. //! 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. //! 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. //! The translation shall be done using the StelTranslator provided by the StelApp singleton instance.
virtual void updateI18n() {;} virtual void updateI18n() {;}
skipping to change at line 93 skipping to change at line 103
//! Handle mouse wheel. Please note that most of the interactions wi ll be done through the GUI module. //! Handle mouse wheel. Please note that most of the interactions wi ll be done through the GUI module.
//! @return set the event as accepted if it was intercepted //! @return set the event as accepted if it was intercepted
virtual void handleMouseWheel(class QWheelEvent* e) {;} virtual void handleMouseWheel(class QWheelEvent* e) {;}
//! Handle mouse moves. Please note that most of the interactions wi ll be done through the GUI module. //! Handle mouse moves. Please note that most of the interactions wi ll be done through the GUI module.
//! @return true if the event was intercepted //! @return true if the event was intercepted
virtual bool handleMouseMoves(int x, int y, Qt::MouseButtons b) {ret urn false;} virtual bool handleMouseMoves(int x, int y, Qt::MouseButtons b) {ret urn false;}
//! Handle key events. Please note that most of the interactions wil l be done through the GUI module. //! Handle key events. Please note that most of the interactions wil l be done through the GUI module.
//! @param event the Key event //! @param e the Key event
//! @return set the event as accepted if it was intercepted //! @return set the event as accepted if it was intercepted
virtual void handleKeys(class QKeyEvent* e) {;} virtual void handleKeys(class QKeyEvent* 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. //! Indicate that the user requested selection of StelObjects.
//! The StelModule should then manage by themself how they handle th e event //! 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 //! @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) {;} virtual void selectedObjectChangeCallBack(StelModuleSelectAction act ion=ReplaceSelection) {;}
//! Load the given color style //! Load the given color style
//! @param style the style object containing all necessary informati on on how to style widgets and text //! @param style the style object containing all necessary informati on on how to style widgets and text
virtual void setStelStyle(const StelStyle& style) {;} virtual void setStelStyle(const StelStyle& style) {;}
//! This method is called for all StelModules when the GL window is
resized
virtual void glWindowHasBeenResized(int w, int h) {;}
//! 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
}; };
//! Return the value defining the order of call for the given action //! Return the value defining the order of call for the given action
//! For example if stars.callOrder[ActionDraw] == 10 and constellati on.callOrder[ActionDraw] == 11, //! For example if stars.callOrder[ActionDraw] == 10 and constellati on.callOrder[ActionDraw] == 11,
//! 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 { return 0;} virtual double getCallOrder(StelModuleActionName actionName) const { return 0;}
//! 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.
//! @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.
virtual bool configureGui(bool show=true) {return false;}
}; };
#endif // _STELMODULE_HPP_ #endif // _STELMODULE_HPP_
 End of changes. 7 change blocks. 
8 lines changed or deleted 28 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/