25 #include "StelModule.hpp" 36 class QOpenGLFramebufferObject;
37 class QOpenGLFunctions;
39 class QNetworkAccessManager;
74 friend class StelAppGraphicsWidget;
75 friend class StelRootItem;
88 void init(QSettings* conf);
158 void update(
double deltaTime);
168 void setDevicePixelsPerPixel(
float dppp);
174 void setGlobalScalingRatio(
float r) {globalScalingRatio=r;}
178 void setBaseFontSize(
int s) { baseFontSize=s; }
186 #ifndef DISABLE_SCRIPTING 193 static void initStatic();
194 static void deinitStatic();
268 void visionNightModeChanged(
bool);
269 void colorSchemeChanged(
const QString&);
270 void languageChanged();
281 void handleClick(
class QMouseEvent* event);
283 void handleWheel(
class QWheelEvent* event);
285 bool handleMove(
float x,
float y, Qt::MouseButtons b);
287 void handleKeys(
class QKeyEvent* event);
289 void handlePinch(qreal scale,
bool started);
292 void prepareRenderBuffer();
295 void applyRenderBuffer(quint32 drawFbo=0);
331 QNetworkAccessManager* networkAccessManager;
334 void setupNetworkProxy();
344 #ifndef DISABLE_SCRIPTING 358 float devicePixelsPerPixel;
361 float globalScalingRatio;
364 QTimer * wheelEventTimer;
367 int wheelEventDelta[2];
371 double frameTimeAccum;
374 bool flagNightVision;
376 QSettings* confSettings;
381 static qint64 startMSecs;
382 static float animationScale;
390 int nbDownloadedFiles;
392 qint64 totalDownloadedSize;
397 qint64 totalUsedCacheSize;
399 QList<StelProgressController*> progressControllers;
404 QOpenGLFramebufferObject* renderBuffer;
406 QOpenGLFunctions* gl;
408 bool flagShowDecimalDegrees;
410 bool flagUseAzimuthFromSouth;
420 #endif // _STELAPP_HPP_ Manage the sky background images, including DSS and deep sky objects images.
void setFlagSouthAzimuthUsage(bool use)
Get flag for using calculation of azimuth from south towards west (instead north towards east) ...
StelScriptMgr & getScriptMgr()
Get the script manager.
StelLocationMgr & getLocationMgr()
Get the Location manager to use for managing stored locations.
StelVideoMgr * getStelVideoMgr()
Get the video manager.
bool getFlagShowDecimalDegrees() const
Get flag for showing decimal degree in various places.
A scriptable way to show videos embedded in the screen.
void reportFileDownloadFinished(QNetworkReply *reply)
Report that a download occured.
bool getFlagSouthAzimuthUsage() const
Set flag for using calculation of azimuth from south towards west (instead north towards east) ...
bool getFlagOldAzimuthUsage() const
Set flag for using calculation of azimuth from south towards west (as in older astronomical literatur...
int getBaseFontSize() const
Get the size of font.
void setFlagOldAzimuthUsage(bool use)
Get flag for using calculation of azimuth from south towards west (as in older astronomical literatur...
void glWindowHasBeenResized(const QRectF &rect)
Call this when the size of the GL window has changed.
void dumpModuleActionPriorities(StelModule::StelModuleActionName actionName)
Dump diagnostics about action call priorities.
float getFps() const
Get the current number of frame per second.
void progressBarRemoved(const StelProgressController *)
Called just before a progress bar is removed.
void initScriptMgr()
Registers all loaded StelModules with the ScriptMgr, and queues starting of the startup script...
StelObjectMgr & getStelObjectMgr()
Get the StelObject manager to use for querying from all stellarium objects.
static double getAnimationTime()
Return the scaled time for animated objects.
StelPropertyMgr * getStelPropertyManager()
Return the property manager.
void ensureGLContextCurrent()
Makes sure the correct GL context used for main drawing is made current.
Manage i18n operations such as message translation and date/time localization.
Main class for Stellarium core processing.
Because the core API runs in a different thread to the main program, direct function calls to some cl...
StelModuleMgr & getModuleMgr()
Get the module manager to use for accessing any module loaded in the application. ...
StelTextureMgr & getTextureManager()
Get the texture manager to use for loading textures.
void deinit()
Deinitialize core and all the modules.
Manage the list of available location.
StelApp(StelMainView *parent)
Create and initialize the main Stellarium application.
QNetworkAccessManager * getNetworkAccessManager()
Get the common instance of QNetworkAccessManager used in stellarium.
QString getCurrentStelStyle()
Return the currently used style.
void progressBarAdded(const StelProgressController *)
Called just after a progress bar is added.
Abstract class defining the base interface for all GUIs.
StelMainScriptAPIProxy * getMainScriptAPIProxy()
Get the script API proxy (for signal handling)
void setGui(StelGuiBase *b)
Tell the StelApp instance which GUI is currently being used.
void initPlugIns()
Load and initialize external modules (plugins)
Helper class to send rendered frames to Spout (http://spout.zeal.co/)
StelActionMgr * getStelActionManager()
Get the actions manager to use for managing and editing actions.
void draw()
Draw all registered StelModule in the order defined by the order lists.
void update(double deltaTime)
Update all object according to the deltaTime in seconds.
Allow to apply visual effects on the whole Stellarium viewport.
Manage a collection of StelModules including both core and plugin modules.
QString getViewportEffect() const
Get the type of viewport effect currently used.
void updateI18n()
Update translations, font for GUI and sky everywhere in the program.
Manages the registration of specific object properties with the StelProperty system.
float getGlobalScalingRatio() const
Get the scaling ratio to apply on all display elements, like GUI, text etc.
void quit()
do some cleanup and call QCoreApplication::exit(0)
Reimplement a QGraphicsView for Stellarium.
StelAudioMgr * getStelAudioMgr()
Get the audio manager.
Manage the selection and queries on one or more StelObjects.
StelModuleActionName
Define the possible action for which an order is defined.
Manage scripting in Stellarium.
float getDevicePixelsPerPixel() const
Get the ratio between real device pixel and "Device Independent Pixel".
Maintain the state of a progress bar.
Manage sky cultures for stellarium.
void setVisionModeNight(bool)
Set flag for activating night vision mode.
Manager for StelAction instances. Allows registration of new actions, and finding an existing one by ...
static double getTotalRunTime()
Return the time since when stellarium is running in second.
void setViewportEffect(const QString &effectName)
Define the type of viewport effect to use.
static StelApp & getInstance()
Get the StelApp singleton instance.
virtual ~StelApp()
Deinitialize and destroy the main Stellarium application.
StelSkyCultureMgr & getSkyCultureMgr()
Get the sky cultures manager.
QSettings * getSettings()
Return the main configuration options.
StelGuiBase * getGui() const
Get the GUI instance implementing the abstract GUI interface.
quint32 getDefaultFBO() const
Returns the default FBO handle, to be used when StelModule instances want to release their own FBOs...
void setFlagShowDecimalDegrees(bool b)
Set flag for showing decimal degree in various places.
Singleton main Stellarium application class.
StelProgressController * addProgressBar()
Add a progression indicator to the GUI (if applicable).
void aboutToQuit()
Called just before we exit Qt mainloop.
StelCore * getCore()
Get the core of the program.
StelLocaleMgr & getLocaleMgr()
Get the locale manager to use for i18n & date/time localization.
void init(QSettings *conf)
Initialize core and all the modules.
bool getVisionModeNight() const
Get flag for activating night vision mode.