![]() |
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
Reimplement a QGraphicsView for Stellarium. More...
#include <StelMainGraphicsView.hpp>
Public Slots | |
void | saveScreenShot (const QString &filePrefix="stellarium-", const QString &saveDir="") |
bool | getFlagInvertScreenShotColors () const |
void | setFlagInvertScreenShotColors (bool b) |
bool | getFlagCursorTimeout () |
float | getCursorTimeout () const |
void | setFlagCursorTimeout (bool b) |
void | setCursorTimeout (float t) |
void | setMinFps (float m) |
float | getMinFps () |
void | setMaxFps (float m) |
float | getMaxFps () |
void | updateScene () |
Signals | |
void | screenshotRequested (void) |
Public Member Functions | |
StelMainGraphicsView (QWidget *parent) | |
void | init (class QSettings *conf) |
void | deinitGL () |
class StelAppGraphicsWidget * | getStelAppGraphicsWidget () |
QGraphicsWidget * | getTopLevelGraphicsWidget () |
StelMainScriptAPIProxy * | getMainScriptAPIProxy () |
StelScriptMgr & | getScriptMgr () |
Static Public Member Functions | |
static StelMainGraphicsView & | getInstance () |
Protected Member Functions | |
virtual void | resizeEvent (QResizeEvent *event) |
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 | drawBackground (QPainter *painter, const QRectF &rect) |
Reimplement a QGraphicsView for Stellarium.
It is the class creating the singleton GL Widget, the main StelApp instance as well as the main GUI.
virtual void StelMainGraphicsView::drawBackground | ( | QPainter * | painter, | |
const QRectF & | rect | |||
) | [protected, virtual] |
Update the mouse pointer state and schedule next redraw.
This method is called automatically by Qt.
class StelAppGraphicsWidget* StelMainGraphicsView::getStelAppGraphicsWidget | ( | ) | [inline] |
Return the QGraphicsWidget encapsulating the Stellarium main sky view.
Use its layout if you want to add widget on the top of the main sky view.
QGraphicsWidget* StelMainGraphicsView::getTopLevelGraphicsWidget | ( | ) | [inline] |
Return the top level QGraphicsWidget which contains the layout containing the Stellarium main sky view.
Use its layout if you want to add widget on the side of the main sky view.
void StelMainGraphicsView::saveScreenShot | ( | const QString & | filePrefix = "stellarium-" , |
|
const QString & | saveDir = "" | |||
) | [slot] |
Save a screen shot.
The format of the file, and hence the filename extension depends on the architecture and build type.
void StelMainGraphicsView::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 StelMainGraphicsView::setMaxFps | ( | float | m | ) | [inline, slot] |
Set the maximum frames per second.
m | the new maximum fps setting. |
void StelMainGraphicsView::setMinFps | ( | float | m | ) | [inline, slot] |
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.
m | the new minimum fps setting. |