Stellarium 0.11.4
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure

StelSkyLayerMgr Class Reference

Manage the sky background images, including DSS and deep sky objects images. More...

#include <StelSkyLayerMgr.hpp>

List of all members.

Classes

class  SkyLayerElem
 Store the informations needed for a graphical element layer.

Public Slots

void setFlagShow (bool b)
 Set whether Sky Background should be displayed.
bool getFlagShow () const
 Get whether Sky Background should be displayed.
bool loadSkyImage (const QString &id, const QString &filename, double ra0, double dec0, double ra1, double dec1, double ra2, double dec2, double ra3, double dec3, double minRes, double maxBright, bool visible)
 Load an image from a file.
bool loadSkyImageAltAz (const QString &id, const QString &filename, double alt0, double azi0, double alt1, double azi1, double alt2, double azi2, double alt3, double azi3, double minRes, double maxBright, bool visible)
 Load an image from a file.
void showLayer (const QString &id, bool b)
 Decide to show or not to show a layer by it's ID.
bool getShowLayer (const QString &id) const
 Get the current shown status of a specified image.
QString insertSkyImage (const QString &uri, const QString &keyHint=QString(), bool show=true)
 Add a new SkyImage from its URI (URL or local file name).
void removeSkyLayer (const QString &key)
 Remove a sky layer from the list.
QStringList getAllKeys () const
 Return the list of all the layer currently loaded.

Public Member Functions

virtual void init ()
 Initialize.
virtual void draw (StelCore *core)
 Draws sky background.
virtual void update (double)
 Update state which is time dependent.
virtual double getCallOrder (StelModuleActionName actionName) const
 Determines the order in which the various modules are drawn.
QString insertSkyLayer (StelSkyLayerP l, const QString &keyHint=QString(), bool show=true)
 Add a new layer.
void removeSkyLayer (StelSkyLayerP l)
 Remove a layer.
QMap< QString, StelSkyLayerPgetAllSkyLayers () const
 Get the list of all the currently loaded layers.
StelSkyLayerP getSkyLayer (const QString &key) const

Detailed Description

Manage the sky background images, including DSS and deep sky objects images.


Member Function Documentation

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

Draws sky background.

Reimplemented from StelModule.

QStringList StelSkyLayerMgr::getAllKeys (  )  const [inline, slot]

Return the list of all the layer currently loaded.

QMap<QString, StelSkyLayerP> StelSkyLayerMgr::getAllSkyLayers (  )  const

Get the list of all the currently loaded layers.

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

Determines the order in which the various modules are drawn.

Reimplemented from StelModule.

bool StelSkyLayerMgr::getFlagShow ( void   )  const [inline, slot]

Get whether Sky Background should be displayed.

bool StelSkyLayerMgr::getShowLayer ( const QString &  id  )  const [slot]

Get the current shown status of a specified image.

Parameters:
id the ID of the image whose status is desired.
Returns:
the current shown status of the specified image:
  • true means the specified image is currently shown.
  • false means the specified image is currently not shown.
virtual void StelSkyLayerMgr::init (  )  [virtual]

Initialize.

Implements StelModule.

QString StelSkyLayerMgr::insertSkyImage ( const QString &  uri,
const QString &  keyHint = QString(),
bool  show = true 
) [slot]

Add a new SkyImage from its URI (URL or local file name).

The image is owned by the manager and will be destroyed at the end of the program or when removeSkyImage is called with the same URI

Parameters:
uri the local file or the URL where the JSON image description is located.
keyHint a hint on which key to use for later referencing the image.
show defined whether the image should be shown by default.
Returns:
the reference key to use when accessing this image later on.
QString StelSkyLayerMgr::insertSkyLayer ( StelSkyLayerP  l,
const QString &  keyHint = QString(),
bool  show = true 
)

Add a new layer.

Parameters:
l the layer to insert.
keyHint a hint on which key to use for later referencing the image.
show defined whether the layer should be shown by default
Returns:
the reference key to use when accessing this layer later on.
bool StelSkyLayerMgr::loadSkyImage ( const QString &  id,
const QString &  filename,
double  ra0,
double  dec0,
double  ra1,
double  dec1,
double  ra2,
double  dec2,
double  ra3,
double  dec3,
double  minRes,
double  maxBright,
bool  visible 
) [slot]

Load an image from a file.

This should not be called directly from scripts because it is not thread safe. Instead use the simiarly named function in the core scripting object.

Parameters:
id a string identifier for the image
filename the name of the image file to load. Will be searched for using StelFileMgr, so partial names are fine.
ra0 right ascention of corner 0 in degrees
dec0 declenation of corner 0 in degrees
ra1 right ascention of corner 1 in degrees
dec1 declenation of corner 1 in degrees
ra2 right ascention of corner 2 in degrees
dec2 declenation of corner 2 in degrees
ra3 right ascention of corner 3 in degrees
dec3 declenation of corner 3 in degrees
minRes the minimum resolution setting for the image
maxBright the maximum brightness setting for the image
visible initial visibility setting
bool StelSkyLayerMgr::loadSkyImageAltAz ( const QString &  id,
const QString &  filename,
double  alt0,
double  azi0,
double  alt1,
double  azi1,
double  alt2,
double  azi2,
double  alt3,
double  azi3,
double  minRes,
double  maxBright,
bool  visible 
) [slot]

Load an image from a file.

This should not be called directly from scripts because it is not thread safe. Instead use the similarly named function in the core scripting object.

Parameters:
id a string identifier for the image
filename the name of the image file to load. Will be searched for using StelFileMgr, so partial names are fine.
alt0 altitude angle of corner 0 in degrees
azi0 azimuth angle of corner 0 in degrees
alt1 altitude angle of corner 1 in degrees
azi1 azimuth angle of corner 1 in degrees
alt2 altitude angle of corner 2 in degrees
azi2 azimuth angle of corner 2 in degrees
alt3 altitude angle of corner 3 in degrees
azi3 azimuth angle of corner 3 in degrees
minRes the minimum resolution setting for the image
maxBright the maximum brightness setting for the image
visible initial visibility setting
void StelSkyLayerMgr::removeSkyLayer ( const QString &  key  )  [slot]

Remove a sky layer from the list.

Note: this is not thread safe, and so should not be used directly from scripts - use the similarly named function in the core scripting API object to delete SkyLayers.

Parameters:
key the reference key (id) generated by insertSkyImage.
void StelSkyLayerMgr::removeSkyLayer ( StelSkyLayerP  l  ) 

Remove a layer.

void StelSkyLayerMgr::setFlagShow ( bool  b  )  [inline, slot]

Set whether Sky Background should be displayed.

void StelSkyLayerMgr::showLayer ( const QString &  id,
bool  b 
) [slot]

Decide to show or not to show a layer by it's ID.

Parameters:
id the id of the layer whose status is to be changed.
b the new shown value:

  • true means the specified image will be shown.
  • false means the specified image will not be shown.
virtual void StelSkyLayerMgr::update ( double   )  [inline, virtual]

Update state which is time dependent.

Implements StelModule.

Generated on Sat Aug 25 22:13:33 2012 for Stellarium by  doxygen 1.6.3