Reimplement a QGraphicsView for Stellarium.
More...
#include <StelMainView.hpp>
|
struct | GLInfo |
| Contains some basic info about the OpenGL context used. More...
|
|
|
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() More...
|
|
virtual void | resizeEvent (QResizeEvent *event) Q_DECL_OVERRIDE |
| Handle window resized events, and change the size of the underlying QGraphicsScene to be the same. More...
|
|
|
class | StelGuiItem |
|
class | StelRootItem |
|
class | StelGraphicsScene |
|
class | NightModeGraphicsEffect |
|
Reimplement a QGraphicsView for Stellarium.
It is the class creating the singleton GL Widget, the main StelApp instance as well as the main GUI.
Definition at line 43 of file StelMainView.hpp.
virtual void StelMainView::closeEvent |
( |
QCloseEvent * |
event | ) |
|
|
protectedvirtual |
void StelMainView::deinitGL |
( |
| ) |
|
Delete openGL textures (to call before the GLContext disappears)
void StelMainView::focusSky |
( |
| ) |
|
|
slot |
Return focus to the sky item. To be used when we close a dialog.
float StelMainView::getCursorTimeout |
( |
| ) |
const |
|
inlineslot |
bool StelMainView::getFlagCursorTimeout |
( |
| ) |
|
|
inlineslot |
Get the state of the mouse cursor timeout flag.
Definition at line 128 of file StelMainView.hpp.
bool StelMainView::getFlagInvertScreenShotColors |
( |
| ) |
const |
|
inlineslot |
Get whether colors are inverted when saving screenshot.
Definition at line 118 of file StelMainView.hpp.
bool StelMainView::getFlagOverwriteScreenShots |
( |
| ) |
const |
|
inlineslot |
Get whether existing files are overwritten when saving screenshot.
Definition at line 123 of file StelMainView.hpp.
GLInfo StelMainView::getGLInformation |
( |
| ) |
const |
|
inline |
Returns the information about the GL context, this does not require the context to be active.
Definition at line 97 of file StelMainView.hpp.
QGraphicsWidget* StelMainView::getGuiWidget |
( |
| ) |
const |
|
inline |
Return the parent gui widget, this should be used as parent to all the StelDialog instances.
Definition at line 81 of file StelMainView.hpp.
float StelMainView::getMaxFps |
( |
| ) |
|
|
inlineslot |
float StelMainView::getMinFps |
( |
| ) |
|
|
inlineslot |
QPoint StelMainView::getMousePos |
( |
| ) |
|
Return mouse position coordinates.
QOpenGLContext* StelMainView::glContext |
( |
| ) |
const |
void StelMainView::glContextDoneCurrent |
( |
| ) |
|
Releases the main GL context.
void StelMainView::glContextMakeCurrent |
( |
| ) |
|
Make the main GL context (the one returned from glContext()) current on the main view surface.
void StelMainView::init |
( |
| ) |
|
Start the main initialization of Stellarium.
void StelMainView::initTitleI18n |
( |
| ) |
|
Set the application title for the current language.
This is useful for e.g. chinese.
virtual void StelMainView::moveEvent |
( |
QMoveEvent * |
event | ) |
|
|
protectedvirtual |
Hack to determine current monitor pixel ratio.
bool StelMainView::needsMaxFPS |
( |
| ) |
const |
|
slot |
Determines if we should render as fast as possible, or limit the FPS.
This depends on the time the last user event happened.
virtual void StelMainView::resizeEvent |
( |
QResizeEvent * |
event | ) |
|
|
protectedvirtual |
Handle window resized events, and change the size of the underlying QGraphicsScene to be the same.
void StelMainView::saveScreenShot |
( |
const QString & |
filePrefix = "stellarium-" , |
|
|
const QString & |
saveDir = "" , |
|
|
const bool |
overwrite = false |
|
) |
| |
|
slot |
Save a screen shot.
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 |
emitted when saveScreenShot is requested with saveScreenShot().
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::setCursorTimeout |
( |
float |
t | ) |
|
|
inlineslot |
void StelMainView::setFlagCursorTimeout |
( |
bool |
b | ) |
|
|
inlineslot |
Get the state of the mouse cursor timeout flag.
Definition at line 132 of file StelMainView.hpp.
void StelMainView::setFlagInvertScreenShotColors |
( |
bool |
b | ) |
|
|
inlineslot |
Set whether colors should be inverted when saving screenshot.
Definition at line 120 of file StelMainView.hpp.
void StelMainView::setFlagOverwriteScreenShots |
( |
bool |
b | ) |
|
|
inlineslot |
Set whether existing files are overwritten when saving screenshot.
Definition at line 125 of file StelMainView.hpp.
void StelMainView::setFullScreen |
( |
bool |
| ) |
|
|
slot |
Set whether fullscreen is activated or not.
void StelMainView::setMaxFps |
( |
float |
m | ) |
|
|
inlineslot |
Set the maximum frames per second.
- Parameters
-
m | the new maximum fps setting. |
Definition at line 146 of file StelMainView.hpp.
void StelMainView::setMinFps |
( |
float |
m | ) |
|
|
inlineslot |
Set the minimum frames per second.
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. |
Definition at line 140 of file StelMainView.hpp.
void StelMainView::thereWasAnEvent |
( |
| ) |
|
|
slot |
Notify that an event was handled by the program and therefore the FPS should be maximized for a couple of seconds.
The documentation for this class was generated from the following file: