![]() |
Stellarium
0.19.3
|
Reimplement a QGraphicsView for Stellarium. More...
#include <StelMainView.hpp>
Data Structures | |
| struct | GLInfo |
| Contains some basic info about the OpenGL context used. More... | |
Public Slots | |
| void | setFullScreen (bool) |
| Set whether fullscreen is activated or not. | |
| void | focusSky () |
| Return focus to the sky item. To be used when we close a dialog. | |
| void | saveScreenShot (const QString &filePrefix="stellarium-", const QString &saveDir="", const bool overwrite=false) |
| Save a screen shot. More... | |
| void | setScreenshotFormat (const QString filetype) |
| QString | getScreenshotFormat () const |
| bool | getFlagInvertScreenShotColors () const |
| Get whether colors are inverted when saving screenshot. | |
| void | setFlagInvertScreenShotColors (bool b) |
| Set whether colors should be inverted when saving screenshot. | |
| bool | getFlagOverwriteScreenShots () const |
| Get whether existing files are overwritten when saving screenshot. | |
| void | setFlagOverwriteScreenShots (bool b) |
| Set whether existing files are overwritten when saving screenshot. | |
| bool | getFlagUseCustomScreenshotSize () const |
| Get whether custom size should be used for screenshots. | |
| void | setFlagUseCustomScreenshotSize (bool b) |
| Set whether custom size should be used for screenshots. | |
| int | getCustomScreenshotWidth () const |
| Get custom screenshot width. | |
| void | setCustomScreenshotWidth (int width) |
| Set whether custom size should be used for screenshots. | |
| int | getCustomScreenshotHeight () const |
| Get custom screenshot height. | |
| void | setCustomScreenshotHeight (int height) |
| Set whether custom size should be used for screenshots. | |
| float | getCustomScreenshotMagnification () const |
| Get screenshot magnification. More... | |
| bool | getFlagCursorTimeout () const |
| Get the state of the mouse cursor timeout flag. | |
| void | setFlagCursorTimeout (bool b) |
| Get the state of the mouse cursor timeout flag. | |
| double | getCursorTimeout () const |
| Get the mouse cursor timeout in seconds. | |
| void | setCursorTimeout (double t) |
| Set the mouse cursor timeout in seconds. | |
| void | setMinFps (float m) |
| Set the minimum frames per second. More... | |
| float | getMinFps () const |
| Get the current minimum frames per second. | |
| void | setMaxFps (float m) |
| Set the maximum frames per second. More... | |
| float | getMaxFps () const |
| Get the current maximum frames per second. | |
| void | thereWasAnEvent () |
| Notify that an event was handled by the program and therefore the FPS should be maximized for a couple of seconds. More... | |
| bool | needsMaxFPS () const |
| Determines if we should render as fast as possible, or limit the FPS. More... | |
| void | setSkyBackgroundColor (Vec3f color) |
| Set the sky background color. (Actually forwards to the StelRootItem.) Everything else than black creates a work of art! | |
| Vec3f | getSkyBackgroundColor () const |
| Get the sky background color. (Actually retrieves from the StelRootItem.) Everything else than black creates a work of art! | |
Signals | |
| void | screenshotRequested (void) |
| emitted when saveScreenShot is requested with saveScreenShot(). More... | |
| void | fullScreenChanged (bool b) |
| void | reloadShadersRequested () |
| Emitted when the "Reload shaders" action is perfomed Interested objects should subscribe to this signal and reload their shaders when this is emitted. | |
| void | updateIconsRequested () |
| void | flagInvertScreenShotColorsChanged (bool b) |
| void | flagOverwriteScreenshotsChanged (bool b) |
| void | flagUseCustomScreenshotSizeChanged (bool use) |
| void | customScreenshotWidthChanged (int width) |
| void | customScreenshotHeightChanged (int height) |
| void | screenshotFormatChanged (QString format) |
| void | skyBackgroundColorChanged (Vec3f color) |
| void | flagCursorTimeoutChanged (bool b) |
| void | cursorTimeoutChanged (double t) |
Public Member Functions | |
| StelMainView (QSettings *settings) | |
| void | init () |
| Start the main initialization of Stellarium. | |
| void | deinit () |
| void | initTitleI18n () |
| Set the application title for the current language. More... | |
| void | deinitGL () |
| Delete openGL textures (to call before the GLContext disappears) | |
| QGraphicsWidget * | getGuiWidget () const |
| Return the parent gui widget, this should be used as parent to all the StelDialog instances. More... | |
| QPoint | getMousePos () const |
| Return mouse position coordinates. | |
| QOpenGLContext * | glContext () const |
| Returns the main application OpenGL context, which should be used for all drawing Stellarium does. More... | |
| void | glContextMakeCurrent () |
| Make the main GL context (the one returned from glContext()) current on the main view surface. | |
| void | glContextDoneCurrent () |
| Releases the main GL context. | |
| GLInfo | getGLInformation () const |
| Returns the information about the GL context, this does not require the context to be active. | |
Static Public Member Functions | |
| static StelMainView & | getInstance () |
| Get the StelMainView singleton instance. | |
Protected Member Functions | |
| virtual void | moveEvent (QMoveEvent *event) Q_DECL_OVERRIDE |
| Hack to determine current monitor pixel ratio. More... | |
| virtual void | closeEvent (QCloseEvent *event) Q_DECL_OVERRIDE |
| Handle window closed event, calling StelApp::quit() | |
| virtual void | resizeEvent (QResizeEvent *event) Q_DECL_OVERRIDE |
| Handle window resized events, and change the size of the underlying QGraphicsScene to be the same. | |
| virtual void | mouseMoveEvent (QMouseEvent *event) Q_DECL_OVERRIDE |
| Wake up mouse cursor (if it was hidden) | |
Properties | |
| bool | fullScreen |
| bool | flagInvertScreenShotColors |
| bool | flagOverwriteScreenshots |
| bool | flagUseCustomScreenshotSize |
| if set to true, screenshot is named exactly screenShotPrefix.png and overwrites existing file | |
| int | customScreenshotWidth |
| if true, the next 2 values are observed for screenshots. | |
| int | customScreenshotHeight |
| used when flagCustomResolutionScreenshots==true | |
| QString | screenShotFormat |
| bool | flagCursorTimeout |
| double | cursorTimeout |
| Vec3f | skyBackgroundColor |
Friends | |
| class | StelGuiItem |
| class | StelRootItem |
| class | StelGraphicsScene |
| class | NightModeGraphicsEffect |
It is the class creating the singleton GL Widget, the main StelApp instance as well as the main GUI.
| struct StelMainView::GLInfo |
|
inlineslot |
This should be used by StarMgr, text drawing and other elements which may want to enlarge their output in screenshots to keep them visible.
|
inline |
| QOpenGLContext* StelMainView::glContext | ( | ) | const |
| void StelMainView::initTitleI18n | ( | ) |
This is useful for e.g. chinese.
|
protectedvirtual |
|
slot |
This depends on the time the last user event happened.
|
slot |
The format of the file, and hence the filename extension depends on the architecture and build type.
|
signal |
doScreenshot() does the actual work (it has to do it in the main thread, where as saveScreenShot() might get called from another one.
|
inlineslot |
| m | the new maximum fps setting. |
|
inlineslot |
Usually this minimum will be switched to after there are no user events for some seconds to save power. However, if can be useful to set this to a high value to improve playing smoothness in scripts.
| m | the new minimum fps setting. |
|
slot |
|
slot |
1.8.13