Manage the sky background images, including DSS and deep sky objects images.
More...
#include <StelSkyLayerMgr.hpp>
|
void | setFlagShow (bool b) |
| Set whether Sky Background should be displayed.
|
|
bool | loadSkyImage (const QString &id, const QString &filename, double long0, double lat0, double long1, double lat1, double long2, double lat2, double long3, double lat3, double minRes, double maxBright, bool visible, StelCore::FrameType frameType=StelCore::FrameJ2000) |
| Load an image from a file into a quad described with 4 corner coordinates. More...
|
|
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 into AzAltimuthal coordinates. More...
|
|
void | showLayer (const QString &id, bool b) |
| Decide to show or not to show a layer by its ID. More...
|
|
bool | getShowLayer (const QString &id) const |
| Get the current shown status of a specified image. More...
|
|
QString | insertSkyImage (const QString &uri, const QString &keyHint=QString(), bool show=true) |
| Add a new SkyImage from its URI (URL or local file name). More...
|
|
void | removeSkyLayer (const QString &key) |
| Remove a sky layer from the list. More...
|
|
QStringList | getAllKeys () const |
| Return the list of all the layer currently loaded.
|
|
|
void | flagShowChanged (bool b) |
|
|
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. More...
|
|
void | removeSkyLayer (StelSkyLayerP l) |
| Remove a layer.
|
|
QMap< QString, StelSkyLayerP > | getAllSkyLayers () const |
| Get the list of all the currently loaded layers.
|
|
StelSkyLayerP | getSkyLayer (const QString &key) const |
|
bool | getFlagShow () const |
| Get whether Sky Background should be displayed.
|
|
virtual void | deinit () |
| Called before the module will be delete, and before the openGL context is suppressed. More...
|
|
virtual QString | getModuleVersion () const |
| Get the version of the module, default is stellarium main version.
|
|
virtual QString | getAuthorName () const |
| Get the name of the module author.
|
|
virtual QString | getAuthorEmail () const |
| Get the email adress of the module author.
|
|
virtual void | handleMouseClicks (class QMouseEvent *) |
| Handle mouse clicks. More...
|
|
virtual void | handleMouseWheel (class QWheelEvent *) |
| Handle mouse wheel. More...
|
|
virtual bool | handleMouseMoves (int x, int y, Qt::MouseButtons b) |
| Handle mouse moves. More...
|
|
virtual void | handleKeys (class QKeyEvent *e) |
| Handle key events. More...
|
|
virtual bool | handlePinch (qreal scale, bool started) |
| Handle pinch gesture events. More...
|
|
virtual bool | configureGui (bool show=true) |
| Detect or show the configuration GUI elements for the module. More...
|
|
|
enum | StelModuleSelectAction { AddToSelection,
ReplaceSelection,
RemoveFromSelection
} |
| Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More...
|
|
enum | StelModuleActionName {
ActionDraw,
ActionUpdate,
ActionHandleMouseClicks,
ActionHandleMouseMoves,
ActionHandleKeys
} |
| Define the possible action for which an order is defined. More...
|
|
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
| convenience methods to add an action (call to slot) to the StelActionMgr object. More...
|
|
class StelAction * | addAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="") |
| convenience methods to add an action (call to own slot) to the StelActionMgr object. More...
|
|
Drawn after Milky Way, but before Zodiacal Light. It is not intended to be used to "overdraw" images into the foreground without a concept of surface magnitude.
◆ getShowLayer
bool StelSkyLayerMgr::getShowLayer |
( |
const QString & |
id | ) |
const |
|
slot |
- 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.
◆ insertSkyImage
QString StelSkyLayerMgr::insertSkyImage |
( |
const QString & |
uri, |
|
|
const QString & |
keyHint = QString() , |
|
|
bool |
show = true |
|
) |
| |
|
slot |
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.
◆ insertSkyLayer()
QString StelSkyLayerMgr::insertSkyLayer |
( |
StelSkyLayerP |
l, |
|
|
const QString & |
keyHint = QString() , |
|
|
bool |
show = true |
|
) |
| |
- 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.
◆ loadSkyImage
bool StelSkyLayerMgr::loadSkyImage |
( |
const QString & |
id, |
|
|
const QString & |
filename, |
|
|
double |
long0, |
|
|
double |
lat0, |
|
|
double |
long1, |
|
|
double |
lat1, |
|
|
double |
long2, |
|
|
double |
lat2, |
|
|
double |
long3, |
|
|
double |
lat3, |
|
|
double |
minRes, |
|
|
double |
maxBright, |
|
|
bool |
visible, |
|
|
StelCore::FrameType |
frameType = StelCore::FrameJ2000 |
|
) |
| |
|
slot |
The corners are always given in counterclockwise from top-left, also for azaltimuthal images. 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. |
lon0 | right ascension/longitude/azimuth of top-left corner 0 in degrees |
lat0 | declination/latitude/altitude of corner 0 in degrees |
lon1 | right ascension/longitude/azimuth of bottom-left corner 1 in degrees |
lat1 | declination/latitude/altitude of corner 1 in degrees |
lon2 | right ascension/longitude/azimuth of bottom-right corner 2 in degrees |
lat2 | declination/latitude/altitude of corner 2 in degrees |
lon3 | right ascension/longitude/azimuth of top-right corner 3 in degrees |
lat3 | declination/latitude/altitude 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 |
frameType | Coordinate frame type |
- Note
- Last argument has been added 2017-03. Use loadSkyImage(... , StelCore::FrameJ2000) for the previous behaviour!
-
For frameType=AzAlt, azimuth currently is counted from South towards East.
◆ loadSkyImageAltAz
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 |
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 |
- Deprecated:
- since 2017-03 (inconsistent parameter order)! Use loadSkyImage(...., StelCore::FrameAzAlt) instead!
◆ removeSkyLayer
void StelSkyLayerMgr::removeSkyLayer |
( |
const QString & |
key | ) |
|
|
slot |
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. |
◆ showLayer
void StelSkyLayerMgr::showLayer |
( |
const QString & |
id, |
|
|
bool |
b |
|
) |
| |
|
slot |
- 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.
|