Home · All Namespaces · All Classes · Functions · Coding Style · Plugins · File Structure

StelMainGraphicsView Class Reference

Reimplement a QGraphicsView for Stellarium. More...

#include <StelMainGraphicsView.hpp>

List of all members.

Public Slots

void saveScreenShot (const QString &filePrefix="stellarium-", const QString &saveDir="")
bool getFlagInvertScreenShotColors () const
void setFlagInvertScreenShotColors (bool b)


void screenshotRequested (void)

Public Member Functions

 StelMainGraphicsView (QWidget *parent, int argc, char **argv)
void init ()
QGLWidget * getOpenGLWin ()
void deinitGL ()
class QProgressBar * addProgressBar ()
void activateKeyActions (bool b)

Static Public Member Functions

static StelMainGraphicsViewgetInstance ()

Protected Member Functions

virtual void resizeEvent (QResizeEvent *event)

Detailed Description

Reimplement a QGraphicsView for Stellarium.

It is the class creating the singleton GL Widget, the main StelApp instance as well as the main GUI.

Member Function Documentation

void StelMainGraphicsView::init (  ) 

Start the main initialization of Stellarium.

static StelMainGraphicsView& StelMainGraphicsView::getInstance (  )  [inline, static]

Get the StelMainGraphicsView singleton instance.

QGLWidget* StelMainGraphicsView::getOpenGLWin (  )  [inline]

Get the main QGLWidget.

void StelMainGraphicsView::deinitGL (  ) 

Delete openGL textures (to call before the GLContext disappears).

class QProgressBar* StelMainGraphicsView::addProgressBar (  ) 

Add a new progress bar in the lower right corner of the screen.

When the progress bar is not used anymore, just delete it.

a pointer to the progress bar

void StelMainGraphicsView::activateKeyActions ( bool  b  ) 

Activate all the QActions associated to the widget.

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

bool StelMainGraphicsView::getFlagInvertScreenShotColors (  )  const [inline, slot]

Get whether colors are inverted when saving screenshot.

void StelMainGraphicsView::setFlagInvertScreenShotColors ( bool  b  )  [inline, slot]

Set whether colors should be inverted when saving screenshot.

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.

Generated on Mon Feb 2 17:23:48 2009 for Stellarium by  doxygen 1.5.5