Документ взят из кэша поисковой машины. Адрес оригинального документа : http://astro.uni-altai.ru/~aw/stellarium/api/classStelMainGraphicsView.html
Дата изменения: Unknown
Дата индексирования: Fri Feb 28 07:45:14 2014
Кодировка:

Поисковые слова: spitzer space telescope
Stellarium: StelMainGraphicsView Class Reference
Stellarium 0.12.3
List of all members | Public Slots | Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions
StelMainGraphicsView Class Reference

Reimplement a QGraphicsView for Stellarium. More...

#include <StelMainGraphicsView.hpp>

Public Slots

void saveScreenShot (const QString &filePrefix="stellarium-", const QString &saveDir="")
 Save a screen shot. More...
 
bool getFlagInvertScreenShotColors () const
 Get whether colors are inverted when saving screenshot. More...
 
void setFlagInvertScreenShotColors (bool b)
 Set whether colors should be inverted when saving screenshot. More...
 
bool getFlagCursorTimeout ()
 Get the state of the mouse cursor timeout flag. More...
 
float getCursorTimeout () const
 Get the mouse cursor timeout in seconds. More...
 
void setFlagCursorTimeout (bool b)
 Get the state of the mouse cursor timeout flag. More...
 
void setCursorTimeout (float t)
 Set the mouse cursor timeout in seconds. More...
 
void setMinFps (float m)
 Set the minimum frames per second. More...
 
float getMinFps ()
 Get the current minimum frames per second. More...
 
void setMaxFps (float m)
 Set the maximum frames per second. More...
 
float getMaxFps ()
 Get the current maximum frames per second. More...
 
void updateScene ()
 Updates the scene and process all events. More...
 

Signals

void screenshotRequested (void)
 emitted when saveScreenShot is requested with saveScreenShot(). More...
 

Public Member Functions

 StelMainGraphicsView (QWidget *parent)
 
void init (class QSettings *conf)
 Start the main initialization of Stellarium. More...
 
void deinit ()
 Delete textures (to call before the renderer disappears) More...
 
class StelAppGraphicsWidgetgetStelAppGraphicsWidget ()
 Return the QGraphicsWidget encapsulating the Stellarium main sky view. More...
 
QGraphicsWidget * getTopLevelGraphicsWidget ()
 Return the top level QGraphicsWidget which contains the layout containing the Stellarium main sky view. More...
 
StelMainScriptAPIProxygetMainScriptAPIProxy ()
 Get the script API proxy (for signal handling) More...
 
StelScriptMgrgetScriptMgr ()
 Get the script manager. More...
 

Static Public Member Functions

static StelMainGraphicsViewgetInstance ()
 Get the StelMainGraphicsView singleton instance. More...
 

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)
 Update the mouse pointer state and schedule next redraw. More...
 

Detailed Description

Reimplement a QGraphicsView for Stellarium.

It is the class creating the main StelApp instance as well as the main GUI.

Definition at line 37 of file StelMainGraphicsView.hpp.

Member Function Documentation

void StelMainGraphicsView::deinit ( )

Delete textures (to call before the renderer disappears)

virtual void StelMainGraphicsView::drawBackground ( QPainter *  painter,
const QRectF &  rect 
)
protectedvirtual

Update the mouse pointer state and schedule next redraw.

This method is called automatically by Qt.

float StelMainGraphicsView::getCursorTimeout ( ) const
inlineslot

Get the mouse cursor timeout in seconds.

Definition at line 88 of file StelMainGraphicsView.hpp.

bool StelMainGraphicsView::getFlagCursorTimeout ( )
inlineslot

Get the state of the mouse cursor timeout flag.

Definition at line 86 of file StelMainGraphicsView.hpp.

bool StelMainGraphicsView::getFlagInvertScreenShotColors ( ) const
inlineslot

Get whether colors are inverted when saving screenshot.

Definition at line 81 of file StelMainGraphicsView.hpp.

static StelMainGraphicsView& StelMainGraphicsView::getInstance ( )
inlinestatic

Get the StelMainGraphicsView singleton instance.

Definition at line 48 of file StelMainGraphicsView.hpp.

StelMainScriptAPIProxy* StelMainGraphicsView::getMainScriptAPIProxy ( )
inline

Get the script API proxy (for signal handling)

Definition at line 63 of file StelMainGraphicsView.hpp.

float StelMainGraphicsView::getMaxFps ( )
inlineslot

Get the current maximum frames per second.

Definition at line 105 of file StelMainGraphicsView.hpp.

float StelMainGraphicsView::getMinFps ( )
inlineslot

Get the current minimum frames per second.

Definition at line 100 of file StelMainGraphicsView.hpp.

StelScriptMgr& StelMainGraphicsView::getScriptMgr ( )
inline

Get the script manager.

Definition at line 65 of file StelMainGraphicsView.hpp.

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.

Definition at line 55 of file StelMainGraphicsView.hpp.

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.

Definition at line 59 of file StelMainGraphicsView.hpp.

void StelMainGraphicsView::init ( class QSettings *  conf)

Start the main initialization of Stellarium.

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.

  • filePrefix changes the beginning of the file name
  • shotDir changes the directory where the screenshot is saved If shotDir is "" then StelFileMgr::getScreenshotDir() will be used
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::setCursorTimeout ( float  t)
inlineslot

Set the mouse cursor timeout in seconds.

Definition at line 92 of file StelMainGraphicsView.hpp.

void StelMainGraphicsView::setFlagCursorTimeout ( bool  b)
inlineslot

Get the state of the mouse cursor timeout flag.

Definition at line 90 of file StelMainGraphicsView.hpp.

void StelMainGraphicsView::setFlagInvertScreenShotColors ( bool  b)
inlineslot

Set whether colors should be inverted when saving screenshot.

Definition at line 83 of file StelMainGraphicsView.hpp.

void StelMainGraphicsView::setMaxFps ( float  m)
inlineslot

Set the maximum frames per second.

Parameters
mthe new maximum fps setting.

Definition at line 103 of file StelMainGraphicsView.hpp.

void StelMainGraphicsView::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
mthe new minimum fps setting.

Definition at line 98 of file StelMainGraphicsView.hpp.

void StelMainGraphicsView::updateScene ( )
inlineslot

Updates the scene and process all events.

Definition at line 108 of file StelMainGraphicsView.hpp.


The documentation for this class was generated from the following file: