Stellarium 0.15.2
|
Singleton main Stellarium application class. More...
#include <StelApp.hpp>
Public Slots | |
void | glWindowHasBeenResized (const QRectF &rect) |
Call this when the size of the GL window has changed. More... | |
void | setVisionModeNight (bool) |
Set flag for activating night vision mode. More... | |
bool | getVisionModeNight () const |
Get flag for activating night vision mode. More... | |
void | setFlagShowDecimalDegrees (bool b) |
Set flag for showing decimal degree in various places. More... | |
bool | getFlagShowDecimalDegrees () const |
Get flag for showing decimal degree in various places. More... | |
bool | getFlagSouthAzimuthUsage () const |
Set flag for using calculation of azimuth from south towards west (instead north towards east) More... | |
void | setFlagSouthAzimuthUsage (bool use) |
Get flag for using calculation of azimuth from south towards west (instead north towards east) More... | |
bool | getFlagOldAzimuthUsage () const |
Set flag for using calculation of azimuth from south towards west (as in older astronomical literature) More... | |
void | setFlagOldAzimuthUsage (bool use) |
Get flag for using calculation of azimuth from south towards west (as in older astronomical literature) More... | |
float | getFps () const |
Get the current number of frame per second. More... | |
quint32 | getDefaultFBO () const |
Returns the default FBO handle, to be used when StelModule instances want to release their own FBOs. More... | |
void | ensureGLContextCurrent () |
Makes sure the correct GL context used for main drawing is made current. More... | |
static double | getTotalRunTime () |
Return the time since when stellarium is running in second. More... | |
static double | getAnimationTime () |
Return the scaled time for animated objects. More... | |
void | reportFileDownloadFinished (QNetworkReply *reply) |
Report that a download occured. More... | |
void | quit () |
do some cleanup and call QCoreApplication::exit(0) More... | |
Signals | |
void | visionNightModeChanged (bool) |
void | colorSchemeChanged (const QString &) |
void | languageChanged () |
void | progressBarAdded (const StelProgressController *) |
Called just after a progress bar is added. More... | |
void | progressBarRemoved (const StelProgressController *) |
Called just before a progress bar is removed. More... | |
void | aboutToQuit () |
Called just before we exit Qt mainloop. More... | |
Public Member Functions | |
StelApp (StelMainView *parent) | |
Create and initialize the main Stellarium application. More... | |
virtual | ~StelApp () |
Deinitialize and destroy the main Stellarium application. More... | |
void | init (QSettings *conf) |
Initialize core and all the modules. More... | |
void | deinit () |
Deinitialize core and all the modules. More... | |
void | initPlugIns () |
Load and initialize external modules (plugins) More... | |
void | initScriptMgr () |
Registers all loaded StelModules with the ScriptMgr, and queues starting of the startup script. More... | |
StelModuleMgr & | getModuleMgr () |
Get the module manager to use for accessing any module loaded in the application. More... | |
StelLocaleMgr & | getLocaleMgr () |
Get the locale manager to use for i18n & date/time localization. More... | |
StelSkyCultureMgr & | getSkyCultureMgr () |
Get the sky cultures manager. More... | |
StelTextureMgr & | getTextureManager () |
Get the texture manager to use for loading textures. More... | |
StelLocationMgr & | getLocationMgr () |
Get the Location manager to use for managing stored locations. More... | |
StelObjectMgr & | getStelObjectMgr () |
Get the StelObject manager to use for querying from all stellarium objects. More... | |
StelSkyLayerMgr & | getSkyImageMgr () |
StelAudioMgr * | getStelAudioMgr () |
Get the audio manager. More... | |
StelActionMgr * | getStelActionManager () |
Get the actions manager to use for managing and editing actions. More... | |
StelPropertyMgr * | getStelPropertyManager () |
Return the property manager. More... | |
StelVideoMgr * | getStelVideoMgr () |
Get the video manager. More... | |
StelCore * | getCore () |
Get the core of the program. More... | |
QNetworkAccessManager * | getNetworkAccessManager () |
Get the common instance of QNetworkAccessManager used in stellarium. More... | |
void | updateI18n () |
Update translations, font for GUI and sky everywhere in the program. More... | |
QSettings * | getSettings () |
Return the main configuration options. More... | |
QString | getCurrentStelStyle () |
Return the currently used style. More... | |
void | update (double deltaTime) |
Update all object according to the deltaTime in seconds. More... | |
void | draw () |
Draw all registered StelModule in the order defined by the order lists. More... | |
float | getDevicePixelsPerPixel () const |
Get the ratio between real device pixel and "Device Independent Pixel". More... | |
void | setDevicePixelsPerPixel (float dppp) |
float | getGlobalScalingRatio () const |
Get the scaling ratio to apply on all display elements, like GUI, text etc. More... | |
void | setGlobalScalingRatio (float r) |
int | getBaseFontSize () const |
Get the size of font. More... | |
void | setBaseFontSize (int s) |
StelGuiBase * | getGui () const |
Get the GUI instance implementing the abstract GUI interface. More... | |
void | setGui (StelGuiBase *b) |
Tell the StelApp instance which GUI is currently being used. More... | |
StelMainScriptAPIProxy * | getMainScriptAPIProxy () |
Get the script API proxy (for signal handling) More... | |
StelScriptMgr & | getScriptMgr () |
Get the script manager. More... | |
StelProgressController * | addProgressBar () |
Add a progression indicator to the GUI (if applicable). More... | |
void | removeProgressBar (StelProgressController *p) |
void | setViewportEffect (const QString &effectName) |
Define the type of viewport effect to use. More... | |
QString | getViewportEffect () const |
Get the type of viewport effect currently used. More... | |
void | dumpModuleActionPriorities (StelModule::StelModuleActionName actionName) |
Dump diagnostics about action call priorities. More... | |
Static Public Member Functions | |
static StelApp & | getInstance () |
Get the StelApp singleton instance. More... | |
static void | initStatic () |
static void | deinitStatic () |
Properties | |
bool | nightMode |
Friends | |
class | StelAppGraphicsWidget |
class | StelRootItem |
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.
Definition at line 68 of file StelApp.hpp.
StelApp::StelApp | ( | StelMainView * | parent | ) |
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 |
|
virtual |
Deinitialize and destroy the main Stellarium application.
|
signal |
Called just before we exit Qt mainloop.
StelProgressController* StelApp::addProgressBar | ( | ) |
Add a progression indicator to the GUI (if applicable).
void StelApp::deinit | ( | ) |
Deinitialize core and all the modules.
void StelApp::draw | ( | ) |
Draw all registered StelModule in the order defined by the order lists.
void StelApp::dumpModuleActionPriorities | ( | StelModule::StelModuleActionName | actionName | ) |
Dump diagnostics about action call priorities.
|
slot |
|
staticslot |
Return the scaled time for animated objects.
|
inline |
Get the size of font.
Definition at line 177 of file StelApp.hpp.
|
inline |
Get the core of the program.
It is the one which provide the projection, navigation and tone converter.
Definition at line 143 of file StelApp.hpp.
|
inline |
Return the currently used style.
Definition at line 155 of file StelApp.hpp.
|
inlineslot |
Returns the default FBO handle, to be used when StelModule instances want to release their own FBOs.
Note that this is usually not the same as QOpenGLContext::defaultFramebufferObject(), so use this call instead of the Qt version! Valid through a StelModule::draw() call, do not use elsewhere.
Definition at line 248 of file StelApp.hpp.
|
inline |
Get the ratio between real device pixel and "Device Independent Pixel".
Usually this value is 1, but for a mac with retina screen this will be value 2.
Definition at line 167 of file StelApp.hpp.
|
inlineslot |
Set flag for using calculation of azimuth from south towards west (as in older astronomical literature)
Definition at line 234 of file StelApp.hpp.
|
inlineslot |
Get flag for showing decimal degree in various places.
Definition at line 225 of file StelApp.hpp.
|
inlineslot |
Set flag for using calculation of azimuth from south towards west (instead north towards east)
Definition at line 228 of file StelApp.hpp.
|
inlineslot |
Get the current number of frame per second.
Definition at line 242 of file StelApp.hpp.
|
inline |
Get the scaling ratio to apply on all display elements, like GUI, text etc.
When this ratio is 1, all pixel sizes used in Stellarium will look OK on a regular computer screen with 96 pixel per inch (reference for tuning sizes).
Definition at line 173 of file StelApp.hpp.
|
inline |
Get the GUI instance implementing the abstract GUI interface.
Definition at line 181 of file StelApp.hpp.
|
inlinestatic |
Get the StelApp singleton instance.
Definition at line 100 of file StelApp.hpp.
|
inline |
Get the locale manager to use for i18n & date/time localization.
Definition at line 108 of file StelApp.hpp.
|
inline |
Get the Location manager to use for managing stored locations.
Definition at line 120 of file StelApp.hpp.
|
inline |
Get the script API proxy (for signal handling)
Definition at line 188 of file StelApp.hpp.
|
inline |
Get the module manager to use for accessing any module loaded in the application.
Definition at line 104 of file StelApp.hpp.
|
inline |
Get the common instance of QNetworkAccessManager used in stellarium.
Definition at line 146 of file StelApp.hpp.
|
inline |
Get the script manager.
Definition at line 190 of file StelApp.hpp.
|
inline |
Return the main configuration options.
Definition at line 152 of file StelApp.hpp.
|
inline |
Get the sky cultures manager.
Definition at line 112 of file StelApp.hpp.
|
inline |
Get the actions manager to use for managing and editing actions.
Definition at line 132 of file StelApp.hpp.
|
inline |
Get the audio manager.
Definition at line 129 of file StelApp.hpp.
|
inline |
Get the StelObject manager to use for querying from all stellarium objects.
Definition at line 124 of file StelApp.hpp.
|
inline |
Return the property manager.
Definition at line 135 of file StelApp.hpp.
|
inline |
Get the video manager.
Definition at line 138 of file StelApp.hpp.
|
inline |
Get the texture manager to use for loading textures.
Definition at line 116 of file StelApp.hpp.
|
staticslot |
Return the time since when stellarium is running in second.
QString StelApp::getViewportEffect | ( | ) | const |
Get the type of viewport effect currently used.
|
inlineslot |
Get flag for activating night vision mode.
Definition at line 220 of file StelApp.hpp.
|
slot |
Call this when the size of the GL window has changed.
void StelApp::init | ( | QSettings * | conf | ) |
Initialize core and all the modules.
void StelApp::initPlugIns | ( | ) |
Load and initialize external modules (plugins)
void StelApp::initScriptMgr | ( | ) |
Registers all loaded StelModules with the ScriptMgr, and queues starting of the startup script.
|
signal |
Called just after a progress bar is added.
|
signal |
Called just before a progress bar is removed.
|
slot |
do some cleanup and call QCoreApplication::exit(0)
|
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.
|
inlineslot |
Get flag for using calculation of azimuth from south towards west (as in older astronomical literature)
Definition at line 237 of file StelApp.hpp.
|
slot |
Set flag for showing decimal degree in various places.
|
inlineslot |
Get flag for using calculation of azimuth from south towards west (instead north towards east)
Definition at line 230 of file StelApp.hpp.
|
inline |
Tell the StelApp instance which GUI is currently being used.
The caller is responsible for destroying the GUI.
Definition at line 184 of file StelApp.hpp.
void StelApp::setViewportEffect | ( | const QString & | effectName | ) |
Define the type of viewport effect to use.
effectName | must be one of 'none', 'framebufferOnly', 'sphericMirrorDistorter' |
|
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.