Stellarium 0.11.4
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

StelApp Class Reference

Singleton main Stellarium application class. More...

#include <StelApp.hpp>

List of all members.

Public Slots

void setVisionModeNight (bool)
 Set flag for activating night vision mode.
bool getVisionModeNight () const
 Get flag for activating night vision mode.
float getFps () const
 Get the current number of frame per second.
static double getTotalRunTime ()
 Return the time since when stellarium is running in second.
void reportFileDownloadFinished (QNetworkReply *reply)
 Report that a download occured.

Signals

void colorSchemeChanged (const QString &)
void languageChanged ()
void skyCultureChanged (const QString &)

Public Member Functions

 StelApp (QObject *parent=NULL)
 Create and initialize the main Stellarium application.
virtual ~StelApp ()
 Deinitialize and destroy the main Stellarium application.
void init (QSettings *conf)
 Initialize core and default modules.
void initPlugIns ()
 Load and initialize external modules (plugins).
StelModuleMgrgetModuleMgr ()
 Get the module manager to use for accessing any module loaded in the application.
StelLocaleMgrgetLocaleMgr ()
 Get the locale manager to use for i18n & date/time localization.
StelSkyCultureMgrgetSkyCultureMgr ()
 Get the sky cultures manager.
StelTextureMgrgetTextureManager ()
 Get the texture manager to use for loading textures.
StelLocationMgrgetLocationMgr ()
 Get the Location manager to use for managing stored locations.
StelObjectMgrgetStelObjectMgr ()
 Get the StelObject manager to use for querying from all stellarium objects.
StelSkyLayerMgrgetSkyImageMgr ()
 Get the StelObject manager to use for querying from all stellarium objects.
StelAudioMgrgetStelAudioMgr ()
 Get the audio manager.
StelVideoMgrgetStelVideoMgr ()
 Get the video manager.
StelCoregetCore ()
 Get the core of the program.
QNetworkAccessManager * getNetworkAccessManager ()
 Get the common instance of QNetworkAccessManager used in stellarium.
void updateI18n ()
 Update translations, font for GUI and sky everywhere in the program.
void updateSkyCulture ()
 Update and reload sky culture informations everywhere in the program.
QSettings * getSettings ()
 Return the main configuration options.
QString getCurrentStelStyle ()
 Return the currently used style.
void update (double deltaTime)
 Update all object according to the deltaTime in seconds.
void draw ()
 Draw all registered StelModule in the order defined by the order lists.
bool drawPartial ()
 Iterate through the drawing sequence.
void glWindowHasBeenResized (float x, float y, float w, float h)
 Call this when the size of the GL window has changed.
StelGuiBasegetGui () const
 Get the GUI instance implementing the abstract GUI interface.
void setGui (StelGuiBase *b)
 Tell the StelApp instance which GUI si currently being used.
bool getUseGLShaders () const
 Get flag for using opengl shaders.

Static Public Member Functions

static StelAppgetInstance ()
 Get the StelApp singleton instance.
static void initStatic ()
static void deinitStatic ()

Detailed Description

Singleton main Stellarium application class.

This is the central class of Stellarium. Only one singleton instance of this class is created and can be accessed from anywhere else. This class is the access point to several "Manager" class which provide application-wide services for managment of font, textures, localization, sky culture, and in theory all other services used by the other part of the program.

The StelApp class is also the one managing the StelModule in a generic manner by calling their update, drawing and other methods when needed.

Author:
Fabien Chereau

Constructor & Destructor Documentation

StelApp::StelApp ( QObject *  parent = NULL  ) 

Create and initialize the main Stellarium application.

Parameters:
parent the QObject parent The configFile will be search for in the search path by the StelFileMgr, it is therefor possible to specify either just a file name or path within the search path, or use a full path or even a relative path to an existing file
virtual StelApp::~StelApp (  )  [virtual]

Deinitialize and destroy the main Stellarium application.


Member Function Documentation

void StelApp::draw (  ) 

Draw all registered StelModule in the order defined by the order lists.

Returns:
the max squared distance in pixels that any object has travelled since the last update.
bool StelApp::drawPartial (  ) 

Iterate through the drawing sequence.

This allow us to split the slow drawing operation into small parts, we can then decide to pause the painting for this frame and used the cached image instead.

Returns:
true if we should continue drawing (by calling the method again)
StelCore* StelApp::getCore (  )  [inline]

Get the core of the program.

It is the one which provide the projection, navigation and tone converter.

Returns:
the StelCore instance of the program
QString StelApp::getCurrentStelStyle (  )  [inline]

Return the currently used style.

float StelApp::getFps (  )  const [inline, slot]

Get the current number of frame per second.

Returns:
the FPS averaged on the last second
StelGuiBase* StelApp::getGui (  )  const [inline]

Get the GUI instance implementing the abstract GUI interface.

static StelApp& StelApp::getInstance (  )  [inline, static]

Get the StelApp singleton instance.

Returns:
the StelApp singleton instance
StelLocaleMgr& StelApp::getLocaleMgr (  )  [inline]

Get the locale manager to use for i18n & date/time localization.

Returns:
the font manager to use for loading fonts.
StelLocationMgr& StelApp::getLocationMgr (  )  [inline]

Get the Location manager to use for managing stored locations.

Returns:
the Location manager to use for managing stored locations
StelModuleMgr& StelApp::getModuleMgr (  )  [inline]

Get the module manager to use for accessing any module loaded in the application.

Returns:
the module manager.
QNetworkAccessManager* StelApp::getNetworkAccessManager (  )  [inline]

Get the common instance of QNetworkAccessManager used in stellarium.

QSettings* StelApp::getSettings (  )  [inline]

Return the main configuration options.

StelSkyCultureMgr& StelApp::getSkyCultureMgr (  )  [inline]

Get the sky cultures manager.

Returns:
the sky cultures manager
StelSkyLayerMgr& StelApp::getSkyImageMgr (  )  [inline]

Get the StelObject manager to use for querying from all stellarium objects.

Returns:
the StelObject manager to use for querying from all stellarium objects .
StelAudioMgr* StelApp::getStelAudioMgr (  )  [inline]

Get the audio manager.

StelObjectMgr& StelApp::getStelObjectMgr (  )  [inline]

Get the StelObject manager to use for querying from all stellarium objects.

Returns:
the StelObject manager to use for querying from all stellarium objects .
StelVideoMgr* StelApp::getStelVideoMgr (  )  [inline]

Get the video manager.

StelTextureMgr& StelApp::getTextureManager (  )  [inline]

Get the texture manager to use for loading textures.

Returns:
the texture manager to use for loading textures.
static double StelApp::getTotalRunTime (  )  [static, slot]

Return the time since when stellarium is running in second.

bool StelApp::getUseGLShaders (  )  const [inline]

Get flag for using opengl shaders.

bool StelApp::getVisionModeNight (  )  const [inline, slot]

Get flag for activating night vision mode.

void StelApp::glWindowHasBeenResized ( float  x,
float  y,
float  w,
float  h 
)

Call this when the size of the GL window has changed.

void StelApp::init ( QSettings *  conf  ) 

Initialize core and default modules.

void StelApp::initPlugIns (  ) 

Load and initialize external modules (plugins).

void StelApp::reportFileDownloadFinished ( QNetworkReply *  reply  )  [slot]

Report that a download occured.

This is used for statistics purposes. Connect this slot to QNetworkAccessManager::finished() slot to obtain statistics at the end of the program.

void StelApp::setGui ( StelGuiBase b  )  [inline]

Tell the StelApp instance which GUI si currently being used.

The caller is responsible for destroying the GUI.

void StelApp::setVisionModeNight ( bool   )  [slot]

Set flag for activating night vision mode.

void StelApp::update ( double  deltaTime  ) 

Update all object according to the deltaTime in seconds.

void StelApp::updateI18n (  ) 

Update translations, font for GUI and sky everywhere in the program.

void StelApp::updateSkyCulture (  ) 

Update and reload sky culture informations everywhere in the program.

Generated on Sat Aug 25 22:13:32 2012 for Stellarium by  doxygen 1.6.3