20 #ifndef _STELMAINSCRIPTAPI_HPP_
21 #define _STELMAINSCRIPTAPI_HPP_
25 #include <QStringList>
84 void setDate(
const QString& dt,
const QString& spec=
"utc",
const bool& enableDeltaT=
true);
91 QString
getDate(
const QString& spec=
"utc");
223 void clear(
const QString& state=
"natural");
258 void moveToAltAzi(
const QString& alt,
const QString& azi,
float duration=1.);
265 void moveToRaDec(
const QString& ra,
const QString& dec,
float duration=1.);
272 void moveToRaDecJ2000(
const QString& ra,
const QString& dec,
float duration=1.);
291 void setObserverLocation(
double longitude,
double latitude,
double altitude,
double duration=1.,
const QString& name=
"",
const QString& planet=
"");
322 void screenshot(
const QString& prefix,
bool invert=
false,
const QString& dir=
"");
441 void loadSkyImage(
const QString&
id,
const QString& filename,
442 double ra0,
double dec0,
443 double ra1,
double dec1,
444 double ra2,
double dec2,
445 double ra3,
double dec3,
446 double minRes=2.5,
double maxBright=14,
bool visible=
true);
452 void loadSkyImage(
const QString&
id,
const QString& filename,
453 const QString& ra0,
const QString& dec0,
454 const QString& ra1,
const QString& dec1,
455 const QString& ra2,
const QString& dec2,
456 const QString& ra3,
const QString& dec3,
457 double minRes=2.5,
double maxBright=14,
bool visible=
true);
473 void loadSkyImage(
const QString&
id,
const QString& filename,
474 double ra,
double dec,
double angSize,
double rotation,
475 double minRes=2.5,
double maxBright=14,
bool visible=
true);
481 void loadSkyImage(
const QString&
id,
const QString& filename,
482 const QString& ra,
const QString& dec,
double angSize,
double rotation,
483 double minRes=2.5,
double maxBright=14,
bool visible=
true);
504 double alt0,
double azi0,
505 double alt1,
double azi1,
506 double alt2,
double azi2,
507 double alt3,
double azi3,
508 double minRes=2.5,
double maxBright=14,
bool visible=
true);
525 double alt,
double azi,
double angSize,
double rotation,
526 double minRes=2.5,
double maxBright=14,
bool visible=
true);
536 void loadSound(
const QString& filename,
const QString&
id);
566 void loadVideo(
const QString& filename,
const QString&
id,
float x,
float y,
bool show,
float alpha);
591 void seekVideo(
const QString&
id, qint64 ms);
597 void setVideoXY(
const QString&
id,
float x,
float y);
608 void resizeVideo(
const QString&
id,
float w,
float h);
613 void showVideo(
const QString&
id,
bool show);
647 void debug(
const QString& s);
651 void output(
const QString& s);
707 void wait(
double t) { Q_UNUSED(t) }
718 void waitFor(
const QString& dt,
const QString& spec=
"utc") { Q_UNUSED(dt); Q_UNUSED(spec) }
721 void requestLoadSkyImage(
const QString&
id,
const QString& filename,
722 double c1,
double c2,
723 double c3,
double c4,
724 double c5,
double c6,
725 double c7,
double c8,
726 double minRes,
double maxBright,
bool visible);
727 void requestLoadSkyImageAltAz(
const QString&
id,
const QString& filename,
728 double c1,
double c2,
729 double c3,
double c4,
730 double c5,
double c6,
731 double c7,
double c8,
732 double minRes,
double maxBright,
bool visible);
735 void requestRemoveSkyImage(
const QString&
id);
737 void requestLoadSound(
const QString& filename,
const QString&
id);
738 void requestPlaySound(
const QString&
id);
739 void requestPauseSound(
const QString&
id);
740 void requestStopSound(
const QString&
id);
741 void requestDropSound(
const QString&
id);
742 void requestLoadVideo(
const QString& filename,
const QString&
id,
float x,
float y,
bool show,
float alpha);
743 void requestPlayVideo(
const QString&
id);
744 void requestPauseVideo(
const QString&
id);
745 void requestStopVideo(
const QString&
id);
746 void requestDropVideo(
const QString&
id);
747 void requestSeekVideo(
const QString&
id, qint64 ms);
748 void requestSetVideoXY(
const QString&
id,
float x,
float y);
749 void requestSetVideoAlpha(
const QString&
id,
float alpha);
750 void requestResizeVideo(
const QString&
id,
float w,
float h);
751 void requestShowVideo(
const QString&
id,
bool show);
753 void requestSetNightMode(
bool b);
754 void requestSetProjectionMode(QString
id);
755 void requestSetSkyCulture(QString
id);
756 void requestSetDiskViewport(
bool b);
758 void requestSetHomePosition();
761 #endif // _STELMAINSCRIPTAPI_HPP_
void setMinFps(float m)
Set the minimum frames per second.
double getViewDecAngle()
Get the current viewing direction Declination angle at center of view.
double getMJDay() const
Get the current date in Modified Julian Day.
bool getNightMode()
Get the current status of Night Mode.
QVariantMap getObjectInfo(const QString &name)
Fetch a map with data about an object's position, magnitude and so on.
void selectObjectByName(const QString &name, bool pointer=false)
Select an object by name.
void clear(const QString &state="natural")
Clear the display options, setting a "standard" view.
double jdFromDateString(const QString &dt, const QString &spec)
For use in setDate and waitFor For parameter descriptions see setDate().
void pauseVideo(const QString &id)
Pause a video which is playing.
void moveToAltAzi(const QString &alt, const QString &azi, float duration=1.)
move the current viewing direction to some specified altitude and azimuth angles may be specified in ...
int getScreenHeight()
Get the screen height in pixels.
QString getAppLanguage()
Get the current application language.
void setProjectionMode(const QString &id)
Set the current projection mode.
void setDiskViewport(bool b)
Set the disk viewport.
bool isRealTime()
Get the simulation time and rate state - is it "real time".
void playSound(const QString &id)
Play a sound which has previously been loaded with loadSound.
void moveToRaDec(const QString &ra, const QString &dec, float duration=1.)
move the current viewing direction to some specified right ascension and declination angles may be sp...
QString getDeltaTAlgorithm() const
get the DeltaT equation name for the simulation date and time as a string
double getTimeRate() const
Get simulation time rate.
double getViewDecJ2000Angle()
Get the current viewing direction Declination angle in J2000 frame at center of view.
double getViewRaJ2000Angle()
Get the current viewing direction Right Ascension in J2000 frame at center of view.
QString getProjectionMode()
Get the current projection mode ID string.
void setRealTime()
Set the simulation time to the current system time, and the time rate to 1.
void exit()
Stop the script.
QVariantMap getObserverLocationInfo()
Get the info of the current observer location.
void wait(double t)
Pauses the script for t milliseconds.
int getScreenWidth()
Get the screen width in pixels.
void loadVideo(const QString &filename, const QString &id, float x, float y, bool show, float alpha)
Load a video from a file.
void setMilkyWayVisible(bool b)
Show or hide the Milky Way.
void resizeVideo(const QString &id, float w, float h)
Resize the video widget to the specified width, height.
void setVideoAlpha(const QString &id, float alpha)
Set the alpha value of a video when visible.
void setNightMode(bool b)
Set the status of Night Mode.
void playVideo(const QString &id)
Play a video which has previously been loaded with loadVideo.
void 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=2.5, double maxBright=14, bool visible=true)
Load an image which will have sky coordinates.
void setSphericMirror(bool b)
Set the viewport distortion effect.
void setSelectedObjectInfo(const QString &level)
Set the amount of selected object information to display.
void setDate(const QString &dt, const QString &spec="utc", const bool &enableDeltaT=true)
set the date in ISO format, e.g.
QString getSkyCultureName()
Find out the current sky culture and get it English name.
QString getSkyCultureNameI18n()
Find out the current sky culture and get it localized name.
void dropSound(const QString &id)
Drop a sound from memory.
void removeSkyImage(const QString &id)
Remove a SkyImage.
void setFlagGravityLabels(bool b)
Turn on/off gravity labels.
void setZodiacalLightVisible(bool b)
Show or hide the Zodiacal Light.
void setMountMode(const QString &mode)
Set the mount mode.
double getViewAltitudeAngle()
Get the current viewing direction altitude angle at center of view.
void debug(const QString &s)
print a debugging message to the console
QString getDate(const QString &spec="utc")
get the simulation date and time as a string in ISO format, e.g.
Provide script API for Stellarium global functions.
QVariantMap getSelectedObjectInfo()
Fetch a map with data about an latest selected object's position, magnitude and so on...
void setJDay(double JD)
Set the current date in Julian Day.
void showVideo(const QString &id, bool show)
Set the visibility state of a video.
float getMinFps()
Get the current minimum frames per second.
void setScriptRate(double r)
Set the script execution rate as a multiple of normal execution speed.
void moveToRaDecJ2000(const QString &ra, const QString &dec, float duration=1.)
move the current viewing direction to some specified right ascension and declination in the J2000 fra...
void 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=2.5, double maxBright=14, bool visible=true)
Load an image which will have sky coordinates.
void setMaxFps(float m)
Set the maximum frames per second.
QStringList getAllSkyCultureIDs()
Get a list of Sky Culture IDs.
void setSkyLanguage(QString langCode)
Set the current sky language.
void goHome()
Go to defaults position and direction of view.
void waitFor(const QString &dt, const QString &spec="utc")
Waits until a specified simulation date/time.
void loadSound(const QString &filename, const QString &id)
Load a sound from a file.
void setAppLanguage(QString langCode)
Set the current application language.
void seekVideo(const QString &id, qint64 ms)
Seeks a video to the requested time.
QString getMountMode()
Get the mount mode as a string.
void setGuiVisible(bool b)
Show or hide the GUI (toolbars).
void output(const QString &s)
print an output message from script
void pauseScript()
Pause the currently running script.
bool getDiskViewport()
Get the status of the disk viewport.
void dropVideo(const QString &id)
Drop a video from memory.
QString getDeltaT() const
get the DeltaT for the simulation date and time as a string in HMS format, e.g.
double getMilkyWayIntensity()
Get Milky Way intensity.
double getViewAzimuthAngle()
Get the current viewing direction azimuth angle at center of view.
QString getObserverLocation()
Get the ID of the current observer location.
float getMaxFps()
Get the current maximum frames per second.
QString getSkyLanguage()
Get the current sky language.
void quitStellarium()
Close Stellarium.
void setDeltaTAlgorithm(QString algorithmName)
set equation of the DeltaT for the simulation date and time
double getScriptRate()
Get the script execution rate as a multiple of normal execution speed.
void setMJDay(double MJD)
Set the current date in Modified Julian Day.
void setTimeRate(double ts)
Set time speed in JDay/sec.
void pauseSound(const QString &id)
Pause a sound which is playing.
void screenshot(const QString &prefix, bool invert=false, const QString &dir="")
Save a screenshot.
void setMilkyWayIntensity(double i)
Set Milky Way intensity.
bool getFlagGravityLabels()
Get the current status of the gravity labels option.
void setSkyCulture(const QString &id)
Set the current sky culture.
QString getSkyCulture()
Find out the current sky culture.
double getViewRaAngle()
Get the current viewing direction Right Ascension at center of view.
void setZodiacalLightIntensity(double i)
Set Zodiacal Light intensity.
void stopSound(const QString &id)
Stop a sound from playing.
double getZodiacalLightIntensity()
Get Zodiacal Light intensity.
void setVideoXY(const QString &id, float x, float y)
Sets the position of the video widget.
double getJDay() const
Get the current date in Julian Day.
QVariantMap getObjectPosition(const QString &name)
Fetch a map with data about an object's position, magnitude and so on.
void stopVideo(const QString &id)
Stop a video from playing.
void setObserverLocation(double longitude, double latitude, double altitude, double duration=1., const QString &name="", const QString &planet="")
Set the observer location.