StelApp.hpp   StelApp.hpp 
skipping to change at line 29 skipping to change at line 29
#ifndef _STELAPP_HPP_ #ifndef _STELAPP_HPP_
#define _STELAPP_HPP_ #define _STELAPP_HPP_
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
#include <QObject> #include <QObject>
// Predeclaration of some classes // Predeclaration of some classes
class StelCore; class StelCore;
class StelTextureMgr;
class StelObjectMgr; class StelObjectMgr;
class StelLocaleMgr; class StelLocaleMgr;
class StelModuleMgr; class StelModuleMgr;
class StelSkyCultureMgr; class StelSkyCultureMgr;
class StelShortcutMgr;
class QSettings; class QSettings;
class QNetworkAccessManager; class QNetworkAccessManager;
class QNetworkReply; class QNetworkReply;
class QTime; class QTime;
class QTimer;
class StelLocationMgr; class StelLocationMgr;
class StelSkyLayerMgr; class StelSkyLayerMgr;
class StelAudioMgr; class StelAudioMgr;
class StelVideoMgr; class StelVideoMgr;
class StelGuiBase; class StelGuiBase;
//! @class StelApp //! @class StelApp
//! Singleton main Stellarium application class. //! Singleton main Stellarium application class.
//! This is the central class of Stellarium. Only one singleton instance o f //! This is the central class of Stellarium. Only one singleton instance o f
//! this class is created and can be accessed from anywhere else. This cla ss //! this class is created and can be accessed from anywhere else. This cla ss
skipping to change at line 73 skipping to change at line 74
//! @param parent the QObject parent //! @param parent the QObject parent
//! The configFile will be search for in the search path by the Stel FileMgr, //! The configFile will be search for in the search path by the Stel FileMgr,
//! it is therefor possible to specify either just a file name or pa th within the //! it is therefor possible to specify either just a file name or pa th within the
//! search path, or use a full path or even a relative path to an ex isting file //! search path, or use a full path or even a relative path to an ex isting file
StelApp(QObject* parent=NULL); StelApp(QObject* parent=NULL);
//! Deinitialize and destroy the main Stellarium application. //! Deinitialize and destroy the main Stellarium application.
virtual ~StelApp(); virtual ~StelApp();
//! Initialize core and default modules. //! Initialize core and default modules.
void init(QSettings* conf); void init(QSettings* conf, class StelRenderer* renderer);
//! Load and initialize external modules (plugins) //! Load and initialize external modules (plugins)
void initPlugIns(); void initPlugIns();
//! Get the StelApp singleton instance. //! Get the StelApp singleton instance.
//! @return the StelApp singleton instance //! @return the StelApp singleton instance
static StelApp& getInstance() {Q_ASSERT(singleton); return *singleto n;} static StelApp& getInstance() {Q_ASSERT(singleton); return *singleto n;}
//! Get the module manager to use for accessing any module loaded in the application. //! Get the module manager to use for accessing any module loaded in the application.
//! @return the module manager. //! @return the module manager.
StelModuleMgr& getModuleMgr() {return *moduleMgr;} StelModuleMgr& getModuleMgr() {return *moduleMgr;}
//! Get the locale manager to use for i18n & date/time localization. //! Get the locale manager to use for i18n & date/time localization.
//! @return the font manager to use for loading fonts. //! @return the font manager to use for loading fonts.
StelLocaleMgr& getLocaleMgr() {return *localeMgr;} StelLocaleMgr& getLocaleMgr() {return *localeMgr;}
//! Get the sky cultures manager. //! Get the sky cultures manager.
//! @return the sky cultures manager //! @return the sky cultures manager
StelSkyCultureMgr& getSkyCultureMgr() {return *skyCultureMgr;} StelSkyCultureMgr& getSkyCultureMgr() {return *skyCultureMgr;}
//! Get the texture manager to use for loading textures.
//! @return the texture manager to use for loading textures.
StelTextureMgr& getTextureManager() {return *textureMgr;}
//! Get the Location manager to use for managing stored locations //! Get the Location manager to use for managing stored locations
//! @return the Location manager to use for managing stored location s //! @return the Location manager to use for managing stored location s
StelLocationMgr& getLocationMgr() {return *planetLocationMgr;} StelLocationMgr& getLocationMgr() {return *planetLocationMgr;}
//! Get the StelObject manager to use for querying from all stellari um objects. //! Get the StelObject manager to use for querying from all stellari um objects.
//! @return the StelObject manager to use for querying from all stel larium objects . //! @return the StelObject manager to use for querying from all stel larium objects .
StelObjectMgr& getStelObjectMgr() {return *stelObjectMgr;} StelObjectMgr& getStelObjectMgr() {return *stelObjectMgr;}
//! Get the StelObject manager to use for querying from all stellari
um objects.
//! @return the StelObject manager to use for querying from all stel
larium objects .
StelSkyLayerMgr& getSkyImageMgr() {return *skyImageMgr;} StelSkyLayerMgr& getSkyImageMgr() {return *skyImageMgr;}
//! Get the audio manager //! Get the audio manager
StelAudioMgr* getStelAudioMgr() {return audioMgr;} StelAudioMgr* getStelAudioMgr() {return audioMgr;}
//! Get the shortcuts manager to use for managing and editing shortc
uts
StelShortcutMgr* getStelShortcutManager() {return shortcutMgr;}
//! Get the video manager //! Get the video manager
StelVideoMgr* getStelVideoMgr() {return videoMgr;} StelVideoMgr* getStelVideoMgr() {return videoMgr;}
//! Get the core of the program. //! Get the core of the program.
//! It is the one which provide the projection, navigation and tone converter. //! It is the one which provide the projection, navigation and tone converter.
//! @return the StelCore instance of the program //! @return the StelCore instance of the program
StelCore* getCore() {return core;} StelCore* getCore() {return core;}
//! Get the common instance of QNetworkAccessManager used in stellar ium //! Get the common instance of QNetworkAccessManager used in stellar ium
QNetworkAccessManager* getNetworkAccessManager() {return networkAcce ssManager;} QNetworkAccessManager* getNetworkAccessManager() {return networkAcce ssManager;}
skipping to change at line 139 skipping to change at line 137
//! Return the main configuration options //! Return the main configuration options
QSettings* getSettings() {return confSettings;} QSettings* getSettings() {return confSettings;}
//! Return the currently used style //! Return the currently used style
QString getCurrentStelStyle() {return flagNightVision ? "night_color " : "color";} QString getCurrentStelStyle() {return flagNightVision ? "night_color " : "color";}
//! Update all object according to the deltaTime in seconds. //! Update all object according to the deltaTime in seconds.
void update(double deltaTime); void update(double deltaTime);
//! Draw all registered StelModule in the order defined by the order
lists.
//! @return the max squared distance in pixels that any object has t
ravelled since the last update.
void draw();
//! 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)
bool drawPartial(); bool drawPartial(class StelRenderer* renderer);
//! Call this when the size of the GL window has changed. //! Call this when the size of the window has changed.
void glWindowHasBeenResized(float x, float y, float w, float h); void windowHasBeenResized(float x, float y, float w, float h);
//! Get the GUI instance implementing the abstract GUI interface. //! Get the GUI instance implementing the abstract GUI interface.
StelGuiBase* getGui() const {return stelGui;} StelGuiBase* getGui() const {return stelGui;}
//! Tell the StelApp instance which GUI si currently being used. //! Tell the StelApp instance which GUI si currently being used.
//! The caller is responsible for destroying the GUI. //! The caller is responsible for destroying the GUI.
void setGui(StelGuiBase* b) {stelGui=b;} void setGui(StelGuiBase* b) {stelGui=b;}
static void initStatic(); static void initStatic();
static void deinitStatic(); static void deinitStatic();
//! Get flag for using opengl shaders //! Get whether solar shadows should be rendered.
bool getUseGLShaders() const {return useGLShaders;} bool getRenderSolarShadows() const;
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Scriptable methods // Scriptable methods
public slots: public slots:
//! Set flag for activating solar shadow rendering.
void setRenderSolarShadows(bool);
//! Set flag for activating night vision mode. //! Set flag for activating night vision mode.
void setVisionModeNight(bool); void setVisionModeNight(bool);
//! Get flag for activating night vision mode. //! Get flag for activating night vision mode.
bool getVisionModeNight() const {return flagNightVision;} bool getVisionModeNight() const {return flagNightVision;}
//! Get the current number of frame per second. //! Get the current number of frame per second.
//! @return the FPS averaged on the last second //! @return the FPS averaged on the last second
float getFps() const {return fps;} float getFps() const {return fps;}
//! Return the time since when stellarium is running in second. //! Return the time since when stellarium is running in second.
skipping to change at line 215 skipping to change at line 212
// Module manager for the application // Module manager for the application
StelModuleMgr* moduleMgr; StelModuleMgr* moduleMgr;
// Locale manager for the application // Locale manager for the application
StelLocaleMgr* localeMgr; StelLocaleMgr* localeMgr;
// Sky cultures manager for the application // Sky cultures manager for the application
StelSkyCultureMgr* skyCultureMgr; StelSkyCultureMgr* skyCultureMgr;
// Textures manager for the application //Shortcuts manager for the application
StelTextureMgr* textureMgr; StelShortcutMgr* shortcutMgr;
// Manager for all the StelObjects of the program // Manager for all the StelObjects of the program
StelObjectMgr* stelObjectMgr; StelObjectMgr* stelObjectMgr;
// Manager for the list of observer locations on planets // Manager for the list of observer locations on planets
StelLocationMgr* planetLocationMgr; StelLocationMgr* planetLocationMgr;
// Main network manager used for the program // Main network manager used for the program
QNetworkAccessManager* networkAccessManager; QNetworkAccessManager* networkAccessManager;
skipping to change at line 240 skipping to change at line 237
// The audio manager. Must execute in the main thread. // The audio manager. Must execute in the main thread.
StelAudioMgr* audioMgr; StelAudioMgr* audioMgr;
// The video manager. Must execute in the main thread. // The video manager. Must execute in the main thread.
StelVideoMgr* videoMgr; StelVideoMgr* videoMgr;
StelSkyLayerMgr* skyImageMgr; StelSkyLayerMgr* skyImageMgr;
StelGuiBase* stelGui; StelGuiBase* stelGui;
// Used to collect wheel events
QTimer * wheelEventTimer;
float fps; float fps;
int frame; int frame;
double timefr, timeBase; // Used for fps counter double timefr, timeBase; // Used for fps counter
//! Define whether we are in night vision mode //! Define whether we are in night vision mode
bool flagNightVision; bool flagNightVision;
//! Define whether we use opengl shaders //! Define whether solar shadows should be rendered (using GLSL shad
bool useGLShaders; ers)
bool renderSolarShadows;
QSettings* confSettings; QSettings* confSettings;
// Define whether the StelApp instance has completed initialization // Define whether the StelApp instance has completed initialization
bool initialized; bool initialized;
static QTime* qtime; static QTime* qtime;
// Temporary variables used to store the last gl window resize // Temporary variables used to store the last window resize
// if the core was not yet initialized // if the core was not yet initialized
int saveProjW; int saveProjW;
int saveProjH; int saveProjH;
//! Store the number of downloaded files for statistics. //! Store the number of downloaded files for statistics.
int nbDownloadedFiles; int nbDownloadedFiles;
//! Store the summed size of all downloaded files in bytes. //! Store the summed size of all downloaded files in bytes.
qint64 totalDownloadedSize; qint64 totalDownloadedSize;
//! Store the number of downloaded files read from the cache for sta tistics. //! Store the number of downloaded files read from the cache for sta tistics.
 End of changes. 16 change blocks. 
26 lines changed or deleted 24 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/