forked from Stellarium/stellarium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainpage.doxygen
48 lines (41 loc) · 4.15 KB
/
mainpage.doxygen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* Stellarium
* Copyright (C) 2008 Matthew Gates
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/*!
@mainpage Stellarium Developers Documentation
@section intro_sec Introduction
This documentation concerns the inner workings of Stellarium. This documentation
is targetted at developers of scripts, plugins and the core program.
@section architecture_sec Program Architecture
The code of Stellarium is split into several main blocks:
<ul>
<li>the main loop and main window class StelMainView. This single-instance class is created at startup by the main() function. It hosts the main OpenGL viewport (based upon QGraphicsView) and manages StelApp and StelGui as subobjects. After initialization, it manages user's input event propagation and event loop.</li>
<li>the core which provides a number of generic services and features to the other components. The main class is the StelApp singleton class which is used everywhere in the code to access other elements. It is the StelApp instance which creates all the main core services and modules at initialization. Example services are OpenGL textures management with the StelTextureMgr, font management with the StelFontMgr, sky images management (images which have a fixed position in the sky) with the StelSkyImageMgr etc.. Two especially important manager classes (the ones with the "Mgr" suffix) are the StelModuleMgr and StelCore classes: the first one manages the collection of StelModule instances which are registered in the program (see next point for more info on what a StelModule is). The second one provides performance critical features for rendering various elements using openGL, or for computing coordinate transformation and other mathematical services.</li>
<li>a collection of StelModule instances which display the main elements of the program such as planets and stars. Each StelModule should be registered to the StelModuleMgr. Because many components of Stellarium derive from the StelModule class, it is possible for the main loop to treat them generically by calling their standard methods such StelModule::update() and StelModule::draw() at each program iteration. It also allows other program components to access them by name. StelProperty can be used to access all defined static properties (see the [Qt property system](https://doc.qt.io/qt-5/properties.html) for more information) of all registered StelModule instances. StelModule can also be loaded dynamically by Stellarium, which is the standard way of creating @ref plugins. StelAction instances can be used to define actions that can be triggered by the user through UI controls or key combinations.</li>
<li>the Graphical User Interface (StelGui). It is based on styled %Qt widgets which are rendered directly in the OpenGL window. Windows can be created using StelDialog subclasses. Users actions can trigger signals which are connected to core and StelModules slots. Many UI controls can also be directly connected to StelAction and/or StelProperty instances to reduce the amount of boilerplate code required to link UI changes to the back-end modules and vice-versa.</li>
<li>the script engine (StelScriptMgr) allows user scripts based on QtScript (a JavaScript dialect) to access properties and calls slots from the core and StelModule instances.</li>
</ul>
@htmlonly[block]
<div class="image">
<!-- allow SVG display for browsers that allow it -->
<object data="stellarium-architecture.svg" type="image/svg+xml">
<img src="stellarium-architecture.png" alt="Stellarium architecture" />
</object>
</div>
@endhtmlonly
*/