StelMainScriptAPI.hpp   StelMainScriptAPI.hpp 
skipping to change at line 47 skipping to change at line 47
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 = 0);
~StelMainScriptAPI(); ~StelMainScriptAPI();
// These functions will be available in scripts // These functions will be available in scripts
public slots: public slots:
//! Set the current date in Julian Day //! Set the current date as Julian Day number
//! @param JD the Julian Date //! @param JD the Julian Day number
void setJDay(double JD); void setJDay(double JD);
//! Get the current date in Julian Day //! Get the current date as Julian Day number
//! @return the Julian Date //! @return the Julian Day number
double getJDay() const; double getJDay() const;
//! Set the current date in Modified Julian Day //! Set the current date as Modified Julian Day
//! @param MJD the Modified Julian Date //! @param MJD the Modified Julian Day
void setMJDay(double MJD); void setMJDay(double MJD);
//! Get the current date in Modified Julian Day //! Get the current date as Modified Julian Day
//! @return the Modified Julian Date //! @return the Modified Julian Day
double getMJDay() const; double getMJDay() const;
//! set the date in ISO format, e.g. "2008-03-24T13:21:01" //! set the date in ISO format, e.g. "2008-03-24T13:21:01"
//! @param dt the date string to use. Formats: //! @param dateStr the date string to use. Formats:
//! - ISO, e.g. "2008-03-24T13:21:01" //! - ISO, e.g. "2008-03-24T13:21:01"
//! - "now" (set sim time to real time) //! - "now" (set sim time to real time)
//! - relative, e.g. "+ 4 days", "-2 weeks". can use these //! - relative, e.g. "+ 4 days", "-2 weeks". can use these
//! units: seconds, minutes, hours, days, weeks, months, years. //! units: seconds, minutes, hours, days, weeks, months, years.
//! You may also append " sidereal" to use sidereal days and so on . //! You may also append " sidereal" to use sidereal days and so on .
//! You can also use "now" at the start. For example: //! You can also use "now" at the start. For example:
//! "now + 3 hours sidereal" //! "now + 3 hours sidereal"
//! @note you must use the plural all the time, even when the number //! @note you must use the plural all the time, even when the number
//! of the unit is 1. i.e. use "+ 1 days" not "+1 day". //! of the unit is 1. i.e. use "+ 1 days" not "+1 day".
//! @note when sidereal time is used, the length of time for //! @note when sidereal time is used, the length of time for
//! each unit is dependent on the current planet. By contrast //! each unit is dependent on the current planet. By contrast
//! when sidereal timeis not specified (i.e. solar time is used) //! when sidereal time is not specified (i.e. solar time is used)
//! the value is conventional - i.e. 1 day means 1 Earth Solar day. //! the value is conventional - i.e. 1 day means 1 Earth Solar day.
// TODO: This calls for implementing "sol" days (planets's solar day s)!
//! @param spec "local" or "utc" - only has an effect when //! @param spec "local" or "utc" - only has an effect when
//! the ISO date type is used. Defaults to "utc". //! the ISO date type is used. Defaults to "utc".
//! @param enableDeltaT is \a true or \a false - enable Delta-T corr ection or not. //! @param enableDeltaT is \a true or \a false - enable Delta-T corr ection or not.
//! Defaults to "true". //! Defaults to "true".
//! @note for fully compatibles behavior of this function with the v ersion 0.11.4 //! @note for fully compatibles behavior of this function with the v ersion 0.11.4
//! or earlier, you should call \b core.setDeltaTAlgorithm("WithoutC orrection"); //! or earlier, you should call \b core.setDeltaTAlgorithm("WithoutC orrection");
//! before running \b core.setDate(); for disabling DeltaT correctio n. //! before running \b core.setDate(); for disabling DeltaT correctio n.
//! @note starting with version 0.13.2 all relative dates are set wi thout DeltaT correction. //! @note starting with version 0.13.2 all relative dates are set wi thout DeltaT correction.
void setDate(const QString& dt, const QString& spec="utc", const boo //! @note starting with version 0.14.0 the final optional Boolean ar
l& enableDeltaT=true); gument has a different meaning and default!
//! @param dateIsTT \a true if the given date is formulated in Dynam
ical Time, i.e. with DeltaT added.
// GZ JDfix for 0.14: I estimate 99.7% of users will want to set UT
-based dates here. We could use an awkward name like dateIsUTbased=true to
keep default value true.
//void setDate(const QString& dt, const QString& spec="utc", const b
ool& enableDeltaT=true);
void setDate(const QString& dateStr, const QString& spec="utc", cons
t bool& dateIsDT=false);
//! get the simulation date and time as a string in ISO format, //! get the simulation date and time as a string in ISO format,
//! e.g. "2008-03-24T13:21:01" //! e.g. "2008-03-24T13:21:01"
//! @param spec if "utc", the returned string's timezone is UTC, //! @param spec if "utc", the returned string's timezone is UTC,
//! else it is local time. //! else it is local time.
//! @return the current simulation time. //! @return the current simulation time.
QString getDate(const QString& spec="utc"); QString getDate(const QString& spec="utc");
//! get the DeltaT for the simulation date and time as a string //! get the DeltaT for the simulation date and time as a string
//! in HMS format, e.g. "0h1m68.2s" //! in HMS format, e.g. "0h1m68.2s"
skipping to change at line 222 skipping to change at line 227
//! - 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!)
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.
//! @param state the name of a preset state. //! @param state the name of a preset state.
void clear(const QString& state="natural"); void clear(const QString& state="natural");
//! Get the current viewing direction altitude angle at center of vi ew. //! Get the current viewing direction altitude angle at center of vi ew.
//! @return the altitude angle in decimal degrees. //! @return the altitude angle in decimal degrees.
//! 0 is horizon, zenith is 180, nadir = -180. //! 0 is horizon, zenith is 180, nadir = -180.
double getViewAltitudeAngle(); double getViewAltitudeAngle();
//! Get the current viewing direction azimuth angle at center of vie w. //! Get the current viewing direction azimuth angle at center of vie w.
//! @return the azimuth angle in decimal degrees as a compass bearin g //! @return the azimuth angle in decimal degrees as a compass bearin g
skipping to change at line 703 skipping to change at line 709
double getZodiacalLightIntensity(); double getZodiacalLightIntensity();
//! 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() was added for documentation.
// Details: https://bugs.launchpad.net/stellarium/+bug/1402200 // Details: https://bugs.launchpad.net/stellarium/+bug/1402200
//! Pauses the script for \e t milliseconds //! Pauses the script for \e t seconds
//! @param t the number of milliseconds to wait //! @param t the number of seconds to wait
//! @note This method is pure JavaScript implementation. //! @note This method is pure JavaScript implementation.
void wait(double t) { Q_UNUSED(t) } void wait(double t) { Q_UNUSED(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
 End of changes. 10 change blocks. 
14 lines changed or deleted 25 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/