Reimplement a QGraphicsView for Stellarium.
More...
#include <StelMainView.hpp>
|
struct | GLInfo |
| Contains some basic info about the OpenGL context used. More...
|
|
|
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 | flagUseButtonsBackgroundChanged (bool b) |
|
void | flagCursorTimeoutChanged (bool b) |
|
void | cursorTimeoutChanged (double t) |
|
|
| 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 () |
| 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.
|
|
|
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)
|
|
|
bool | fullScreen |
|
bool | flagInvertScreenShotColors |
|
bool | flagOverwriteScreenshots |
|
bool | flagUseButtonsBackground |
|
bool | flagCursorTimeout |
|
double | cursorTimeout |
|
|
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 |
Data Fields |
QOpenGLFunctions * |
functions |
|
QOpenGLContext * |
mainContext |
|
QString |
renderer |
|
QString |
vendor |
|
QGraphicsWidget* StelMainView::getGuiWidget |
( |
| ) |
const |
|
inline |
QOpenGLContext* StelMainView::glContext |
( |
| ) |
const |
void StelMainView::initTitleI18n |
( |
| ) |
|
This is useful for e.g. chinese.
virtual void StelMainView::moveEvent |
( |
QMoveEvent * |
event | ) |
|
|
protectedvirtual |
bool StelMainView::needsMaxFPS |
( |
| ) |
const |
|
slot |
This depends on the time the last user event happened.
void StelMainView::saveScreenShot |
( |
const QString & |
filePrefix = "stellarium-" , |
|
|
const QString & |
saveDir = "" , |
|
|
const bool |
overwrite = false |
|
) |
| |
|
slot |
The format of the file, and hence the filename extension depends on the architecture and build type.
- filePrefix changes the beginning of the file name
- saveDir changes the directory where the screenshot is saved If saveDir is "" then StelFileMgr::getScreenshotDir() will be used
- overwrite if true,
- filePrefix is used as filename, and existing file will be overwritten.
void StelMainView::screenshotRequested |
( |
void |
| ) |
|
|
signal |
doScreenshot() does the actual work (it has to do it in the main thread, where as saveScreenShot() might get called from another one.
void StelMainView::setMaxFps |
( |
float |
m | ) |
|
|
inlineslot |
- Parameters
-
m | the new maximum fps setting. |
void StelMainView::setMinFps |
( |
float |
m | ) |
|
|
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.
- Parameters
-
m | the new minimum fps setting. |
void StelMainView::thereWasAnEvent |
( |
| ) |
|
|
slot |