StelMainScriptAPI.cpp   StelMainScriptAPI.cpp 
skipping to change at line 224 skipping to change at line 224
Q_ASSERT(ssmgr); Q_ASSERT(ssmgr);
StelLocation loc = core->getCurrentLocation(); StelLocation loc = core->getCurrentLocation();
loc.longitude = longitude; loc.longitude = longitude;
loc.latitude = latitude; loc.latitude = latitude;
if (altitude > -1000) if (altitude > -1000)
loc.altitude = altitude; loc.altitude = altitude;
if (ssmgr->searchByName(planet)) if (ssmgr->searchByName(planet))
loc.planetName = planet; loc.planetName = planet;
loc.name = name; loc.name = name;
core->moveObserverTo(loc, duration); core->moveObserverTo(loc, duration, duration);
} }
void StelMainScriptAPI::setObserverLocation(const QString id, float duratio n) void StelMainScriptAPI::setObserverLocation(const QString id, float duratio n)
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
StelLocation loc = StelApp::getInstance().getLocationMgr().locationF orString(id); StelLocation loc = StelApp::getInstance().getLocationMgr().locationF orString(id);
if (!loc.isValid()) if (!loc.isValid())
return; // location find failed return; // location find failed
core->moveObserverTo(loc, duration); core->moveObserverTo(loc, duration);
} }
skipping to change at line 256 skipping to change at line 256
QVariantMap map; QVariantMap map;
map.insert("longitude", core->getCurrentLocation().longitude); map.insert("longitude", core->getCurrentLocation().longitude);
map.insert("latitude", core->getCurrentLocation().latitude); map.insert("latitude", core->getCurrentLocation().latitude);
map.insert("planet", planetName); map.insert("planet", planetName);
map.insert("altitude", core->getCurrentLocation().altitude); map.insert("altitude", core->getCurrentLocation().altitude);
map.insert("location", core->getCurrentLocation().getID()); map.insert("location", core->getCurrentLocation().getID());
// extra data // extra data
map.insert("sidereal-year", planet->getSiderealPeriod()); map.insert("sidereal-year", planet->getSiderealPeriod());
map.insert("sidereal-day", planet->getSiderealDay()*24.); map.insert("sidereal-day", planet->getSiderealDay()*24.);
map.insert("solar-day", planet->getMeanSolarDay()*24.); map.insert("solar-day", planet->getMeanSolarDay()*24.);
unsigned int h, m;
double 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-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)
{ {
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().saveScreenShot(prefix, dir);
StelMainView::getInstance().setFlagInvertScreenShotColors(oldInvertS etting); StelMainView::getInstance().setFlagInvertScreenShotColors(oldInvertS etting);
skipping to change at line 369 skipping to change at line 374
void StelMainScriptAPI::setFlagGravityLabels(bool b) void StelMainScriptAPI::setFlagGravityLabels(bool b)
{ {
StelApp::getInstance().getCore()->setFlagGravityLabels(b); StelApp::getInstance().getCore()->setFlagGravityLabels(b);
} }
bool StelMainScriptAPI::getDiskViewport() bool StelMainScriptAPI::getDiskViewport()
{ {
return StelApp::getInstance().getCore()->getProjection(StelCore::Fra meJ2000)->getMaskType() == StelProjector::MaskDisk; return StelApp::getInstance().getCore()->getProjection(StelCore::Fra meJ2000)->getMaskType() == StelProjector::MaskDisk;
} }
void StelMainScriptAPI::setSphericMirror(bool b)
{
StelCore* core = StelApp::getInstance().getCore();
if (b)
{
core->setCurrentProjectionType(StelCore::ProjectionFisheye);
StelApp::getInstance().setViewportEffect("sphericMirrorDisto
rter");
}
else
{
core->setCurrentProjectionTypeKey(core->getDefaultProjection
TypeKey());
StelApp::getInstance().setViewportEffect("none");
}
}
void StelMainScriptAPI::setDiskViewport(bool b) void StelMainScriptAPI::setDiskViewport(bool b)
{ {
emit(requestSetDiskViewport(b)); emit(requestSetDiskViewport(b));
} }
void StelMainScriptAPI::loadSkyImage(const QString& id, const QString& file name, void StelMainScriptAPI::loadSkyImage(const QString& id, const QString& file name,
double ra0, double dec0, double ra0, double dec0,
double ra1, double dec1, double ra1, double dec1,
double ra2, double dec2, double ra2, double dec2,
double ra3, double dec3, double ra3, double dec3,
skipping to change at line 966 skipping to change at line 986
ssmgr->setFlagOrbits(false); ssmgr->setFlagOrbits(false);
ssmgr->setFlagMoonScale(false); ssmgr->setFlagMoonScale(false);
ssmgr->setFlagTrails(false); ssmgr->setFlagTrails(false);
mmgr->setZHR(10); mmgr->setZHR(10);
glmgr->setFlagAzimuthalGrid(false); glmgr->setFlagAzimuthalGrid(false);
glmgr->setFlagGalacticGrid(false); glmgr->setFlagGalacticGrid(false);
glmgr->setFlagEquatorGrid(false); glmgr->setFlagEquatorGrid(false);
glmgr->setFlagEquatorLine(false); glmgr->setFlagEquatorLine(false);
glmgr->setFlagEclipticLine(false); glmgr->setFlagEclipticLine(false);
glmgr->setFlagMeridianLine(false); glmgr->setFlagMeridianLine(false);
glmgr->setFlagLongitudeLine(false);
glmgr->setFlagHorizonLine(false); glmgr->setFlagHorizonLine(false);
glmgr->setFlagGalacticEquatorLine(false); glmgr->setFlagGalacticEquatorLine(false);
glmgr->setFlagEquatorJ2000Grid(false); glmgr->setFlagEquatorJ2000Grid(false);
lmgr->setFlagCardinalsPoints(false); lmgr->setFlagCardinalsPoints(false);
cmgr->setFlagLines(false); cmgr->setFlagLines(false);
cmgr->setFlagLabels(false); cmgr->setFlagLabels(false);
cmgr->setFlagBoundaries(false); cmgr->setFlagBoundaries(false);
cmgr->setFlagArt(false); cmgr->setFlagArt(false);
smgr->setFlagLabels(false); smgr->setFlagLabels(false);
ssmgr->setFlagLabels(false); ssmgr->setFlagLabels(false);
skipping to change at line 999 skipping to change at line 1020
ssmgr->setFlagOrbits(false); ssmgr->setFlagOrbits(false);
ssmgr->setFlagMoonScale(false); ssmgr->setFlagMoonScale(false);
ssmgr->setFlagTrails(false); ssmgr->setFlagTrails(false);
mmgr->setZHR(0); mmgr->setZHR(0);
glmgr->setFlagAzimuthalGrid(false); glmgr->setFlagAzimuthalGrid(false);
glmgr->setFlagGalacticGrid(false); glmgr->setFlagGalacticGrid(false);
glmgr->setFlagEquatorGrid(true); glmgr->setFlagEquatorGrid(true);
glmgr->setFlagEquatorLine(false); glmgr->setFlagEquatorLine(false);
glmgr->setFlagEclipticLine(false); glmgr->setFlagEclipticLine(false);
glmgr->setFlagMeridianLine(false); glmgr->setFlagMeridianLine(false);
glmgr->setFlagLongitudeLine(false);
glmgr->setFlagHorizonLine(false); glmgr->setFlagHorizonLine(false);
glmgr->setFlagGalacticEquatorLine(false); glmgr->setFlagGalacticEquatorLine(false);
glmgr->setFlagEquatorJ2000Grid(false); glmgr->setFlagEquatorJ2000Grid(false);
lmgr->setFlagCardinalsPoints(false); lmgr->setFlagCardinalsPoints(false);
cmgr->setFlagLines(true); cmgr->setFlagLines(true);
cmgr->setFlagLabels(true); cmgr->setFlagLabels(true);
cmgr->setFlagBoundaries(true); cmgr->setFlagBoundaries(true);
cmgr->setFlagArt(false); cmgr->setFlagArt(false);
smgr->setFlagLabels(true); smgr->setFlagLabels(true);
ssmgr->setFlagLabels(true); ssmgr->setFlagLabels(true);
skipping to change at line 1032 skipping to change at line 1054
ssmgr->setFlagOrbits(false); ssmgr->setFlagOrbits(false);
ssmgr->setFlagMoonScale(false); ssmgr->setFlagMoonScale(false);
ssmgr->setFlagTrails(false); ssmgr->setFlagTrails(false);
mmgr->setZHR(0); mmgr->setZHR(0);
glmgr->setFlagAzimuthalGrid(false); glmgr->setFlagAzimuthalGrid(false);
glmgr->setFlagGalacticGrid(false); glmgr->setFlagGalacticGrid(false);
glmgr->setFlagEquatorGrid(false); glmgr->setFlagEquatorGrid(false);
glmgr->setFlagEquatorLine(false); glmgr->setFlagEquatorLine(false);
glmgr->setFlagEclipticLine(false); glmgr->setFlagEclipticLine(false);
glmgr->setFlagMeridianLine(false); glmgr->setFlagMeridianLine(false);
glmgr->setFlagLongitudeLine(false);
glmgr->setFlagHorizonLine(false); glmgr->setFlagHorizonLine(false);
glmgr->setFlagGalacticEquatorLine(false); glmgr->setFlagGalacticEquatorLine(false);
glmgr->setFlagEquatorJ2000Grid(false); glmgr->setFlagEquatorJ2000Grid(false);
lmgr->setFlagCardinalsPoints(false); lmgr->setFlagCardinalsPoints(false);
cmgr->setFlagLines(false); cmgr->setFlagLines(false);
cmgr->setFlagLabels(false); cmgr->setFlagLabels(false);
cmgr->setFlagBoundaries(false); cmgr->setFlagBoundaries(false);
cmgr->setFlagArt(false); cmgr->setFlagArt(false);
smgr->setFlagLabels(false); smgr->setFlagLabels(false);
ssmgr->setFlagLabels(false); ssmgr->setFlagLabels(false);
 End of changes. 6 change blocks. 
1 lines changed or deleted 28 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/