![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
Singleton main Stellarium application class. More...
#include <StelApp.hpp>
Public Slots | |
void | setVisionModeNight (bool) |
bool | getVisionModeNight () const |
float | getFps () const |
static double | getTotalRunTime () |
void | reportFileDownloadFinished (QNetworkReply *reply) |
Public Member Functions | |
StelApp (QObject *parent=NULL) | |
virtual | ~StelApp () |
void | init (QSettings *conf) |
void | initPlugIns () |
StelModuleMgr & | getModuleMgr () |
StelLocaleMgr & | getLocaleMgr () |
StelSkyCultureMgr & | getSkyCultureMgr () |
StelTextureMgr & | getTextureManager () |
StelLocationMgr & | getLocationMgr () |
StelObjectMgr & | getStelObjectMgr () |
StelSkyLayerMgr & | getSkyImageMgr () |
StelAudioMgr * | getStelAudioMgr () |
StelCore * | getCore () |
QNetworkAccessManager * | getNetworkAccessManager () |
void | updateI18n () |
void | updateSkyCulture () |
QSettings * | getSettings () |
QString | getCurrentStelStyle () |
void | update (double deltaTime) |
void | draw () |
bool | drawPartial () |
void | glWindowHasBeenResized (float x, float y, float w, float h) |
StelGuiBase * | getGui () const |
void | setGui (StelGuiBase *b) |
bool | getUseGLShaders () const |
Static Public Member Functions | |
static StelApp & | getInstance () |
static void | initStatic () |
static void | deinitStatic () |
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.
StelApp::StelApp | ( | QObject * | parent = NULL |
) |
Create and initialize the main Stellarium application.
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 |
void StelApp::draw | ( | ) |
Draw all registered StelModule in the order defined by the order lists.
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.
StelCore* StelApp::getCore | ( | ) | [inline] |
Get the core of the program.
It is the one which provide the projection, navigation and tone converter.
float StelApp::getFps | ( | ) | const [inline, slot] |
Get the current number of frame per second.
static StelApp& StelApp::getInstance | ( | ) | [inline, static] |
StelLocaleMgr& StelApp::getLocaleMgr | ( | ) | [inline] |
Get the locale manager to use for i18n & date/time localization.
StelLocationMgr& StelApp::getLocationMgr | ( | ) | [inline] |
Get 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.
StelSkyCultureMgr& StelApp::getSkyCultureMgr | ( | ) | [inline] |
Get the sky cultures manager.
StelSkyLayerMgr& StelApp::getSkyImageMgr | ( | ) | [inline] |
Get the StelObject manager to use for querying from all stellarium objects.
StelObjectMgr& StelApp::getStelObjectMgr | ( | ) | [inline] |
Get the StelObject manager to use for querying from all stellarium objects.
StelTextureMgr& StelApp::getTextureManager | ( | ) | [inline] |
Get the texture manager to use for loading textures.
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.