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

ScreenImageMgr Class Reference

Module for managing images for scripting. More...

#include <ScreenImageMgr.hpp>

Inherits StelModule.

List of all members.

Public Slots

void createScreenImage (const QString &id, const QString &filename, float x, float y, float scale=1., bool visible=true, float alpha=1.0)
bool getShowImage (const QString &id)
void showImage (const QString &id, bool show)
void setImageXY (const QString &id, float x, float y, float duration=0.)
void deleteImage (const QString &id)
void deleteAllImages (void)
QStringList getAllImageIDs (void)


void requestCreateScreenImage (const QString &id, const QString &filename, float x, float y, float scale, bool visible, float alpha)
void requestSetImageShow (const QString &id, bool b)
void requestSetImageXY (const QString &id, float x, float y, float duration)
void requestDeleteImage (const QString &id)
void requestDeleteAllImages (void)

Public Member Functions

 ScreenImageMgr ()
virtual void init ()
virtual void draw (StelCore *core)
virtual void update (double deltaTime)
virtual double getCallOrder (StelModuleActionName actionName) const

Detailed Description

Module for managing images for scripting.

Images are identified by a string ID which is passed to ScreenImageMgr members when it is necessary to specify an image to work with. Member functions in this class which modify the state of the class are all mediated through the signal/slot mechanism to ensure such operations happen in the main thread where images are drawn, and not in the script thread.

Constructor & Destructor Documentation

ScreenImageMgr::ScreenImageMgr (  ) 

Construct a LabelMgr object.

Member Function Documentation

virtual void ScreenImageMgr::init (  )  [virtual]

Initialize itself.

If the initialization takes significant time, the progress should be displayed on the loading bar.

Implements StelModule.

virtual void ScreenImageMgr::draw ( StelCore core  )  [virtual]

Execute all the drawing functions for this module.

core the core to use for the drawing

Implements StelModule.

virtual void ScreenImageMgr::update ( double  deltaTime  )  [virtual]

Update time-dependent parts of the module.

Implements StelModule.

virtual double ScreenImageMgr::getCallOrder ( StelModuleActionName  actionName  )  const [virtual]

Defines the order in which the various modules are drawn.

Reimplemented from StelModule.

void ScreenImageMgr::createScreenImage ( const QString &  id,
const QString &  filename,
float  x,
float  y,
float  scale = 1.,
bool  visible = true,
float  alpha = 1.0 
) [slot]

Create an image from a file and display on the screen at x,y coordinates.

id the ID to use when referring to this image (an arbitrary string).
filename the partial path of the file to load. This will be searched for using StelFileMgr, with "scripts/" prefixed to the filename.
x The x-coordinate for the image
y The x-coordinate for the image
visible The initial visible state of the image
alpha The initial alpha (transparancy) value for the image (range 0.0 to 1.0)

bool ScreenImageMgr::getShowImage ( const QString &  id  )  [slot]

Find out if an image is currently visible.

id the ID for the desired image.

void ScreenImageMgr::showImage ( const QString &  id,
bool  show 
) [slot]

Set an image's visible status.

id the ID for the desired image.
show the new visible state to set.

void ScreenImageMgr::setImageXY ( const QString &  id,
float  x,
float  y,
float  duration = 0. 
) [slot]

Set the x and y coordinates for the specified image.

id the ID for the desired image.
x The new x-coordinate for the image.
y The new y-coordinate for the image.

void ScreenImageMgr::deleteImage ( const QString &  id  )  [slot]

Delete an image.

id the ID for the desired image.

void ScreenImageMgr::deleteAllImages ( void   )  [slot]

Delete all images currently managed by ScreenImageMgr.

QStringList ScreenImageMgr::getAllImageIDs ( void   )  [slot]

Get a list of currently loaded image IDs.

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