StelMainScriptAPI.cpp   StelMainScriptAPI.cpp 
skipping to change at line 276 skipping to change at line 276
map.insert("solar-day", planet->getMeanSolarDay()*24.); map.insert("solar-day", planet->getMeanSolarDay()*24.);
unsigned int h, m; unsigned int h, m;
double s; double s;
StelUtils::radToHms(core->getLocalSiderealTime(), h, m, s); StelUtils::radToHms(core->getLocalSiderealTime(), h, m, s);
map.insert("local-sidereal-time", (double)h + (double)m/60 + s/3600) ; map.insert("local-sidereal-time", (double)h + (double)m/60 + s/3600) ;
map.insert("local-sidereal-time-hms", StelUtils::radToHmsStr(core->g etLocalSiderealTime())); map.insert("local-sidereal-time-hms", StelUtils::radToHmsStr(core->g etLocalSiderealTime()));
return map; return map;
} }
void StelMainScriptAPI::screenshot(const QString& prefix, bool invert, cons t QString& dir) void StelMainScriptAPI::screenshot(const QString& prefix, bool invert, cons t QString& dir, const bool overwrite)
{ {
bool oldInvertSetting = StelMainView::getInstance().getFlagInvertScr eenShotColors(); bool oldInvertSetting = StelMainView::getInstance().getFlagInvertScr eenShotColors();
StelMainView::getInstance().setFlagInvertScreenShotColors(invert); StelMainView::getInstance().setFlagInvertScreenShotColors(invert);
StelMainView::getInstance().saveScreenShot(prefix, dir); StelMainView::getInstance().setFlagOverwriteScreenShots(overwrite);
StelMainView::getInstance().saveScreenShot(prefix, dir, overwrite);
StelMainView::getInstance().setFlagInvertScreenShotColors(oldInvertS etting); StelMainView::getInstance().setFlagInvertScreenShotColors(oldInvertS etting);
} }
void StelMainScriptAPI::setGuiVisible(bool b) void StelMainScriptAPI::setGuiVisible(bool b)
{ {
StelApp::getInstance().getGui()->setVisible(b); StelApp::getInstance().getGui()->setVisible(b);
} }
void StelMainScriptAPI::setMinFps(float m) void StelMainScriptAPI::setMinFps(float m)
{ {
skipping to change at line 672 skipping to change at line 673
{ {
qDebug() << "script: " << s; qDebug() << "script: " << s;
StelApp::getInstance().getScriptMgr().debug(s); StelApp::getInstance().getScriptMgr().debug(s);
} }
void StelMainScriptAPI::output(const QString &s) void StelMainScriptAPI::output(const QString &s)
{ {
StelApp::getInstance().getScriptMgr().output(s); StelApp::getInstance().getScriptMgr().output(s);
} }
void StelMainScriptAPI::resetOutput(void)
{
StelApp::getInstance().getScriptMgr().resetOutput();
}
double StelMainScriptAPI::jdFromDateString(const QString& dt, const QString & spec) double StelMainScriptAPI::jdFromDateString(const QString& dt, const QString & spec)
{ {
StelCore *core = StelApp::getInstance().getCore(); StelCore *core = StelApp::getInstance().getCore();
if (dt == "now") if (dt == "now")
return StelUtils::getJDFromSystem(); return StelUtils::getJDFromSystem();
bool ok; bool ok;
double jd; double jd;
if (spec=="local") if (spec=="local")
{ {
 End of changes. 3 change blocks. 
2 lines changed or deleted 8 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/