StelMainScriptAPI.hpp   StelMainScriptAPI.hpp 
skipping to change at line 44 skipping to change at line 44
//! 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
{ {
Q_OBJECT Q_OBJECT
Q_PROPERTY(double JDay READ getJDay WRITE setJDay) Q_PROPERTY(double JDay READ getJDay WRITE setJDay)
Q_PROPERTY(double timeSpeed READ getTimeRate WRITE setTimeRate) Q_PROPERTY(double timeSpeed READ getTimeRate WRITE setTimeRate)
public: public:
StelMainScriptAPI(QObject *parent = 0); StelMainScriptAPI(QObject *parent = Q_NULLPTR);
~StelMainScriptAPI(); ~StelMainScriptAPI();
// These functions will be available in scripts // These functions will be available in scripts
public slots: public slots:
//! Set the current date as Julian Day number //! Set the current date as Julian Day number
//! @param JD the Julian Day number //! @param JD the Julian Day number
void setJDay(double JD); void setJDay(double JD);
//! Get the current date as Julian Day number //! Get the current date as Julian Day number
//! @return the Julian Day number //! @return the Julian Day number
double getJDay() const; double getJDay() const;
skipping to change at line 155 skipping to change at line 155
//! @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, exactly like getObjectInfo(). //! @return a map of object data, exactly like getObjectInfo().
//! @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:
//! - above-horizon : true, if celestial body is above horizon
//! - 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
//! - azimuth-geometric : geometric azimuth angle in decimal degrees //! - azimuth-geometric : geometric azimuth angle in decimal degrees
//! - ra : right ascension angle (current date frame) in decimal deg rees //! - ra : right ascension angle (current date frame) in decimal deg rees
//! - dec : declination angle (current date frame) in decimal degree s //! - dec : declination angle (current date frame) in decimal degree s
//! - raJ2000 : right ascension angle (J2000 frame) in decimal degre es //! - raJ2000 : right ascension angle (J2000 frame) in decimal degre es
//! - decJ2000 : declination angle (J2000 frame) in decimal degrees //! - decJ2000 : declination angle (J2000 frame) in decimal degrees
//! - glong : galactic longitude in decimal degrees //! - glong : galactic longitude in decimal degrees
//! - glat : galactic latitude in decimal degrees //! - glat : galactic latitude in decimal degrees
skipping to change at line 327 skipping to change at line 328
void setGuiVisible(bool b); void setGuiVisible(bool b);
//! Set the minimum frames per second. Usually this minimum will //! Set the minimum frames per second. Usually this minimum will
//! be switched to after there are no user events for some seconds //! be switched to after there are no user events for some seconds
//! to save power. However, if can be useful to set this to a high //! to save power. However, if can be useful to set this to a high
//! value to improve playing smoothness in scripts. //! value to improve playing smoothness in scripts.
//! @param m the new minimum fps setting. //! @param m the new minimum fps setting.
void setMinFps(float m); void setMinFps(float m);
//! Get the current minimum frames per second. //! Get the current minimum frames per second.
//! @return The current minimum frames per secon setting. //! @return The current minimum frames per second setting.
float getMinFps(); float getMinFps();
//! Set the maximum frames per second. //! Set the maximum frames per second.
//! @param m the new maximum fps setting. //! @param m the new maximum fps setting.
void setMaxFps(float m); void setMaxFps(float m);
//! Get the current maximum frames per second. //! Get the current maximum frames per second.
//! @return The current maximum frames per secon setting. //! @return The current maximum frames per second setting.
float getMaxFps(); float getMaxFps();
//! Get the mount mode as a string //! Get the mount mode as a string
//! @return "equatorial" or "azimuthal" //! @return "equatorial" or "azimuthal"
QString getMountMode(); QString getMountMode();
//! Set the mount mode //! Set the mount mode
//! @param mode should be "equatorial" or "azimuthal" //! @param mode should be "equatorial" or "azimuthal"
void setMountMode(const QString& mode); void setMountMode(const QString& mode);
skipping to change at line 360 skipping to change at line 361
//! Set the status of Night Mode //! Set the status of Night Mode
//! @param b if true, set Night Mode, else set Normal Mode //! @param b if true, set Night Mode, else set Normal Mode
void setNightMode(bool b); void setNightMode(bool b);
//! Get the current projection mode ID string //! Get the current projection mode ID string
//! @return the string which identifies the current projection mode. //! @return the string which identifies the current projection mode.
//! For a list of possibl results, see setProjectionMode(); //! For a list of possibl results, see setProjectionMode();
QString getProjectionMode(); QString getProjectionMode();
//! Set the current projection mode //! Set the current projection mode
//! @param id the name of the projection mode to use, e.g. "Perspect ive" and so on. //! @param id the name of the projection mode to use, e.g. "Projecti onPerspective" and so on.
//! valid values of id are: //! valid values of id are:
//! - ProjectionPerspective //! - ProjectionPerspective
//! - ProjectionEqualArea //! - ProjectionEqualArea
//! - ProjectionStereographic //! - ProjectionStereographic
//! - ProjectionFisheye //! - ProjectionFisheye
//! - ProjectionHammer //! - ProjectionHammer
//! - ProjectionCylinder //! - ProjectionCylinder
//! - ProjectionMercator //! - ProjectionMercator
//! - ProjectionOrthographic //! - ProjectionOrthographic
//! - ProjectionSinusoidal
//! - ProjectionMiller
void setProjectionMode(const QString& id); void setProjectionMode(const QString& id);
//! Get the status of the disk viewport //! Get the status of the disk viewport
//! @return true if the disk view port is currently enabled //! @return true if the disk view port is currently enabled
bool getDiskViewport(); bool getDiskViewport();
//! Set the disk viewport //! Set the disk viewport
//! @param b if true, sets the disk viewport on, else sets it off //! @param b if true, sets the disk viewport on, else sets it off
void setDiskViewport(bool b); void setDiskViewport(bool b);
skipping to change at line 707 skipping to change at line 710
//! Set the amount of selected object information to display //! Set the amount of selected object information to display
//! @param level can be "AllInfo", "ShortInfo", "None" //! @param level can be "AllInfo", "ShortInfo", "None"
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();
//! Return a QStringlist of all available properties. Useful for scr
ipt development...
QStringList getPropertyList() const;
//! 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.
static 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) const; void output(const QString& s) const;
//! print contents of a QVariantMap as []-delimited list of [ "key" = <value>] lists. //! print contents of a QVariantMap as []-delimited list of [ "key" = <value>] lists.
//! @param map QVariantMap e.g. from getObjectInfo() or getLocationI nfo() //! @param map QVariantMap e.g. from getObjectInfo() or getLocationI nfo()
skipping to change at line 784 skipping to change at line 790
//! @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);
//! Show or hide the DSS (photorealistic sky).
//! @param b if true, show the DSS, if false, hide the DSS layer.
void setDSSMode(bool b);
//! Get the current status of DSS mode.
//! @return The current status of DSS mode.
bool isDSSModeEnabled() const;
//! 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() were 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. // 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
 End of changes. 8 change blocks. 
4 lines changed or deleted 18 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/