StelMainScriptAPI.hpp   StelMainScriptAPI.hpp 
skipping to change at line 26 skipping to change at line 26
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _STELMAINSCRIPTAPI_HPP_ #ifndef _STELMAINSCRIPTAPI_HPP_
#define _STELMAINSCRIPTAPI_HPP_ #define _STELMAINSCRIPTAPI_HPP_
#include <QObject> #include <QObject>
#include <QVariant> #include <QVariant>
#include <QStringList> #include <QStringList>
#include "StelObject.hpp"
#include "StelCore.hpp"
class QScriptEngine; class QScriptEngine;
//! Provide script API for Stellarium global functions. Public slots in th is class //! Provide script API for Stellarium global functions. Public slots in th is class
//! may be used in Stellarium scripts, and are accessed as member function to the //! may be used in Stellarium scripts, and are accessed as member function to the
//! "core" scripting object. Module-specific functions, such as setting an d clearing //! "core" scripting object. Module-specific functions, such as setting an d clearing
//! of display flags (e.g. LandscapeMgr::setFlagAtmosphere) can be accessed directly //! of display flags (e.g. LandscapeMgr::setFlagAtmosphere) can be accessed directly
//! via the scripting object with the class name, e.g. by using the script ing command: //! via the scripting object with the class name, e.g. by using the script ing command:
//! LandscapeMgr.setFlagAtmosphere(true); //! LandscapeMgr.setFlagAtmosphere(true);
class StelMainScriptAPI : public QObject class StelMainScriptAPI : public QObject
skipping to change at line 145 skipping to change at line 147
//! Select an object by name //! Select an object by name
//! @param name the name of the object to select (english) //! @param name the name of the object to select (english)
//! If the name is "", any currently selected objects will be //! If the name is "", any currently selected objects will be
//! de-selected. //! de-selected.
//! @param pointer whether or not to have the selection pointer enab led //! @param pointer whether or not to have the selection pointer enab led
void selectObjectByName(const QString& name, bool pointer=false); void selectObjectByName(const QString& name, bool pointer=false);
//! Fetch a map with data about an object's position, magnitude and so on //! Fetch a map with data about an object's position, magnitude and so on
//! @param name is the English name of the object for which data wil l be //! @param name is the English name of the object for which data wil l be
//! returned. //! returned.
//! @return a map of object data. Keys: //! @return a map of object data, exactly like getObjectInfo().
//! - altitude : apparent altitude angle in decimal degrees
//! - azimuth : apparent azimuth angle in decimal degrees
//! - altitude-geometric : geometric altitude angle in decimal degre
es
//! - azimuth-geometric : geometric azimuth angle in decimal degrees
//! - ra : right ascension angle (current date frame) in decimal deg
rees
//! - dec : declination angle in (current date frame) decimal degree
s
//! - raJ2000 : right ascension angle (J2000 frame) in decimal degre
es
//! - decJ2000 : declination angle in (J2000 frame) decimal degrees
//! @deprecated Use getObjectInfo() //! @deprecated Use getObjectInfo()
QVariantMap getObjectPosition(const QString& name); QVariantMap getObjectPosition(const QString& name);
//! Fetch a map with data about an object's position, magnitude and so on //! Fetch a map with data about an object's position, magnitude and so on
//! @param name is the English name of the object for which data wil l be //! @param name is the English name of the object for which data wil l be
//! returned. //! returned.
//! @return a map of object data. Keys: //! @return a map of object data. Keys:
//! - altitude : apparent altitude angle in decimal degrees //! - altitude : apparent altitude angle in decimal degrees
//! - azimuth : apparent azimuth angle in decimal degrees //! - azimuth : apparent azimuth angle in decimal degrees
//! - altitude-geometric : geometric altitude angle in decimal degre es //! - altitude-geometric : geometric altitude angle in decimal degre es
skipping to change at line 184 skipping to change at line 178
//! - elat : ecliptic latitude in decimal degrees (on Earth only!) //! - elat : ecliptic latitude in decimal degrees (on Earth only!)
//! - elongJ2000 : ecliptic longitude (Earth's J2000 frame) in decim al degrees //! - elongJ2000 : ecliptic longitude (Earth's J2000 frame) in decim al degrees
//! - elatJ2000 : ecliptic latitude (Earth's J2000 frame) in decimal degrees //! - elatJ2000 : ecliptic latitude (Earth's J2000 frame) in decimal degrees
//! - vmag : visual magnitude //! - vmag : visual magnitude
//! - vmage : visual magnitude (extincted) //! - vmage : visual magnitude (extincted)
//! - size: angular size in radians //! - size: angular size in radians
//! - size-dd : angular size in decimal degrees //! - size-dd : angular size in decimal degrees
//! - size-deg : angular size in decimal degrees (formatted string) //! - size-deg : angular size in decimal degrees (formatted string)
//! - size-dms : angular size in DMS format //! - size-dms : angular size in DMS format
//! - localized-name : localized name //! - localized-name : localized name
//! The returned map can contain other information. For example, Sol ar System objects add:
//! - distance : distance to object in AU (for Solar system objects only!) //! - distance : distance to object in AU (for Solar system objects only!)
//! - phase : phase of object (for Solar system objects only!) //! - phase : phase (illuminated fraction, 0..1) of object (for Sola
//! - illumination : phase of object in percentages (for Solar syste r system objects only!)
m objects only!) //! - illumination : phase of object in percent (0..100) (for Solar
system objects only!)
//! - phase-angle : phase angle of object in radians (for Solar syst em objects only!) //! - phase-angle : phase angle of object in radians (for Solar syst em objects only!)
//! - phase-angle-dms : phase angle of object in DMS (for Solar syst em objects only!) //! - phase-angle-dms : phase angle of object in DMS (for Solar syst em objects only!)
//! - phase-angle-deg : phase angle of object in decimal degrees (fo r Solar system objects only!) //! - phase-angle-deg : phase angle of object in decimal degrees (fo r Solar system objects only!)
//! - elongation : elongation of object in radians (for Solar system objects only!) //! - elongation : elongation of object in radians (for Solar system objects only!)
//! - elongation-dms : elongation of object in DMS (for Solar system objects only!) //! - elongation-dms : elongation of object in DMS (for Solar system objects only!)
//! - elongation-deg : elongation of object in decimal degrees (for Solar system objects only!) //! - elongation-deg : elongation of object in decimal degrees (for Solar system objects only!)
//! - ptype : object type (for Solar system objects only!) //! Other StelObject derivates, also those defined in plugins, may a
dd more,
//! these fields are documented in the respective classes, or simply
try what you get:
//! You can print a complete set of entries into output with the fol
lowing commands:
//! @code
//! map=core.getSelectedObjectInfo();
//! core.output(core.mapToString(map));
//! @endcode
QVariantMap getObjectInfo(const QString& name); QVariantMap getObjectInfo(const QString& name);
//! Fetch a map with data about an latest selected object's position //! Fetch a map with data about the latest selected object's positio
, magnitude and so on n, magnitude and so on
//! @return a map of object data. Keys: //! @return a map of object data. See description for getObjectInfo
//! - altitude : apparent altitude angle in decimal degrees (const QString& name);
//! - azimuth : apparent azimuth angle in decimal degrees
//! - altitude-geometric : geometric altitude angle in decimal degre
es
//! - azimuth-geometric : geometric azimuth angle in decimal degrees
//! - ra : right ascension angle (current date frame) in decimal deg
rees
//! - dec : declination angle in (current date frame) decimal degree
s
//! - raJ2000 : right ascension angle (J2000 frame) in decimal degre
es
//! - decJ2000 : declination angle in (J2000 frame) decimal degrees
//! - glong : galactic longitude in decimal degrees
//! - glat : galactic latitude in decimal degrees
//! - sglong : supergalactic longitude in decimal degrees
//! - sglat : supergalactic latitude in decimal degrees
//! - elong : ecliptic longitude in decimal degrees (on Earth only!)
//! - elat : ecliptic latitude in decimal degrees (on Earth only!)
//! - elongJ2000 : ecliptic longitude (Earth's J2000 frame) in decim
al degrees
//! - elatJ2000 : ecliptic latitude (Earth's J2000 frame) in decimal
degrees
//! - vmag : visual magnitude
//! - vmage : visual magnitude (extincted)
//! - size: angular size in radians
//! - size-dd : angular size in decimal degrees
//! - size-deg : angular size in decimal degrees (formatted string)
//! - size-dms : angular size in DMS format
//! - name : english name
//! - localized-name : localized name
//! - distance : distance to object in AU (for Solar system objects
only!)
//! - phase : phase of object (for Solar system objects only!)
//! - illumination : phase of object in percentages (for Solar syste
m objects only!)
//! - phase-angle : phase angle of object in radians (for Solar syst
em objects only!)
//! - phase-angle-dms : phase angle of object in DMS (for Solar syst
em objects only!)
//! - phase-angle-deg : phase angle of object in decimal degrees (fo
r Solar system objects only!)
//! - elongation : elongation of object in radians (for Solar system
objects only!)
//! - elongation-dms : elongation of object in DMS (for Solar system
objects only!)
//! - elongation-deg : elongation of object in decimal degrees (for
Solar system objects only!)
//! - ptype : object type (for Solar system objects only!)
QVariantMap getSelectedObjectInfo(); QVariantMap getSelectedObjectInfo();
//! Clear the display options, setting a "standard" view. //! Clear the display options, setting a "standard" view.
//! Preset states: //! Preset states:
//! - natural : azimuthal mount, atmosphere, landscape, //! - natural : azimuthal mount, atmosphere, landscape,
//! no lines, labels or markers //! no lines, labels or markers
//! - starchart : equatorial mount, constellation lines, //! - starchart : equatorial mount, constellation lines,
//! no landscape, atmosphere etc. labels & markers on. //! no landscape, atmosphere etc. labels & markers on.
//! - deepspace : like starchart, but no planets, no eq.grid, no mar kers, no lines. //! - deepspace : like starchart, but no planets, no eq.grid, no mar kers, no lines.
//! - galactic : like deepspace, but in galactic coordinate system. //! - galactic : like deepspace, but in galactic coordinate system.
skipping to change at line 425 skipping to change at line 392
void setSphericMirror(bool b); void setSphericMirror(bool b);
//! Set viewport offset //! Set viewport offset
//! This can be used e.g. in wide cylindrical panorama screens to pu sh the horizon down and see more of the sky. //! This can be used e.g. in wide cylindrical panorama screens to pu sh the horizon down and see more of the sky.
//! @param x -0.5...0.5 horizontal offset. This is not available in the GUI, and it is recommended to keep it at 0. //! @param x -0.5...0.5 horizontal offset. This is not available in the GUI, and it is recommended to keep it at 0.
//! @param y -0.5...0.5 vertical offset. This is available in the GU I. //! @param y -0.5...0.5 vertical offset. This is available in the GU I.
//! @deprecated Use StelMovementMgr::moveViewport instead //! @deprecated Use StelMovementMgr::moveViewport instead
void setViewportOffset(const float x, const float y); void setViewportOffset(const float x, const float y);
//! Set a lateral width distortion. Use this e.g. in startup.ssc. //! Set a lateral width distortion. Use this e.g. in startup.ssc.
//! Implemented for 0.15 for a setup with 5 beamers with edge blendi ng. The 9600x1200 get squeezed somewhat which looks a bit odd. Use this str etch to compensate. //! Implemented for 0.15 for a setup with 5 projectors with edge ble nding. The 9600x1200 get squeezed somewhat which looks a bit odd. Use this stretch to compensate.
//! Experimental! To avoid overuse, there is currently no config.ini setting available. //! Experimental! To avoid overuse, there is currently no config.ini setting available.
//! @note Currently only the projected content is affected. ScreenIm age, ScreenLabel is not stretched. //! @note Currently only the projected content is affected. ScreenIm age, ScreenLabel is not stretched.
void setViewportStretch(const float stretch); void setViewportStretch(const float stretch);
//! Get a list of Sky Culture IDs //! Get a list of Sky Culture IDs
//! @return a list of valid sky culture IDs //! @return a list of valid sky culture IDs
QStringList getAllSkyCultureIDs(); QStringList getAllSkyCultureIDs();
//! Find out the current sky culture //! Find out the current sky culture
//! @return the ID of the current sky culture (i.e. the name of the directory in //! @return the ID of the current sky culture (i.e. the name of the directory in
skipping to change at line 459 skipping to change at line 426
QString getSkyCultureNameI18n(); QString getSkyCultureNameI18n();
//! Get the current status of the gravity labels option //! Get the current status of the gravity labels option
//! @return true if gravity labels are enabled, else false //! @return true if gravity labels are enabled, else false
bool getFlagGravityLabels(); bool getFlagGravityLabels();
//! Turn on/off gravity labels //! Turn on/off gravity labels
//! @param b if true, turn on gravity labels, else turn them off //! @param b if true, turn on gravity labels, else turn them off
void setFlagGravityLabels(bool b); void setFlagGravityLabels(bool b);
//! Load an image which will have sky coordinates. //! Load an image into the sky background at the given sky coordinat
es and be warped with the sky.
//! The image is projected like a deep-sky object, with a notion for
surface magnitude of the brightest parts.
//! Transparent sections in the image are possibly rendered white, s
o make your image just RGB with black background.
//! The black background covers the milky way, but is brightened by
the Zodiacal light.
//! @todo allow alpha in images?
//! @param id a string ID to be used when referring to this //! @param id a string ID to be used when referring to this
//! image (e.g. when changing the displayed status or deleting //! image (e.g. when changing the displayed status or deleting it.
//! it.
//! @param filename the file name of the image. If a relative //! @param filename the file name of the image. If a relative
//! path is specified, "scripts/" will be prefixed before the //! path is specified, "scripts/" will be prefixed before the
//! image is searched for using StelFileMgr. //! image is searched for using StelFileMgr.
//! @param ra0 The right ascension of the first corner of the image //! @param lon0 The right ascension/longitude/azimuth of the first c
in degrees (J2000.0) orner of the image in degrees (bottom left)
//! @param dec0 The declination of the first corner of the image in //! @param lat0 The declination/latitude/altitude of the first corne
degrees (J2000.0) r of the image in degrees (bottom left)
//! @param ra1 The right ascension of the second corner of the image //! @param lon1 The right ascension/longitude/azimuth of the second
in degrees (J2000.0) corner of the image in degrees (bottom right)
//! @param dec1 The declination of the second corner of the image in //! @param lat1 The declination/latitude/altitude of the second corn
degrees (J2000.0) er of the image in degrees (bottom right)
//! @param ra2 The right ascension of the third corner of the image //! @param lon2 The right ascension/longitude/azimuth of the third c
in degrees (J2000.0) orner of the image in degrees (top right)
//! @param dec2 The declination of the third corner of the image in //! @param lat2 The declination/latitude/altitude of the third corne
degrees (J2000.0) r of the image in degrees (top right)
//! @param ra3 The right ascension of the fourth corner of the image //! @param lon3 The right ascension/longitude/azimuth of the fourth
in degrees (J2000.0) corner of the image in degrees (top left)
//! @param dec3 The declination of the fourth corner of the image in //! @param lat3 The declination/latitude/altitude of the fourth corn
degrees (J2000.0) er of the image in degrees (top left)
//! @param minRes The minimum resolution setting for the image //! @param minRes The minimum resolution setting for the image
//! @param maxBright The maximum brightness setting for the image //! @param maxBright The maximum brightness setting for the image
//! @param visible The initial visibility of the image //! @param visible The initial visibility of the image
//! @param frame one of EqJ2000|EqDate|EclJ2000|EclDate|Gal(actic)|S
uperG(alactic)|AzAlt.
//! @note since 2017-03, you can select Frame now.
//! @note Images in AzAlt frame are not affected by atmosphere effec
ts like refraction or extinction.
void loadSkyImage(const QString& id, const QString& filename, void loadSkyImage(const QString& id, const QString& filename,
double ra0, double dec0, double lon0, double lat0,
double ra1, double dec1, double lon1, double lat1,
double ra2, double dec2, double lon2, double lat2,
double ra3, double dec3, double lon3, double lat3,
double minRes=2.5, double maxBrigh double minRes=2.5, double maxBrigh
t=14, bool visible=true); t=14, bool visible=true, const QString &frame="EqJ2000");
//! Convenience function which allows the user to provide RA and DEC //! Convenience function which allows the user to provide longitudin
angles al and latitudinal angles (RA/Dec or Long/Lat or Az/Alt)
//! as strings (e.g. "12d 14m 8s" or "5h 26m 8s" - formats accepted //! as strings (e.g. "12d 14m 8s" or "5h 26m 8s" - formats accepted
by by StelUtils::getDecAngle()).
//! StelUtils::getDecAngle()).
void loadSkyImage(const QString& id, const QString& filename, void loadSkyImage(const QString& id, const QString& filename,
const QString& ra0, const QString& const QString& lon0, const QString
dec0, & lat0,
const QString& ra1, const QString& const QString& lon1, const QString
dec1, & lat1,
const QString& ra2, const QString& const QString& lon2, const QString
dec2, & lat2,
const QString& ra3, const QString& const QString& lon3, const QString
dec3, & lat3,
double minRes=2.5, double maxBrigh double minRes=2.5, double maxBrigh
t=14, bool visible=true); t=14, bool visible=true, const QString& frame="EqJ2000");
//! Convenience function which allows loading of a sky image based o //! Convenience function which allows loading of a (square) sky imag
n a e based on a
//! central coordinate, angular size and rotation. //! central coordinate, angular size and rotation. Note that the edg
es will not be aligned with edges at center plus/minus size!
//! @param id a string ID to be used when referring to this //! @param id a string ID to be used when referring to this
//! image (e.g. when changing the displayed status or deleting it. //! image (e.g. when changing the displayed status or deleting it.
//! @param filename the file name of the image. If a relative //! @param filename the file name of the image. If a relative
//! path is specified, "scripts/" will be prefixed before the //! path is specified, "scripts/" will be prefixed before the
//! image is searched for using StelFileMgr. //! image is searched for using StelFileMgr.
//! @param ra The right ascension of the center of the image in J200 //! @param lon The right ascension/longitude/azimuth of the center o
0 frame degrees f the image in frame degrees
//! @param dec The declination of the center of the image in J2000 f //! @param lat The declination/latitude/altitude of the center of th
rame degrees e image in frame degrees
//! @param angSize The angular size of the image in arc minutes //! @param angSize The angular size of the image in arc minutes
//! @param rotation The clockwise rotation angle of the image in deg //! @param rotation The clockwise rotation angle of the image in deg
rees rees. Use 0 for an image with top=north. (New from 2017 -- This used to be
//! @param minRes The minimum resolution setting for the image 90!)
//! @param maxBright The maximum brightness setting for the image //! @param minRes The minimum resolution setting for the image. UNCL
EAR, using 2.5 seems to work well.
//! @param maxBright The maximum brightness setting for the image, V
mag/arcmin^2. Use this to blend the brightest possible pixels with DSO. mag
15 or brighter seems ok.
//! @param visible The initial visibility of the image //! @param visible The initial visibility of the image
//! @param frame one of EqJ2000|EqDate|EclJ2000|EclDate|Gal(actic)|S
uperG(alactic)|AzAlt.
//! @note since 2017-03, you can select Frame now.
//! @note Images in AzAlt frame are not affected by atmosphere effec
ts like refraction or extinction.
void loadSkyImage(const QString& id, const QString& filename, void loadSkyImage(const QString& id, const QString& filename,
double ra, double dec, double angS double lon, double lat, double ang
ize, double rotation, Size, double rotation,
double minRes=2.5, double maxBrigh double minRes=2.5, double maxBrigh
t=14, bool visible=true); t=14, bool visible=true, const QString& frame="EqJ2000");
//! Convenience function which allows loading of a sky image based o n a //! Convenience function which allows loading of a (square) sky imag e based on a
//! central coordinate, angular size and rotation. Parameters are t he same //! central coordinate, angular size and rotation. Parameters are t he same
//! as the version of this function which takes double values for th e //! as the version of this function which takes double values for th e
//! ra and dec, except here text expressions of angles may be used. //! lon and lat, except here text expressions of angles may be used.
void loadSkyImage(const QString& id, const QString& filename, void loadSkyImage(const QString& id, const QString& filename,
const QString& ra, const QString& const QString& lon, const QString&
dec, double angSize, double rotation, lat, double angSize, double rotation,
double minRes=2.5, double maxBrigh double minRes=2.5, double maxBrigh
t=14, bool visible=true); t=14, bool visible=true, const QString& frame="EqJ2000");
//! Load an image which will have a sky location given in alt-azimut hal coordinates. //! Load an image which will have a sky location given in alt-azimut hal coordinates.
//! @param id a string ID to be used when referring to this //! @param id a string ID to be used when referring to this
//! image (e.g. when changing the displayed status or deleting //! image (e.g. when changing the displayed status or deleting
//! it. //! it.
//! @param filename the file name of the image. If a relative //! @param filename the file name of the image. If a relative
//! path is specified, "scripts/" will be prefixed before the //! path is specified, "scripts/" will be prefixed before the
//! image is searched for using StelFileMgr. //! image is searched for using StelFileMgr.
//! @param alt0 The altitude angle of the first corner of the image in degrees //! @param alt0 The altitude angle of the first corner of the image in degrees
//! @param azi0 The azimuth angle of the first corner of the image i n degrees //! @param azi0 The azimuth angle of the first corner of the image i n degrees
//! @param alt1 The altitude angle of the second corner of the image in degrees //! @param alt1 The altitude angle of the second corner of the image in degrees
//! @param azi1 The azimuth angle of the second corner of the image in degrees //! @param azi1 The azimuth angle of the second corner of the image in degrees
//! @param alt2 The altitude angle of the third corner of the image in degrees //! @param alt2 The altitude angle of the third corner of the image in degrees
//! @param azi2 The azimuth angle of the third corner of the image i n degrees //! @param azi2 The azimuth angle of the third corner of the image i n degrees
//! @param alt3 The altitude angle of the fourth corner of the image in degrees //! @param alt3 The altitude angle of the fourth corner of the image in degrees
//! @param azi3 The azimuth angle of the fourth corner of the image in degrees //! @param azi3 The azimuth angle of the fourth corner of the image in degrees
//! @param minRes The minimum resolution setting for the image //! @param minRes The minimum resolution setting for the image
//! @param maxBright The maximum brightness setting for the image //! @param maxBright The maximum brightness setting for the image
//! @param visible The initial visibility of the image //! @param visible The initial visibility of the image
//! @deprecated since 2017-02 because of inconsistent name. Use load SkyImage(,,,, "AzAlt") instead!
void loadSkyImageAltAz(const QString& id, const QString& filename, void loadSkyImageAltAz(const QString& id, const QString& filename,
double azi0, double alt0, double azi0, double alt0,
double azi1, double alt1, double azi1, double alt1,
double azi2, double alt2, double azi2, double alt2,
double azi3, double alt3, double azi3, double alt3,
double minRes=2.5, double maxBrigh t=14, bool visible=true); double minRes=2.5, double maxBrigh t=14, bool visible=true);
//! Convenience function which allows loading of a sky image based o n a //! Convenience function which allows loading of a sky image based o n a
//! central alt-azimuthal coordinate, angular size and rotation. //! central alt-azimuthal coordinate, angular size and rotation.
//! @param id a string ID to be used when referring to this //! @param id a string ID to be used when referring to this
skipping to change at line 559 skipping to change at line 535
//! @param filename the file name of the image. If a relative //! @param filename the file name of the image. If a relative
//! path is specified, "scripts/" will be prefixed before the //! path is specified, "scripts/" will be prefixed before the
//! image is searched for using StelFileMgr. //! image is searched for using StelFileMgr.
//! @param alt The altitude angle of the center of the image in degr ees //! @param alt The altitude angle of the center of the image in degr ees
//! @param azi The azimuth angle of the center of the image in degre es //! @param azi The azimuth angle of the center of the image in degre es
//! @param angSize The angular size of the image in arc minutes //! @param angSize The angular size of the image in arc minutes
//! @param rotation The clockwise rotation angle of the image in deg rees //! @param rotation The clockwise rotation angle of the image in deg rees
//! @param minRes The minimum resolution setting for the image //! @param minRes The minimum resolution setting for the image
//! @param maxBright The maximum brightness setting for the image //! @param maxBright The maximum brightness setting for the image
//! @param visible The initial visibility of the image //! @param visible The initial visibility of the image
//! @deprecated since 2017-03. Use loadSkyImage(,,,, "AzAlt") instea d!
void loadSkyImageAltAz(const QString& id, const QString& filename, void loadSkyImageAltAz(const QString& id, const QString& filename,
double alt, double azi, double ang Size, double rotation, double alt, double azi, double ang Size, double rotation,
double minRes=2.5, double maxBrigh t=14, bool visible=true); double minRes=2.5, double maxBrigh t=14, bool visible=true);
//! Remove a SkyImage. //! Remove a SkyImage.
//! @param id the ID of the image to remove. //! @param id the ID of the image to remove.
void removeSkyImage(const QString& id); void removeSkyImage(const QString& id);
//! Get screen coordinates from some specified altitude and azimuth //! Get screen coordinates from some specified altitude and azimuth
//! angles may be specified in a format recognised by StelUtils::get DecAngle() //! angles may be specified in a format recognised by StelUtils::get DecAngle()
skipping to change at line 732 skipping to change at line 709
void setSelectedObjectInfo(const QString& level); void setSelectedObjectInfo(const QString& level);
//! Stop the script //! Stop the script
void exit(); void exit();
//! Close Stellarium //! Close Stellarium
void quitStellarium(); void quitStellarium();
//! print a debugging message to the console //! print a debugging message to the console
//! @param s the message to be displayed on the console. //! @param s the message to be displayed on the console.
void debug(const QString& s); static void debug(const QString& s);
//! print an output message from script //! print an output message from script
//! @param s the message to be displayed on the output file. //! @param s the message to be displayed on the output file.
void output(const QString& s); void output(const QString& s) const;
//! print contents of a QVariantMap as []-delimited list of [ "key"
= <value>] lists.
//! @param map QVariantMap e.g. from getObjectInfo() or getLocationI
nfo()
//! @note string values are surrounded with ", simple numeric types
are printed as themselves.
//! @note More complicated value types like lists are only indicated
by their type name. You must extract those (and their contents) yourself.
QString mapToString(const QVariantMap &map) const;
//! Reset (clear) output file //! Reset (clear) output file
void resetOutput(void); void resetOutput(void) const;
//! Save output file to new file (in same directory as output.txt). //! Save output file to new file (in same directory as output.txt).
//! This is required to allow reading with other program on Windows while output.txt is still open. //! This is required to allow reading with other program on Windows while output.txt is still open.
void saveOutputAs(const QString &filename); void saveOutputAs(const QString &filename);
//! Get the current application language. //! Get the current application language.
//! @return two letter language code, e.g. "en", or "de" and so on. //! @return two letter language code, e.g. "en", or "de" and so on.
QString getAppLanguage(); QString getAppLanguage() const;
//! Set the current application language. //! Set the current application language.
//! @param langCode two letter language code, e.g. "en", or "de". //! @param langCode two letter language code, e.g. "en", or "de".
void setAppLanguage(QString langCode); void setAppLanguage(QString langCode);
//! Get the current sky language. //! Get the current sky language.
//! @return two letter language code, e.g. "en", or "de" and so on. //! @return two letter language code, e.g. "en", or "de" and so on.
QString getSkyLanguage(); QString getSkyLanguage() const;
//! Set the current sky language. //! Set the current sky language.
//! @param langCode two letter language code, e.g. "en", or "de". //! @param langCode two letter language code, e.g. "en", or "de".
void setSkyLanguage(QString langCode); void setSkyLanguage(QString langCode);
//! Go to defaults position and direction of view //! Go to defaults position and direction of view
void goHome(); void goHome();
//! Show or hide the Milky Way. //! Show or hide the Milky Way.
//! @param b if true, show the Milky Way, if false, hide the Milky W ay. //! @param b if true, show the Milky Way, if false, hide the Milky W ay.
void setMilkyWayVisible(bool b); void setMilkyWayVisible(bool b);
//! Set Milky Way intensity. //! Set Milky Way intensity.
//! @param i value of intensity for the Milky Way //! @param i value of intensity for the Milky Way
void setMilkyWayIntensity(double i); void setMilkyWayIntensity(double i);
//! Get Milky Way intensity. //! Get Milky Way intensity.
//! @return value of Milky Way intensity, e.g. "1.2" //! @return value of Milky Way intensity, e.g. "1.2"
double getMilkyWayIntensity(); double getMilkyWayIntensity() const;
//! Show or hide the Zodiacal Light. //! Show or hide the Zodiacal Light.
//! @param b if true, show the Zodiacal Light, if false, hide the Zo diacal Light. //! @param b if true, show the Zodiacal Light, if false, hide the Zo diacal Light.
void setZodiacalLightVisible(bool b); void setZodiacalLightVisible(bool b);
//! Set Zodiacal Light intensity. //! Set Zodiacal Light intensity.
//! @param i value of intensity for the Zodiacal Light //! @param i value of intensity for the Zodiacal Light
void setZodiacalLightIntensity(double i); void setZodiacalLightIntensity(double i);
//! Get Zodiacal Light intensity. //! Get Zodiacal Light intensity.
//! @return value of Zodiacal Light intensity, e.g. "1.2" //! @return value of Zodiacal Light intensity, e.g. "1.2"
double getZodiacalLightIntensity(); double getZodiacalLightIntensity() const;
//! Returns the currently set Bortle scale index, which is used to s imulate light pollution. //! Returns the currently set Bortle scale index, which is used to s imulate light pollution.
//! Wrapper for StelSkyDrawer::getBortleScaleIndex //! Wrapper for StelSkyDrawer::getBortleScaleIndex
//! @see https://en.wikipedia.org/wiki/Bortle_scale //! @see https://en.wikipedia.org/wiki/Bortle_scale
//! @return the Bortle scale index in range [1,9] //! @return the Bortle scale index in range [1,9]
int getBortleScaleIndex() const; int getBortleScaleIndex() const;
//! Changes the Bortle scale index, which is used to simulate light pollution. //! Changes the Bortle scale index, which is used to simulate light pollution.
//! Wrapper for StelSkyDrawer::setBortleScaleIndex //! Wrapper for StelSkyDrawer::setBortleScaleIndex
//! Valid values are in the range [1,9] //! Valid values are in the range [1,9]
//! @see https://en.wikipedia.org/wiki/Bortle_scale //! @see https://en.wikipedia.org/wiki/Bortle_scale
//! @param index the new Bortle scale index, must be in range [1,9] //! @param index the new Bortle scale index, must be in range [1,9]
void setBortleScaleIndex(int index); void setBortleScaleIndex(int index);
//! For use in setDate and waitFor //! For use in setDate and waitFor
//! For parameter descriptions see setDate(). //! For parameter descriptions see setDate().
//! @returns Julian day. //! @returns Julian day.
double jdFromDateString(const QString& dt, const QString& spec); double jdFromDateString(const QString& dt, const QString& spec);
// Methods wait() and waitFor() was added for documentation. // Methods wait() and waitFor() were added for documentation.
// Details: https://bugs.launchpad.net/stellarium/+bug/1402200 // Details: https://bugs.launchpad.net/stellarium/+bug/1402200
// re-implemented for 0.15.1 to avoid a busy-loop.
//! Pauses the script for \e t seconds //! Pauses the script for \e t seconds
//! @param t the number of seconds to wait //! @param t the number of seconds to wait
void wait(double t); void wait(double t);
//! Waits until a specified simulation date/time. This function //! Waits until a specified simulation date/time. This function
//! will take into account the rate (and direction) in which simulat ion //! will take into account the rate (and direction) in which simulat ion
//! time is passing. e.g. if a future date is specified and the //! time is passing. e.g. if a future date is specified and the
//! time is moving backwards, the function will return immediately. //! time is moving backwards, the function will return immediately.
//! If the time rate is 0, the function will not wait. This is to //! If the time rate is 0, the function will not wait. This is to
//! prevent infinite wait time. //! prevent infinite wait time.
//! @param dt the date string to use //! @param dt the date string to use
//! @param spec "local" or "utc" //! @param spec "local" or "utc"
void waitFor(const QString& dt, const QString& spec="utc"); void waitFor(const QString& dt, const QString& spec="utc");
signals: signals:
void requestLoadSkyImage(const QString& id, const QString& filename, void requestLoadSkyImage(const QString& id, const QString& filename,
double c1, double c 2, double c1, double c 2,
double c3, double c 4, double c3, double c 4,
double c5, double c 6, double c5, double c 6,
double c7, double c 8, double c7, double c 8,
double minRes, doub double minRes, doub
le maxBright, bool visible); le maxBright, bool visible, const StelCore::FrameType frameType);
//! @deprecated! USE requestLoadSkyImage() with frameType=AzAlt!
//! @todo: Remove with V0.16.0
void requestLoadSkyImageAltAz(const QString& id, const QString& file name, void requestLoadSkyImageAltAz(const QString& id, const QString& file name,
double c1, double c 2, double c1, double c 2,
double c3, double c 4, double c3, double c 4,
double c5, double c 6, double c5, double c 6,
double c7, double c 8, double c7, double c 8,
double minRes, doub le maxBright, bool visible); double minRes, doub le maxBright, bool visible);
void requestRemoveSkyImage(const QString& id); void requestRemoveSkyImage(const QString& id);
void requestLoadSound(const QString& filename, const QString& id); void requestLoadSound(const QString& filename, const QString& id);
 End of changes. 35 change blocks. 
141 lines changed or deleted 131 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/