TextUserInterface.cpp   TextUserInterface.cpp 
skipping to change at line 146 skipping to change at line 146
//strings used here match strings used elsewhere. Do not change stri ngs //strings used here match strings used elsewhere. Do not change stri ngs
//unless you have a good reason. --BM //unless you have a good reason. --BM
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
// Main config. // Main config.
loadConfiguration(); loadConfiguration();
//Reusing strings from the location dialog //Reusing strings from the location dialog
TuiNode* m1 = new TuiNode(N_("Location")); TuiNode* m1 = new TuiNode(N_("Location"));
TuiNode* m1_1 = new TuiNodeDouble(N_("Latitude:"), TuiNode* m1_1 = new TuiNodeDouble(N_("Latitude:"),
this, SLOT(setLatitude(double)), this, SLOT(setLatitude(double)),
getLatitude(), -180, 180, 0.5, m1) ; getLatitude(), -90, 90, 0.5, m1);
TuiNode* m1_2 = new TuiNodeDouble(N_("Longitude:"), TuiNode* m1_2 = new TuiNodeDouble(N_("Longitude:"),
this, SLOT(setLongitude(double)), this, SLOT(setLongitude(double)),
getLongitude(), -180, 180, 0.5, m1 , m1_1); getLongitude(), -180, 180, 0.5, m1 , m1_1);
TuiNode* m1_3 = new TuiNodeInt(N_("Altitude:"), TuiNode* m1_3 = new TuiNodeInt(N_("Altitude:"),
this, SLOT(setAltitude(int)), this, SLOT(setAltitude(int)),
core->getCurrentLocation().altitude, core->getCurrentLocation().altitude,
-200, 200000, 100, m1, m1_2); -450, 200000, 100, m1, m1_2);
// TODO: Now new Solar System bodies can be added at runtime, so the list // TODO: Now new Solar System bodies can be added at runtime, so the list
// needs to be populated every time this happens. --BM // needs to be populated every time this happens. --BM
SolarSystem* solarSystem = GETSTELMODULE(SolarSystem); SolarSystem* solarSystem = GETSTELMODULE(SolarSystem);
TuiNode* m1_4 = new TuiNodeEnum(N_("Solar System body"), TuiNode* m1_4 = new TuiNodeEnum(N_("Solar System body"),
this, SLOT(setHomePlanet(QString)), this, SLOT(setHomePlanet(QString)),
solarSystem->getAllPlanetEnglishName s(), solarSystem->getAllPlanetEnglishName s(),
core->getCurrentLocation().planetNam e, core->getCurrentLocation().planetNam e,
m1, m1_3); m1, m1_3);
m1_1->setNextNode(m1_2); m1_1->setNextNode(m1_2);
skipping to change at line 177 skipping to change at line 177
m1_1->loopToTheLast(); m1_1->loopToTheLast();
m1->setChildNode(m1_1); m1->setChildNode(m1_1);
TuiNode* m2 = new TuiNode(N_("Date and Time"), NULL, m1); TuiNode* m2 = new TuiNode(N_("Date and Time"), NULL, m1);
m1->setNextNode(m2); m1->setNextNode(m2);
TuiNode* m2_1 = new TuiNodeDateTime(N_("Current date/time"), TuiNode* m2_1 = new TuiNodeDateTime(N_("Current date/time"),
core, core,
SLOT(setJD(double)), SLOT(setJD(double)),
core->getJD(), core->getJD(),
m2); m2);
TuiNode* m2_2 = new TuiNode(N_("Set time zone"), m2, m2_1); TuiNode* m2_2 = new TuiNode(N_("Set time zone"), m2, m2_1); // GZ Th
TuiNode* m2_3 = new TuiNode(N_("Day keys"), m2, m2_2); is is inactive(?)
TuiNode* m2_3 = new TuiNode(N_("Day keys"), m2, m2_2); // GZ Th
is is inactive(?)
TuiNode* m2_4 = new TuiNodeDateTime(N_("Startup date/time preset"), TuiNode* m2_4 = new TuiNodeDateTime(N_("Startup date/time preset"),
core, core,
SLOT(setPresetSkyTime(double)), SLOT(setPresetSkyTime(double)),
core->getPresetSkyTime(),
core->getPresetSkyTime(), m2, m2_3);
m2, m2_3);
QStringList startupModes; QStringList startupModes;
// TRANSLATORS: The current system time is used at startup // TRANSLATORS: The current system time is used at startup
startupModes << N_("system"); startupModes << N_("system");
// TRANSLATORS: A pre-set time is used at startup // TRANSLATORS: A pre-set time is used at startup
startupModes << N_("preset"); startupModes << N_("preset");
TuiNode* m2_5 = new TuiNodeEnum(N_("Startup date and time"), TuiNode* m2_5 = new TuiNodeEnum(N_("Startup date and time"),
this, SLOT(setStartupDateMode(QStrin g)), this, SLOT(setStartupDateMode(QStrin g)),
startupModes, startupModes,
core ->getStartupTimeMode(), core ->getStartupTimeMode(),
m2, m2_4); m2, m2_4);
skipping to change at line 232 skipping to change at line 232
TuiNode* m3 = new TuiNode(N_("General"), NULL, m2); TuiNode* m3 = new TuiNode(N_("General"), NULL, m2);
m2->setNextNode(m3); m2->setNextNode(m3);
StelSkyCultureMgr& skyCultureMgr = StelApp::getInstance().getSkyCult ureMgr(); StelSkyCultureMgr& skyCultureMgr = StelApp::getInstance().getSkyCult ureMgr();
TuiNode* m3_1 = new TuiNodeEnum(N_("Starlore"), TuiNode* m3_1 = new TuiNodeEnum(N_("Starlore"),
this, this,
SLOT(setSkyCulture(QString)), SLOT(setSkyCulture(QString)),
skyCultureMgr.getSkyCultureListI18() , skyCultureMgr.getSkyCultureListI18() ,
skyCultureMgr.getCurrentSkyCultureNa meI18(), skyCultureMgr.getCurrentSkyCultureNa meI18(),
m3); m3);
TuiNode* m3_2 = new TuiNodeEnum(N_("Language"), TuiNode* m3_2 = new TuiNodeEnum(N_("Sky Language"),
this, this,
SLOT(setAppLanguage(QString)), SLOT(setSkyLanguage(QString)),
Stel StelTranslator::globalTranslator->ge
Translator::globalTranslator->getAvailableLanguagesNamesNative(StelFileMgr: tAvailableLanguagesNamesNative(StelFileMgr::getLocaleDir()),
:getLocaleDir()), StelTranslator::iso639_1CodeToNative
StelTranslator::iso639_1CodeToNative Name(localeMgr.getSkyLanguage()),
Name(localeMgr.getAppLanguage()),
m3, m3_1); m3, m3_1);
TuiNode* m3_3 = new TuiNodeEnum(N_("App Language"),
this,
SLOT(setAppLanguage(QString)),
StelTranslator::globalTranslator->ge
tAvailableLanguagesNamesNative(StelFileMgr::getLocaleDir()),
StelTranslator::iso639_1CodeToNative
Name(localeMgr.getAppLanguage()),
m3, m3_1);
m3_1->setNextNode(m3_2); m3_1->setNextNode(m3_2);
m3_2->setNextNode(m3_1); m3_2->setNextNode(m3_3);
m3_3->setNextNode(m3_1);
m3_1->loopToTheLast(); m3_1->loopToTheLast();
m3->setChildNode(m3_1); m3->setChildNode(m3_1);
TuiNode* m4 = new TuiNode(N_("Stars"), NULL, m3); TuiNode* m4 = new TuiNode(N_("Stars"), NULL, m3);
m3->setNextNode(m4); m3->setNextNode(m4);
StarMgr* starMgr = GETSTELMODULE(StarMgr); StarMgr* starMgr = GETSTELMODULE(StarMgr);
TuiNode* m4_1 = new TuiNodeBool(N_("Show stars"), TuiNode* m4_1 = new TuiNodeBool(N_("Show stars"),
starMgr, SLOT(setFlagStars(bool)), starMgr, SLOT(setFlagStars(bool)),
starMgr->getFlagStars(), m4); starMgr->getFlagStars(), m4);
StelSkyDrawer* skyDrawer = core->getSkyDrawer(); StelSkyDrawer* skyDrawer = core->getSkyDrawer();
skipping to change at line 287 skipping to change at line 294
TuiNode* m5_1 = new TuiNodeColor(N_("Constellation lines"), TuiNode* m5_1 = new TuiNodeColor(N_("Constellation lines"),
constellationMgr, constellationMgr,
SLOT(setLinesColor(Vec3f)), SLOT(setLinesColor(Vec3f)),
constellationMgr->getLinesColor(), constellationMgr->getLinesColor(),
m5); m5);
TuiNode* m5_2 = new TuiNodeColor(N_("Constellation labels"), TuiNode* m5_2 = new TuiNodeColor(N_("Constellation labels"),
constellationMgr, constellationMgr,
SLOT(setLabelsColor(Vec3f)), SLOT(setLabelsColor(Vec3f)),
constellationMgr->getLabelsColor(), constellationMgr->getLabelsColor(),
m5, m5_1); m5, m5_1);
TuiNode* m5_3 = new TuiNode(N_("Constellation art"), m5, m5_2); // TuiNode* m5_3 = new TuiNode(N_("Constellation art"), m5, m5_2); // d
ysfunctional duplicate dummy
// TRANSLATORS: Refers to constellation art
TuiNode* m5_3 = new TuiNodeFloat(N_("Art brightness:"),
constellationMgr,
SLOT(setArtIntensity(float)),
constellationMgr->getArtIntensity(
),
0.0, 1.0, 0.05,
m5, m5_2);
TuiNode* m5_4 = new TuiNodeColor(N_("Constellation boundaries"), TuiNode* m5_4 = new TuiNodeColor(N_("Constellation boundaries"),
constellationMgr, constellationMgr,
SLOT(setBoundariesColor(Vec3f)), SLOT(setBoundariesColor(Vec3f)),
constellationMgr->getBoundariesColo r(), constellationMgr->getBoundariesColo r(),
m5, m5_3); m5, m5_3);
// TRANSLATORS: Refers to constellation art
TuiNode* m5_5 = new TuiNodeDouble(N_("Art brightness:"),
constellationMgr,
SLOT(setArtIntensity(double)),
constellationMgr->getArtIntensity(
),
0.0, 1.0, 0.05,
m5, m5_4);
LandscapeMgr* landscapeMgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr* landscapeMgr = GETSTELMODULE(LandscapeMgr);
TuiNode* m5_6 = new TuiNodeColor(N_("Cardinal points"), TuiNode* m5_5 = new TuiNodeColor(N_("Cardinal points"),
landscapeMgr, landscapeMgr,
SLOT(setColorCardinalPoints(Vec3f)) , SLOT(setColorCardinalPoints(Vec3f)) ,
landscapeMgr->getColorCardinalPoint s(), landscapeMgr->getColorCardinalPoint s(),
m5, m5_5); m5, m5_4);
TuiNode* m5_7 = new TuiNodeColor(N_("Planet labels"), TuiNode* m5_6 = new TuiNodeColor(N_("Planet labels"),
solarSystem, SLOT(setLabelsColor(Ve c3f)), solarSystem, SLOT(setLabelsColor(Ve c3f)),
solarSystem->getLabelsColor(), solarSystem->getLabelsColor(),
m5, m5_6); m5, m5_5);
TuiNode* m5_8 = new TuiNodeColor(N_("Planet orbits"), TuiNode* m5_7 = new TuiNodeColor(N_("Planet orbits"),
solarSystem, SLOT(setOrbitsColor(Ve c3f)), solarSystem, SLOT(setOrbitsColor(Ve c3f)),
solarSystem->getOrbitsColor(), solarSystem->getOrbitsColor(),
m5, m5_7); m5, m5_6);
TuiNode* m5_9 = new TuiNodeColor(N_("Planet trails"), TuiNode* m5_8 = new TuiNodeColor(N_("Planet trails"),
solarSystem, SLOT(setTrailsColor(Ve c3f)), solarSystem, SLOT(setTrailsColor(Ve c3f)),
solarSystem->getTrailsColor(), solarSystem->getTrailsColor(),
m5, m5_8); m5, m5_7);
GridLinesMgr* gridLinesMgr = GETSTELMODULE(GridLinesMgr); GridLinesMgr* gridLinesMgr = GETSTELMODULE(GridLinesMgr);
TuiNode* m5_10 = new TuiNodeColor(N_("Meridian line"), TuiNode* m5_9 = new TuiNodeColor(N_("Meridian line"),
gridLinesMgr, gridLinesMgr,
SLOT(setColorMeridianLine(Vec3f)), SLOT(setColorMeridianLine(Vec3f)),
gridLinesMgr->getColorMeridianLine( ), gridLinesMgr->getColorMeridianLine( ),
m5, m5_9); m5, m5_8);
TuiNode* m5_11 = new TuiNodeColor(N_("Azimuthal grid"), TuiNode* m5_10 = new TuiNodeColor(N_("Azimuthal grid"),
gridLinesMgr, gridLinesMgr,
SLOT(setColorAzimuthalGrid(Vec3f)), SLOT(setColorAzimuthalGrid(Vec3f)),
gridLinesMgr->getColorAzimuthalGrid (), gridLinesMgr->getColorAzimuthalGrid (),
m5, m5_10); m5, m5_9);
TuiNode* m5_12 = new TuiNodeColor(N_("Equatorial grid"), TuiNode* m5_11 = new TuiNodeColor(N_("Equatorial grid"),
gridLinesMgr, gridLinesMgr,
SLOT(setColorEquatorGrid(Vec3f)), SLOT(setColorEquatorGrid(Vec3f)),
gridLinesMgr->getColorEquatorGrid() , gridLinesMgr->getColorEquatorGrid() ,
m5, m5_11); m5, m5_10);
TuiNode* m5_13 = new TuiNodeColor(N_("Equatorial J2000 grid"), TuiNode* m5_12 = new TuiNodeColor(N_("Equatorial J2000 grid"),
gridLinesMgr, gridLinesMgr,
SLOT(setColorEquatorJ2000Grid(Vec3f )), SLOT(setColorEquatorJ2000Grid(Vec3f )),
gridLinesMgr->getColorEquatorJ2000G rid(), gridLinesMgr->getColorEquatorJ2000G rid(),
m5, m5_12); m5, m5_11);
TuiNode* m5_14 = new TuiNodeColor(N_("Equator line"), TuiNode* m5_13 = new TuiNodeColor(N_("Equator line"),
gridLinesMgr, gridLinesMgr,
SLOT(setColorEquatorLine(Vec3f)), SLOT(setColorEquatorLine(Vec3f)),
gridLinesMgr->getColorEquatorLine() , gridLinesMgr->getColorEquatorLine() ,
m5, m5_13); m5, m5_12);
TuiNode* m5_15 = new TuiNodeColor(N_("Ecliptic line"), TuiNode* m5_14 = new TuiNodeColor(N_("Ecliptic line"),
gridLinesMgr, gridLinesMgr,
SLOT(setColorEclipticLine(Vec3f)), SLOT(setColorEclipticLine(Vec3f)),
gridLinesMgr->getColorEclipticLine( ), gridLinesMgr->getColorEclipticLine( ),
m5, m5_13);
TuiNode* m5_15 = new TuiNodeColor(N_("Ecliptic line (J2000)"),
gridLinesMgr,
SLOT(setColorEclipticJ2000Line(Vec3
f)),
gridLinesMgr->getColorEclipticJ2000
Line(),
m5, m5_14); m5, m5_14);
// TODO: Add all other lines/grids, sort and label in a consistent manner, and put DSO stuff behind. Update Guide.
NebulaMgr* nebulaMgr = GETSTELMODULE(NebulaMgr); NebulaMgr* nebulaMgr = GETSTELMODULE(NebulaMgr);
TuiNode* m5_16 = new TuiNodeColor(N_("Nebula names"), TuiNode* m5_16 = new TuiNodeColor(N_("Nebula names"),
nebulaMgr, SLOT(setLabelsColor(Vec3 f)), nebulaMgr, SLOT(setLabelsColor(Vec3 f)),
nebulaMgr->getLabelsColor(), nebulaMgr->getLabelsColor(),
m5, m5_15); m5, m5_15);
TuiNode* m5_17 = new TuiNodeColor(N_("Nebula hints"), TuiNode* m5_17 = new TuiNodeColor(N_("Nebula hints"),
nebulaMgr, SLOT(setCirclesColor(Ve c3f)), nebulaMgr, SLOT(setCirclesColor(Ve c3f)),
nebulaMgr->getCirclesColor(), nebulaMgr->getCirclesColor(),
m5, m5_16); m5, m5_16);
TuiNode* m5_18 = new TuiNodeColor(N_("Galaxy hints"), TuiNode* m5_18 = new TuiNodeColor(N_("Galaxy hints"),
skipping to change at line 394 skipping to change at line 407
TuiNode* m5_24 = new TuiNodeColor(N_("Galactic equator line"), TuiNode* m5_24 = new TuiNodeColor(N_("Galactic equator line"),
gridLinesMgr, gridLinesMgr,
SLOT(setColorGalacticEquatorLine(Ve c3f)), SLOT(setColorGalacticEquatorLine(Ve c3f)),
gridLinesMgr->getColorGalacticEquat orLine(), gridLinesMgr->getColorGalacticEquat orLine(),
m5, m5_23); m5, m5_23);
TuiNode* m5_25 = new TuiNodeColor(N_("Opposition/conjunction longitu de line"), TuiNode* m5_25 = new TuiNodeColor(N_("Opposition/conjunction longitu de line"),
gridLinesMgr, gridLinesMgr,
SLOT(setColorLongitudeLine(Vec3f)), SLOT(setColorLongitudeLine(Vec3f)),
gridLinesMgr->getColorLongitudeLine (), gridLinesMgr->getColorLongitudeLine (),
m5, m5_24); m5, m5_24);
m5_1->setNextNode(m5_2); m5_1->setNextNode(m5_2);
m5_2->setNextNode(m5_3); m5_2->setNextNode(m5_3);
m5_3->setNextNode(m5_4); m5_3->setNextNode(m5_4);
m5_4->setNextNode(m5_5); m5_4->setNextNode(m5_5);
m5_5->setNextNode(m5_6); m5_5->setNextNode(m5_6);
m5_6->setNextNode(m5_7); m5_6->setNextNode(m5_7);
m5_7->setNextNode(m5_8); m5_7->setNextNode(m5_8);
m5_8->setNextNode(m5_9); m5_8->setNextNode(m5_9);
m5_9->setNextNode(m5_10); m5_9->setNextNode(m5_10);
m5_10->setNextNode(m5_11); m5_10->setNextNode(m5_11);
skipping to change at line 426 skipping to change at line 438
m5_22->setNextNode(m5_23); m5_22->setNextNode(m5_23);
m5_23->setNextNode(m5_24); m5_23->setNextNode(m5_24);
m5_24->setNextNode(m5_25); m5_24->setNextNode(m5_25);
m5_25->setNextNode(m5_1); m5_25->setNextNode(m5_1);
m5_1->loopToTheLast(); m5_1->loopToTheLast();
m5->setChildNode(m5_1); m5->setChildNode(m5_1);
TuiNode* m6 = new TuiNode(N_("Effects"), NULL, m5); TuiNode* m6 = new TuiNode(N_("Effects"), NULL, m5);
m5->setNextNode(m6); m5->setNextNode(m6);
TuiNode* m6_1 = new TuiNodeInt(N_("Light pollution:"), TuiNode* m6_1 = new TuiNodeInt(N_("Light pollution:"),
this, skyDrawer,
SLOT(setBortleScale(int)), SLOT(setBortleScaleIndex(int)),
3, 1, 9, 1, skyDrawer->getBortleScaleIndex(), 1,
9, 1,
m6); m6);
TuiNode* m6_2 = new TuiNodeEnum(N_("Landscape"), TuiNode* m6_2 = new TuiNodeEnum(N_("Landscape"),
landscapeMgr, landscapeMgr,
SLOT(setCurrentLandscapeName(QString )), SLOT(setCurrentLandscapeName(QString )),
landscapeMgr->getAllLandscapeNames() , landscapeMgr->getAllLandscapeNames() ,
landscapeMgr->getCurrentLandscapeNam e(), landscapeMgr->getCurrentLandscapeNam e(),
m6, m6_1); m6, m6_1);
TuiNode* m6_3 = new TuiNodeBool(N_("Setting landscape sets location"
),
landscapeMgr,
SLOT(setFlagLandscapeSetsLocation(bo
ol)),
landscapeMgr->getFlagLandscapeSetsLo
cation(),
m6, m6_2);
StelMovementMgr* movementMgr = GETSTELMODULE(StelMovementMgr); StelMovementMgr* movementMgr = GETSTELMODULE(StelMovementMgr);
TuiNode* m6_3 = new TuiNodeBool(N_("Manual zoom"), TuiNode* m6_4 = new TuiNodeBool(N_("Auto zoom out returns to initial direction of view"),
movementMgr, movementMgr,
SLOT(setFlagAutoZoomOutResetsDirecti on(bool)), SLOT(setFlagAutoZoomOutResetsDirecti on(bool)),
movementMgr->getFlagAutoZoomOutReset sDirection(), movementMgr->getFlagAutoZoomOutReset sDirection(),
m6, m6_2); m6, m6_3);
TuiNode* m6_4 = new TuiNode(N_("Magnitude scaling multiplier"), TuiNode* m6_5 = new TuiNodeFloat(N_("Zoom duration:"),
m6, m6_3); movementMgr,
TuiNode* m6_5 = new TuiNodeDouble(N_("Milky Way intensity:"), SLOT(setAutoMoveDuration(float)),
movementMgr->getAutoMoveDuration(),
0, 20.0, 0.1,
m6, m6_4);
// TuiNode* m6_4 = new TuiNode(N_("Magnitude scaling multiplier"), m6,
m6_3); // No longer used. Use 4.2, 4.3 instead.
TuiNode* m6_6 = new TuiNodeDouble(N_("Milky Way intensity:"),
GETSTELMODULE(MilkyWay), GETSTELMODULE(MilkyWay),
SLOT(setIntensity(double)), SLOT(setIntensity(double)),
GETSTELMODULE(MilkyWay)->getIntensi ty(), GETSTELMODULE(MilkyWay)->getIntensi ty(),
0, 10.0, 0.1, 0, 10.0, 0.1,
m6, m6_4); m6, m6_5);
TuiNode* m6_6 = new TuiNodeDouble(N_("Zodiacal light intensity:"), TuiNode* m6_7 = new TuiNodeDouble(N_("Zodiacal light intensity:"),
GETSTELMODULE(ZodiacalLight), GETSTELMODULE(ZodiacalLight),
SLOT(setIntensity(double)), SLOT(setIntensity(double)),
GETSTELMODULE(ZodiacalLight)->getIn tensity(), GETSTELMODULE(ZodiacalLight)->getIn tensity(),
0, 10.0, 0.1, 0, 10.0, 0.1,
m6, m6_5); m6, m6_6);
TuiNode* m6_7 = new TuiNode(N_("Nebula label frequency:"), m6, m6_6) // TuiNode* m6_8 = new TuiNode(N_("Nebula label frequency:"), m6, m6_7)
; ; // INACTIVE. Reactivate?
TuiNode* m6_8 = new TuiNodeFloat(N_("Zoom duration:"), // TuiNode* m6_9 = new TuiNode(N_("Cursor timeout:"), m6, m6_8);
movementMgr,
SLOT(setAutoMoveDuration(float)),
movementMgr->getAutoMoveDuration(),
0, 20.0, 0.1,
m6, m6_7);
TuiNode* m6_9 = new TuiNode(N_("Cursor timeout:"), m6, m6_8);
TuiNode* m6_10 = new TuiNodeBool(N_("Setting landscape sets location
"),
landscapeMgr,
SLOT(setFlagLandscapeSetsLocation(bo
ol)),
landscapeMgr->getFlagLandscapeSetsLo
cation(),
m6, m6_9);
m6_1->setNextNode(m6_2); m6_1->setNextNode(m6_2);
m6_2->setNextNode(m6_3); m6_2->setNextNode(m6_3);
m6_3->setNextNode(m6_4); m6_3->setNextNode(m6_4);
m6_4->setNextNode(m6_5); m6_4->setNextNode(m6_5);
m6_5->setNextNode(m6_6); m6_5->setNextNode(m6_6);
m6_6->setNextNode(m6_7); m6_6->setNextNode(m6_7);
m6_7->setNextNode(m6_8); m6_7->setNextNode(m6_1);
m6_8->setNextNode(m6_9); // m6_8->setNextNode(m6_9);
m6_9->setNextNode(m6_10); // m6_9->setNextNode(m6_10);
m6_10->setNextNode(m6_1); // m6_10->setNextNode(m6_1);
m6_1->loopToTheLast(); m6_1->loopToTheLast();
m6->setChildNode(m6_1); m6->setChildNode(m6_1);
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
TuiNode* m7 = new TuiNode(N_("Scripts"), NULL, m6); TuiNode* m7 = new TuiNode(N_("Scripts"), NULL, m6);
m6->setNextNode(m7); m6->setNextNode(m7);
StelScriptMgr& scriptMgr = StelApp::getInstance().getScriptMgr(); StelScriptMgr& scriptMgr = StelApp::getInstance().getScriptMgr();
TuiNode* m7_1 = new TuiNodeEnum(N_("Run local script"), TuiNode* m7_1 = new TuiNodeEnum(N_("Run local script"),
&scriptMgr, &scriptMgr,
SLOT(runScript(QString)), SLOT(runScript(QString)),
scriptMgr.getScriptList(), scriptMgr.getScriptList(),
"", "",
m7); m7);
TuiNode* m7_2 = new TuiNodeActivate(N_("Stop running script"), TuiNode* m7_2 = new TuiNodeActivate(N_("Stop running script"),
&scriptMgr, SLOT(stopScript()), &scriptMgr, SLOT(stopScript()),
m7, m7_1); m7, m7_1);
TuiNode* m7_3 = new TuiNode(N_("CD/DVD script"), m7, m7_2); // TuiNode* m7_3 = new TuiNode(N_("CD/DVD script"), m7, m7_2); // Dead node.
m7_1->setNextNode(m7_2); m7_1->setNextNode(m7_2);
m7_2->setNextNode(m7_3); m7_2->setNextNode(m7_1);
m7_3->setNextNode(m7_1); // m7_3->setNextNode(m7_1);
m7_1->loopToTheLast(); m7_1->loopToTheLast();
m7->setChildNode(m7_1); m7->setChildNode(m7_1);
TuiNode* m8 = new TuiNode(N_("Administration"), NULL, m7); TuiNode* m8 = new TuiNode(N_("Administration"), NULL, m7);
m7->setNextNode(m8); m7->setNextNode(m8);
#endif #else
#ifdef DISABLE_SCRIPTING
TuiNode* m8 = new TuiNode(N_("Administration"), NULL, m6); TuiNode* m8 = new TuiNode(N_("Administration"), NULL, m6);
m6->setNextNode(m8); m6->setNextNode(m8);
#endif #endif
m8->setNextNode(m1); m8->setNextNode(m1);
m1->loopToTheLast(); m1->loopToTheLast();
TuiNode* m8_1 = new TuiNode(N_("Load default configuration"), m8); TuiNode* m8_1 = new TuiNode(N_("Load default configuration"), m8);
TuiNode* m8_2 = new TuiNodeActivate(N_("Save current configuration") , TuiNode* m8_2 = new TuiNodeActivate(N_("Save current configuration") ,
this, SLOT(saveDefaultSettings() ), this, SLOT(saveDefaultSettings() ),
m8, m8_1); m8, m8_1);
TuiNode* m8_3 = new TuiNodeActivate(N_("Shut down"), this, SLOT(shut Down()), TuiNode* m8_3 = new TuiNodeActivate(N_("Shut down"), this, SLOT(shut Down()),
skipping to change at line 658 skipping to change at line 668
void TextUserInterface::handleKeys(QKeyEvent* event) void TextUserInterface::handleKeys(QKeyEvent* event)
{ {
if (currentNode == NULL) if (currentNode == NULL)
{ {
qWarning() << "WARNING: no current node in TextUserInterface plugin"; qWarning() << "WARNING: no current node in TextUserInterface plugin";
event->setAccepted(false); event->setAccepted(false);
return; return;
} }
if (event->type()==QEvent::KeyPress && event->key()==Qt::Key_M) if (event->type()==QEvent::KeyPress && (event->modifiers() & Qt::Alt Modifier) && event->key()==Qt::Key_T)
{ {
tuiActive = ! tuiActive; tuiActive = ! tuiActive;
dummyDialog.close(); dummyDialog.close();
event->setAccepted(true); event->setAccepted(true);
return; return;
} }
if (!tuiActive) if (!tuiActive)
{ {
event->setAccepted(false); event->setAccepted(false);
skipping to change at line 766 skipping to change at line 776
void TextUserInterface::setSkyCulture(QString i18) void TextUserInterface::setSkyCulture(QString i18)
{ {
StelApp::getInstance().getSkyCultureMgr().setCurrentSkyCultureNameI1 8(i18); StelApp::getInstance().getSkyCultureMgr().setCurrentSkyCultureNameI1 8(i18);
} }
void TextUserInterface::setAppLanguage(QString lang) void TextUserInterface::setAppLanguage(QString lang)
{ {
QString code = StelTranslator::nativeNameToIso639_1Code(lang); QString code = StelTranslator::nativeNameToIso639_1Code(lang);
StelApp::getInstance().getLocaleMgr().setAppLanguage(code); StelApp::getInstance().getLocaleMgr().setAppLanguage(code);
}
void TextUserInterface::setSkyLanguage(QString lang)
{
QString code = StelTranslator::nativeNameToIso639_1Code(lang);
StelApp::getInstance().getLocaleMgr().setSkyLanguage(code); StelApp::getInstance().getLocaleMgr().setSkyLanguage(code);
} }
void TextUserInterface::saveDefaultSettings(void) void TextUserInterface::saveDefaultSettings(void)
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
Q_ASSERT(lmgr); Q_ASSERT(lmgr);
skipping to change at line 842 skipping to change at line 857
conf->setValue("color/longitude_color", colToConf(glmgr->getColorLon gitudeLine())); conf->setValue("color/longitude_color", colToConf(glmgr->getColorLon gitudeLine()));
conf->setValue("color/azimuthal_color", colToConf(glmgr->getColorAzi muthalGrid())); conf->setValue("color/azimuthal_color", colToConf(glmgr->getColorAzi muthalGrid()));
conf->setValue("color/equator_color", colToConf(glmgr->getColorEquat orGrid())); conf->setValue("color/equator_color", colToConf(glmgr->getColorEquat orGrid()));
conf->setValue("color/equatorial_J2000_color", colToConf(glmgr->getC olorEquatorJ2000Grid())); conf->setValue("color/equatorial_J2000_color", colToConf(glmgr->getC olorEquatorJ2000Grid()));
conf->setValue("color/equator_color", colToConf(glmgr->getColorEquat orLine())); conf->setValue("color/equator_color", colToConf(glmgr->getColorEquat orLine()));
conf->setValue("color/ecliptic_color", colToConf(glmgr->getColorEcli pticLine())); conf->setValue("color/ecliptic_color", colToConf(glmgr->getColorEcli pticLine()));
conf->setValue("color/nebula_label_color", colToConf(nmgr->getLabels Color())); conf->setValue("color/nebula_label_color", colToConf(nmgr->getLabels Color()));
conf->setValue("color/nebula_circle_color", colToConf(nmgr->getCircl esColor())); conf->setValue("color/nebula_circle_color", colToConf(nmgr->getCircl esColor()));
// sub-menu 6: effects // sub-menu 6: effects
conf->setValue("stars/init_bortle_scale", lmgr->getAtmosphereBortleL ightPollution()); conf->setValue("stars/init_bortle_scale", skyd->getBortleScaleIndex( ));
lmgr->setDefaultLandscapeID(lmgr->getCurrentLandscapeID()); lmgr->setDefaultLandscapeID(lmgr->getCurrentLandscapeID());
conf->setValue("navigation/auto_zoom_out_resets_direction", mvmgr->g etFlagAutoZoomOutResetsDirection()); conf->setValue("navigation/auto_zoom_out_resets_direction", mvmgr->g etFlagAutoZoomOutResetsDirection());
conf->setValue("astro/milky_way_intensity", milk->getIntensity()); conf->setValue("astro/milky_way_intensity", milk->getIntensity());
conf->setValue("navigation/auto_move_duration", mvmgr->getAutoMoveDu ration()); conf->setValue("navigation/auto_move_duration", mvmgr->getAutoMoveDu ration());
conf->setValue("landscape/flag_landscape_sets_location", lmgr->getFl agLandscapeSetsLocation()); conf->setValue("landscape/flag_landscape_sets_location", lmgr->getFl agLandscapeSetsLocation());
// GLOBAL DISPLAY SETTINGS // GLOBAL DISPLAY SETTINGS
// TODO // TODO
qDebug() << "TextUserInterface::saveDefaultSettings done"; qDebug() << "TextUserInterface::saveDefaultSettings done";
skipping to change at line 864 skipping to change at line 879
void TextUserInterface::shutDown() void TextUserInterface::shutDown()
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
QString shutdownCmd = QDir::fromNativeSeparators(conf->value("tui/ad min_shutdown_cmd", "").toString()); QString shutdownCmd = QDir::fromNativeSeparators(conf->value("tui/ad min_shutdown_cmd", "").toString());
int err; int err;
if (!(err = QProcess::execute(shutdownCmd))) { if (!(err = QProcess::execute(shutdownCmd))) {
qDebug() << "[TextUserInterface] shutdown error, QProcess::e xecute():" << err; qDebug() << "[TextUserInterface] shutdown error, QProcess::e xecute():" << err;
} }
} }
void TextUserInterface::setBortleScale(int bortle)
{
LandscapeMgr* landscapeMgr = GETSTELMODULE(LandscapeMgr);
StelSkyDrawer* skyDrawer = StelApp::getInstance().getCore()->getSkyD
rawer();
landscapeMgr->setAtmosphereBortleLightPollution(bortle);
skyDrawer->setBortleScaleIndex(bortle);
}
 End of changes. 39 change blocks. 
84 lines changed or deleted 106 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/