StelApp.hpp   StelApp.hpp 
skipping to change at line 26 skipping to change at line 26
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#ifndef _STELAPP_HPP_ #ifndef _STELAPP_HPP_
#define _STELAPP_HPP_ #define _STELAPP_HPP_
#include <QString> #include <QString>
#include <QVariant> #include <QVariant>
#include <QObject> #include <QObject>
#include <QFile>
// Predeclaration of some classes // Predeclaration of some classes
class StelCore; class StelCore;
class SkyLocalizer;
class StelTextureMgr; class StelTextureMgr;
class StelObjectMgr; class StelObjectMgr;
class StelLocaleMgr; class StelLocaleMgr;
class StelModuleMgr; class StelModuleMgr;
class StelSkyCultureMgr; class StelSkyCultureMgr;
class QStringList;
class StelLoadingBar;
class QSettings; class QSettings;
class QNetworkAccessManager; class QNetworkAccessManager;
class StelStyle; class QNetworkReply;
class QTime; class QTime;
class StelLocationMgr; class StelLocationMgr;
class StelSkyLayerMgr; class StelSkyLayerMgr;
class StelAudioMgr; class StelAudioMgr;
class QNetworkReply;
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
//! is the access point to several "Manager" class which provide applicatio n-wide //! is the access point to several "Manager" class which provide applicatio n-wide
//! services for managment of font, textures, localization, sky culture, an d in //! services for managment of font, textures, localization, sky culture, an d in
//! theory all other services used by the other part of the program. //! theory all other services used by the other part of the program.
//! //!
skipping to change at line 67 skipping to change at line 62
//! by calling their update, drawing and other methods when needed. //! by calling their update, drawing and other methods when needed.
//! @author Fabien Chereau //! @author Fabien Chereau
class StelApp : public QObject class StelApp : public QObject
{ {
Q_OBJECT Q_OBJECT
public: public:
friend class StelAppGraphicsWidget; friend class StelAppGraphicsWidget;
//! Create and initialize the main Stellarium application. //! Create and initialize the main Stellarium application.
//! @param argc The number of command line parameters
//! @param argv an array of char* command line arguments
//! @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.
skipping to change at line 124 skipping to change at line 117
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 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 main loading bar used by modules for displaying loading
informations.
//! @return the main StelLoadingBar instance of the program.
StelLoadingBar* getStelLoadingBar() {return loadingBar;}
//! 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;}
//! Update translations, font for GUI and sky everywhere in the prog ram. //! Update translations, font for GUI and sky everywhere in the prog ram.
void updateI18n(); void updateI18n();
//! Update and reload sky culture informations everywhere in the pro gram. //! Update and reload sky culture informations everywhere in the pro gram.
void updateSkyCulture(); void updateSkyCulture();
//! 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
const StelStyle* getCurrentStelStyle() {return currentStelStyle;} 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. //! 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. //! @return the max squared distance in pixels that any object has t ravelled since the last update.
void draw(); 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,
skipping to change at line 165 skipping to change at line 154
//! Call this when the size of the GL window has changed. //! Call this when the size of the GL window has changed.
void glWindowHasBeenResized(float x, float y, float w, float h); void glWindowHasBeenResized(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;}
//! Make sure that the GL context of the main window is current and
valid.
static void makeMainGLContextCurrent();
static void initStatic(); static void initStatic();
static void deinitStatic();
//! Get flag for using opengl shaders //! Get flag for using opengl shaders
bool getUseGLShaders() const {return useGLShaders;} bool getUseGLShaders() const {return useGLShaders;}
//////////////////////////////////////////////////////////////////// /////// //////////////////////////////////////////////////////////////////// ///////
// Scriptable methods // Scriptable methods
public slots: public slots:
//! Set flag for activating night vision mode. //! Set flag for activating night vision mode.
void setVisionModeNight(bool); void setVisionModeNight(bool);
skipping to change at line 234 skipping to change at line 221
// 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;
//! Get proxy settings from config file... if not set use http_proxy
env var
void setupHttpProxy();
// The audio manager. Must execute in the main thread. // The audio manager. Must execute in the main thread.
StelAudioMgr* audioMgr; StelAudioMgr* audioMgr;
// The main loading bar
StelLoadingBar* loadingBar;
// Currently used StelStyle
StelStyle* currentStelStyle;
StelSkyLayerMgr* skyImageMgr; StelSkyLayerMgr* skyImageMgr;
StelGuiBase* stelGui; StelGuiBase* stelGui;
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;
skipping to change at line 271 skipping to change at line 255
static QTime* qtime; static QTime* qtime;
// Temporary variables used to store the last gl window resize // Temporary variables used to store the last gl 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 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.
int nbUsedCache; int nbUsedCache;
//! Store the the summed size of all downloaded files read from the cache in bytes. //! Store the summed size of all downloaded files read from the cach e in bytes.
qint64 totalUsedCacheSize; qint64 totalUsedCacheSize;
//! The state of the drawing sequence //! The state of the drawing sequence
int drawState; int drawState;
}; };
#endif // _STELAPP_HPP_ #endif // _STELAPP_HPP_
 End of changes. 14 change blocks. 
26 lines changed or deleted 9 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/