TextUserInterface.cpp   TextUserInterface.cpp 
skipping to change at line 46 skipping to change at line 46
#include "StarMgr.hpp" #include "StarMgr.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "StelObjectMgr.hpp" #include "StelObjectMgr.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include "ConstellationMgr.hpp" #include "ConstellationMgr.hpp"
#include "NebulaMgr.hpp" #include "NebulaMgr.hpp"
#include "SolarSystem.hpp" #include "SolarSystem.hpp"
#include "LandscapeMgr.hpp" #include "LandscapeMgr.hpp"
#include "GridLinesMgr.hpp" #include "GridLinesMgr.hpp"
#include "MilkyWay.hpp" #include "MilkyWay.hpp"
#include "ZodiacalLight.hpp"
#include "StelLocation.hpp" #include "StelLocation.hpp"
#include "StelMainView.hpp" #include "StelMainView.hpp"
#include "StelSkyCultureMgr.hpp" #include "StelSkyCultureMgr.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#ifndef DISABLE_SCRIPTING #ifndef DISABLE_SCRIPTING
#include "StelScriptMgr.hpp" #include "StelScriptMgr.hpp"
#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...
skipping to change at line 372 skipping to change at line 373
TuiNode* m5_19 = new TuiNodeColor(N_("Galactic grid"), TuiNode* m5_19 = new TuiNodeColor(N_("Galactic grid"),
gridLinesMgr, gridLinesMgr,
SLOT(setColorGalacticGrid(Vec3f)), SLOT(setColorGalacticGrid(Vec3f)),
gridLinesMgr->getColorGalacticGrid( ), gridLinesMgr->getColorGalacticGrid( ),
m5, m5_18); m5, m5_18);
TuiNode* m5_20 = new TuiNodeColor(N_("Galactic equator line"), TuiNode* m5_20 = new TuiNodeColor(N_("Galactic equator line"),
gridLinesMgr, gridLinesMgr,
SLOT(setColorGalacticEquatorLine(Ve c3f)), SLOT(setColorGalacticEquatorLine(Ve c3f)),
gridLinesMgr->getColorGalacticEquat orLine(), gridLinesMgr->getColorGalacticEquat orLine(),
m5, m5_19); m5, m5_19);
TuiNode* m5_21 = new TuiNodeColor(N_("Opposition/conjunction longitu
de line"),
gridLinesMgr,
SLOT(setColorLongitudeLine(Vec3f)),
gridLinesMgr->getColorLongitudeLine
(),
m5, m5_20);
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);
m5_11->setNextNode(m5_12); m5_11->setNextNode(m5_12);
m5_12->setNextNode(m5_13); m5_12->setNextNode(m5_13);
m5_13->setNextNode(m5_14); m5_13->setNextNode(m5_14);
m5_14->setNextNode(m5_15); m5_14->setNextNode(m5_15);
m5_15->setNextNode(m5_16); m5_15->setNextNode(m5_16);
m5_16->setNextNode(m5_17); m5_16->setNextNode(m5_17);
m5_17->setNextNode(m5_18); m5_17->setNextNode(m5_18);
m5_18->setNextNode(m5_19); m5_18->setNextNode(m5_19);
m5_19->setNextNode(m5_20); m5_19->setNextNode(m5_20);
m5_20->setNextNode(m5_1); m5_20->setNextNode(m5_21);
m5_21->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, this,
SLOT(setBortleScale(int)), SLOT(setBortleScale(int)),
3, 1, 9, 1, 3, 1, 9, 1,
m6); m6);
skipping to change at line 423 skipping to change at line 430
movementMgr->getFlagAutoZoomOutReset sDirection(), movementMgr->getFlagAutoZoomOutReset sDirection(),
m6, m6_2); m6, m6_2);
TuiNode* m6_4 = new TuiNode(N_("Magnitude scaling multiplier"), TuiNode* m6_4 = new TuiNode(N_("Magnitude scaling multiplier"),
m6, m6_3); m6, m6_3);
TuiNode* m6_5 = new TuiNodeDouble(N_("Milky Way intensity:"), TuiNode* m6_5 = 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_4);
TuiNode* m6_6 = new TuiNode(N_("Nebula label frequency:"), m6, m6_5) TuiNode* m6_6 = new TuiNodeDouble(N_("Zodiacal light intensity:"),
; GETSTELMODULE(ZodiacalLight),
TuiNode* m6_7 = new TuiNodeFloat(N_("Zoom duration:"), SLOT(setIntensity(double)),
GETSTELMODULE(ZodiacalLight)->getIn
tensity(),
0, 10.0, 0.1,
m6, m6_5);
TuiNode* m6_7 = new TuiNode(N_("Nebula label frequency:"), m6, m6_6)
;
TuiNode* m6_8 = 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_6); m6, m6_7);
TuiNode* m6_8 = new TuiNode(N_("Cursor timeout:"), m6, m6_7); TuiNode* m6_9 = new TuiNode(N_("Cursor timeout:"), m6, m6_8);
TuiNode* m6_9 = new TuiNodeBool(N_("Setting landscape sets location" TuiNode* m6_10 = new TuiNodeBool(N_("Setting landscape sets location
), "),
landscapeMgr, landscapeMgr,
SLOT(setFlagLandscapeSetsLocation(bo ol)), SLOT(setFlagLandscapeSetsLocation(bo ol)),
landscapeMgr->getFlagLandscapeSetsLo cation(), landscapeMgr->getFlagLandscapeSetsLo cation(),
m6, m6_8); 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_8);
m6_8->setNextNode(m6_9); m6_8->setNextNode(m6_9);
m6_9->setNextNode(m6_1); 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);
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)),
skipping to change at line 504 skipping to change at line 518
*************************************************************************/ *************************************************************************/
void TextUserInterface::loadConfiguration(void) void TextUserInterface::loadConfiguration(void)
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
font.setPixelSize(conf->value("tui/tui_font_size", 15).toInt()); font.setPixelSize(conf->value("tui/tui_font_size", 15).toInt());
tuiDateTime = conf->value("tui/flag_show_tui_datetime", false).toBoo l(); tuiDateTime = conf->value("tui/flag_show_tui_datetime", false).toBoo l();
tuiObjInfo = conf->value("tui/flag_show_tui_short_obj_info", false). toBool(); tuiObjInfo = conf->value("tui/flag_show_tui_short_obj_info", false). toBool();
tuiGravityUi = conf->value("tui/flag_show_gravity_ui", false).toBool (); tuiGravityUi = conf->value("tui/flag_show_gravity_ui", false).toBool ();
color = StelUtils::strToVec3f(conf->value("tui/tui_font_color", "0.3 ,1,0.3").toString());
} }
/************************************************************************* /*************************************************************************
Draw our module. Draw our module.
*************************************************************************/ *************************************************************************/
void TextUserInterface::draw(StelCore* core) void TextUserInterface::draw(StelCore* core)
{ {
if (!tuiActive && !tuiDateTime && !tuiObjInfo) if (!tuiActive && !tuiDateTime && !tuiObjInfo)
return; return;
skipping to change at line 562 skipping to change at line 577
text_y = yVc - fovOffsetY + pixOffset; text_y = yVc - fovOffsetY + pixOffset;
} }
QString tuiText = q_("[no TUI node]"); QString tuiText = q_("[no TUI node]");
if (currentNode!=NULL) { if (currentNode!=NULL) {
tuiText = currentNode->getDisplayText(); tuiText = currentNode->getDisplayText();
} }
StelPainter painter(core->getProjection(StelCore::FrameJ2000 )); StelPainter painter(core->getProjection(StelCore::FrameJ2000 ));
painter.setFont(font); painter.setFont(font);
painter.setColor(0.3,1,0.3); painter.setColor(color[0],color[1],color[2]);
painter.drawText(text_x, text_y, tuiText, 0, 0, 0, !tuiGravi tyUi); painter.drawText(text_x, text_y, tuiText, 0, 0, 0, !tuiGravi tyUi);
} }
if (tuiDateTime) if (tuiDateTime)
{ {
double jd = core->getJDay(); double jd = core->getJDay();
int text_x = x + xVc*2/3, text_y = y + pixOffset; int text_x = x + xVc*2/3, text_y = y + pixOffset;
QString newDate = StelApp::getInstance().getLocaleMgr().getP rintableDateLocal(jd) + " " QString newDate = StelApp::getInstance().getLocaleMgr().getP rintableDateLocal(jd) + " "
+StelApp::getInstance().getLocaleMgr().getPrintableT imeLocal(jd); +StelApp::getInstance().getLocaleMgr().getPrintableT imeLocal(jd);
if (fovMaskDisk) { if (fovMaskDisk) {
text_x = xVc + fovOffsetY - pixOffset; text_x = xVc + fovOffsetY - pixOffset;
text_y = yVc - fovOffsetX + pixOffset; text_y = yVc - fovOffsetX + pixOffset;
} }
StelPainter painter(core->getProjection(StelCore::FrameAltAz )); StelPainter painter(core->getProjection(StelCore::FrameAltAz ));
painter.setFont(font); painter.setFont(font);
painter.setColor(0.3,1,0.3); painter.setColor(color[0],color[1],color[2]);
painter.drawText(text_x, text_y, newDate, 0, 0, 0, !tuiGravi tyUi); painter.drawText(text_x, text_y, newDate, 0, 0, 0, !tuiGravi tyUi);
} }
if (tuiObjInfo) if (tuiObjInfo)
{ {
QString objInfo = ""; QString objInfo = "";
StelObject::InfoStringGroup tuiInfo(StelObject::Name|StelObj ect::CatalogNumber StelObject::InfoStringGroup tuiInfo(StelObject::Name|StelObj ect::CatalogNumber
|StelObject::Distance|StelObject::PlainText) ; |StelObject::Distance|StelObject::PlainText) ;
int text_x = x + xVc*4/3, text_y = y + pixOffset; int text_x = x + xVc*4/3, text_y = y + pixOffset;
skipping to change at line 609 skipping to change at line 624
objInfo.replace("Light Years","ly"); objInfo.replace("Light Years","ly");
} }
if (fovMaskDisk) { if (fovMaskDisk) {
text_x = xVc + fovOffsetX - pixOffset; text_x = xVc + fovOffsetX - pixOffset;
text_y = yVc + fovOffsetY - pixOffset; text_y = yVc + fovOffsetY - pixOffset;
} }
StelPainter painter(core->getProjection(StelCore::FrameJ2000 )); StelPainter painter(core->getProjection(StelCore::FrameJ2000 ));
painter.setFont(font); painter.setFont(font);
painter.setColor(0.3,1,0.3); painter.setColor(color[0],color[1],color[2]);
painter.drawText(text_x, text_y, objInfo, 0, 0, 0, !tuiGravi tyUi); painter.drawText(text_x, text_y, objInfo, 0, 0, 0, !tuiGravi tyUi);
} }
} }
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);
skipping to change at line 797 skipping to change at line 812
// 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/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", lmgr->getAtmosphereBortleL ightPollution());
 End of changes. 12 change blocks. 
13 lines changed or deleted 32 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/