Reimplement a QGraphicsView for Stellarium.
More...
#include <StelMainView.hpp>
|
| StelMainView (QWidget *parent=NULL) |
|
void | init (class QSettings *conf) |
| Start the main initialization of Stellarium. More...
|
|
void | deinit () |
|
void | initTitleI18n () |
| Set the application title for the current language. More...
|
|
void | deinitGL () |
| Delete openGL textures (to call before the GLContext disappears) More...
|
|
void | focusSky () |
| Return focus to the sky item. To be used when we close a dialog. More...
|
|
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. More...
|
|
|
virtual void | mouseMoveEvent (QMouseEvent *event) |
|
virtual void | mousePressEvent (QMouseEvent *event) |
|
virtual void | mouseReleaseEvent (QMouseEvent *event) |
|
virtual void | keyPressEvent (QKeyEvent *event) |
|
virtual void | keyReleaseEvent (QKeyEvent *event) |
|
virtual void | wheelEvent (QWheelEvent *wheelEvent) |
|
virtual void | moveEvent (QMoveEvent *event) |
|
virtual void | closeEvent (QCloseEvent *event) |
|
virtual void | resizeEvent (QResizeEvent *event) |
|
virtual void | drawBackground (QPainter *painter, const QRectF &rect) |
| Update the mouse pointer state and schedule next redraw. More...
|
|
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 49 of file StelMainView.hpp.
void StelMainView::deinitGL |
( |
| ) |
|
Delete openGL textures (to call before the GLContext disappears)
virtual void StelMainView::drawBackground |
( |
QPainter * |
painter, |
|
|
const QRectF & |
rect |
|
) |
| |
|
protectedvirtual |
Update the mouse pointer state and schedule next redraw.
This method is called automatically by Qt.
void StelMainView::focusSky |
( |
| ) |
|
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 107 of file StelMainView.hpp.
bool StelMainView::getFlagInvertScreenShotColors |
( |
| ) |
const |
|
inlineslot |
Get whether colors are inverted when saving screenshot.
Definition at line 97 of file StelMainView.hpp.
bool StelMainView::getFlagOverwriteScreenShots |
( |
| ) |
const |
|
inlineslot |
Get whether existing files are overwritten when saving screenshot.
Definition at line 102 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 77 of file StelMainView.hpp.
float StelMainView::getMaxFps |
( |
| ) |
|
|
inlineslot |
float StelMainView::getMinFps |
( |
| ) |
|
|
inlineslot |
QPoint StelMainView::getMousePos |
( |
| ) |
|
Return mouse position coordinates.
void StelMainView::init |
( |
class QSettings * |
conf | ) |
|
Start the main initialization of Stellarium.
void StelMainView::initTitleI18n |
( |
| ) |
|
Set the application title for the current language.
This is useful for e.g. chinese.
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 111 of file StelMainView.hpp.
void StelMainView::setFlagInvertScreenShotColors |
( |
bool |
b | ) |
|
|
inlineslot |
Set whether colors should be inverted when saving screenshot.
Definition at line 99 of file StelMainView.hpp.
void StelMainView::setFlagOverwriteScreenShots |
( |
bool |
b | ) |
|
|
inlineslot |
Set whether existing files are overwritten when saving screenshot.
Definition at line 104 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 124 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 119 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.
void StelMainView::updateScene |
( |
| ) |
|
|
slot |
Updates the scene and process all events.
The documentation for this class was generated from the following file: