TextUserInterface.cpp   TextUserInterface.cpp 
skipping to change at line 64 skipping to change at line 64
#endif #endif
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelGuiItems.hpp"// Funny thing to include in a TEXT user interfa ce... #include "StelGuiItems.hpp"// Funny thing to include in a TEXT user interfa ce...
#include <QKeyEvent> #include <QKeyEvent>
#include <QDebug> #include <QDebug>
#include <QLabel> #include <QLabel>
#include <QTime> #include <QTime>
#include <QProcess> #include <QProcess>
#include <QDir> #include <QDir>
#ifdef DISABLE_SCRIPTING #include <QSettings>
#include "QSettings" // WTF?
#endif
/************************************************************************* /*************************************************************************
Utility functions Utility functions
*************************************************************************/ *************************************************************************/
QString colToConf(const Vec3f& c) QString colToConf(const Vec3f& c)
{ {
return QString("%1,%2,%3").arg(c[0],2,'f',2).arg(c[1],2,'f',2).arg(c [2],2,'f',2); return QString("%1,%2,%3").arg(c[0],2,'f',2).arg(c[1],2,'f',2).arg(c [2],2,'f',2);
} }
/************************************************************************* /*************************************************************************
skipping to change at line 144 skipping to change at line 142
{ {
//Reusing translations: The translators will have to do less work if the //Reusing translations: The translators will have to do less work if the
//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"));
m1->setParent(this);
TuiNode* m1_1 = new TuiNodeDouble(N_("Latitude:"), TuiNode* m1_1 = new TuiNodeDouble(N_("Latitude:"),
this, SLOT(setLatitude(double)), this, SLOT(setLatitude(double)),
getLatitude(), -90, 90, 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,
-450, 200000, 100, m1, m1_2); -450, 200000, 100, m1, m1_2);
skipping to change at line 171 skipping to change at line 170
core->getCurrentLocation().planetNam e, core->getCurrentLocation().planetNam e,
m1, m1_3); m1, m1_3);
m1_1->setNextNode(m1_2); m1_1->setNextNode(m1_2);
m1_2->setNextNode(m1_3); m1_2->setNextNode(m1_3);
m1_3->setNextNode(m1_4); m1_3->setNextNode(m1_4);
m1_4->setNextNode(m1_1); m1_4->setNextNode(m1_1);
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);
m2->setParent(this);
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); // GZ Th is is inactive(?) TuiNode* m2_2 = new TuiNode(N_("Set time zone"), m2, m2_1); // GZ Th is is inactive(?)
TuiNode* m2_3 = new TuiNode(N_("Day keys"), m2, m2_2); // GZ Th 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,
skipping to change at line 224 skipping to change at line 224
m2_2->setNextNode(m2_3); m2_2->setNextNode(m2_3);
m2_3->setNextNode(m2_4); m2_3->setNextNode(m2_4);
m2_4->setNextNode(m2_5); m2_4->setNextNode(m2_5);
m2_5->setNextNode(m2_6); m2_5->setNextNode(m2_6);
m2_6->setNextNode(m2_7); m2_6->setNextNode(m2_7);
m2_7->setNextNode(m2_1); m2_7->setNextNode(m2_1);
m2_1->loopToTheLast(); m2_1->loopToTheLast();
m2->setChildNode(m2_1); m2->setChildNode(m2_1);
TuiNode* m3 = new TuiNode(N_("General"), NULL, m2); TuiNode* m3 = new TuiNode(N_("General"), NULL, m2);
m3->setParent(this);
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_("Sky Language"), TuiNode* m3_2 = new TuiNodeEnum(N_("Sky Language"),
this, this,
skipping to change at line 251 skipping to change at line 252
StelTranslator::globalTranslator->ge tAvailableLanguagesNamesNative(StelFileMgr::getLocaleDir()), StelTranslator::globalTranslator->ge tAvailableLanguagesNamesNative(StelFileMgr::getLocaleDir()),
StelTranslator::iso639_1CodeToNative Name(localeMgr.getAppLanguage()), StelTranslator::iso639_1CodeToNative Name(localeMgr.getAppLanguage()),
m3, m3_1); m3, m3_1);
m3_1->setNextNode(m3_2); m3_1->setNextNode(m3_2);
m3_2->setNextNode(m3_3); m3_2->setNextNode(m3_3);
m3_3->setNextNode(m3_1); 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);
m4->setParent(this);
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();
TuiNode* m4_2 = new TuiNodeDouble(N_("Relative scale:"), TuiNode* m4_2 = new TuiNodeDouble(N_("Relative scale:"),
skyDrawer, skyDrawer,
SLOT(setRelativeStarScale(double)) , SLOT(setRelativeStarScale(double)) ,
skyDrawer->getRelativeStarScale(), skyDrawer->getRelativeStarScale(),
skipping to change at line 282 skipping to change at line 284
0.0, 1.5, 0.1, 0.0, 1.5, 0.1,
m4, m4_3); m4, m4_3);
m4_1->setNextNode(m4_2); m4_1->setNextNode(m4_2);
m4_2->setNextNode(m4_3); m4_2->setNextNode(m4_3);
m4_3->setNextNode(m4_4); m4_3->setNextNode(m4_4);
m4_4->setNextNode(m4_1); m4_4->setNextNode(m4_1);
m4_1->loopToTheLast(); m4_1->loopToTheLast();
m4->setChildNode(m4_1); m4->setChildNode(m4_1);
TuiNode* m5 = new TuiNode(N_("Colors"), NULL, m4); TuiNode* m5 = new TuiNode(N_("Colors"), NULL, m4);
m5->setParent(this);
m4->setNextNode(m5); m4->setNextNode(m5);
ConstellationMgr* constellationMgr = GETSTELMODULE(ConstellationMgr) ; ConstellationMgr* constellationMgr = GETSTELMODULE(ConstellationMgr) ;
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)),
skipping to change at line 436 skipping to change at line 439
m5_20->setNextNode(m5_21); m5_20->setNextNode(m5_21);
m5_21->setNextNode(m5_22); m5_21->setNextNode(m5_22);
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);
m6->setParent(this);
m5->setNextNode(m6); m5->setNextNode(m6);
TuiNode* m6_1 = new TuiNodeInt(N_("Light pollution:"), TuiNode* m6_1 = new TuiNodeInt(N_("Light pollution:"),
skyDrawer, skyDrawer,
SLOT(setBortleScaleIndex(int)), SLOT(setBortleScaleIndex(int)),
skyDrawer->getBortleScaleIndex(), 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() ,
skipping to change at line 465 skipping to change at line 469
movementMgr, movementMgr,
SLOT(setFlagAutoZoomOutResetsDirecti on(bool)), SLOT(setFlagAutoZoomOutResetsDirecti on(bool)),
movementMgr->getFlagAutoZoomOutReset sDirection(), movementMgr->getFlagAutoZoomOutReset sDirection(),
m6, m6_3); m6, m6_3);
TuiNode* m6_5 = new TuiNodeFloat(N_("Zoom duration:"), TuiNode* m6_5 = new TuiNodeFloat(N_("Zoom duration:"),
movementMgr, movementMgr,
SLOT(setAutoMoveDuration(float)), SLOT(setAutoMoveDuration(float)),
movementMgr->getAutoMoveDuration(), movementMgr->getAutoMoveDuration(),
0, 20.0, 0.1, 0, 20.0, 0.1,
m6, m6_4); 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:"), 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_5); m6, m6_5);
TuiNode* m6_7 = 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_6); m6, m6_6);
// TuiNode* m6_8 = new TuiNode(N_("Nebula label frequency:"), m6, m6_7)
; // INACTIVE. Reactivate?
// TuiNode* m6_9 = new TuiNode(N_("Cursor timeout:"), m6, m6_8);
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_1); m6_7->setNextNode(m6_1);
// m6_8->setNextNode(m6_9);
// m6_9->setNextNode(m6_10);
// 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);
m7->setParent(this);
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); // Dead node. // 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_1); 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);
m8->setParent(this);
m7->setNextNode(m8); m7->setNextNode(m8);
#else #else
TuiNode* m8 = new TuiNode(N_("Administration"), NULL, m6); TuiNode* m8 = new TuiNode(N_("Administration"), NULL, m6);
m8->setParent(this);
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()),
m8, m8_2); m8, m8_2);
skipping to change at line 847 skipping to change at line 848
// sub-menu 5: colors // sub-menu 5: colors
conf->setValue("color/const_lines_color", colToConf(cmgr->getLinesCo lor())); conf->setValue("color/const_lines_color", colToConf(cmgr->getLinesCo lor()));
conf->setValue("color/const_names_color", colToConf(cmgr->getLabelsC olor())); conf->setValue("color/const_names_color", colToConf(cmgr->getLabelsC olor()));
conf->setValue("color/const_boundary_color", colToConf(cmgr->getBoun dariesColor())); conf->setValue("color/const_boundary_color", colToConf(cmgr->getBoun dariesColor()));
conf->setValue("viewing/constellation_art_intensity", cmgr->getArtIn tensity()); conf->setValue("viewing/constellation_art_intensity", cmgr->getArtIn tensity());
conf->setValue("color/cardinal_color", colToConf(lmgr->getColorCardi nalPoints()) ); conf->setValue("color/cardinal_color", colToConf(lmgr->getColorCardi nalPoints()) );
conf->setValue("color/planet_names_color", colToConf(ssmgr->getLabel sColor())); conf->setValue("color/planet_names_color", colToConf(ssmgr->getLabel sColor()));
conf->setValue("color/planet_orbits_color", colToConf(ssmgr->getOrbi tsColor())); conf->setValue("color/planet_orbits_color", colToConf(ssmgr->getOrbi tsColor()));
conf->setValue("color/object_trails_color", colToConf(ssmgr->getTrai lsColor())); conf->setValue("color/object_trails_color", colToConf(ssmgr->getTrai lsColor()));
conf->setValue("color/meridian_color", colToConf(glmgr->getColorMeri dianLine())); conf->setValue("color/meridian_color", colToConf(glmgr->getColorMeri dianLine()));
conf->setValue("color/longitude_color", colToConf(glmgr->getColorLon gitudeLine())); conf->setValue("color/oc_longitude_color", colToConf(glmgr->getColor LongitudeLine()));
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", skyd->getBortleScaleIndex( )); conf->setValue("stars/init_bortle_scale", skyd->getBortleScaleIndex( ));
 End of changes. 14 change blocks. 
11 lines changed or deleted 11 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/