ViewDialog.cpp   ViewDialog.cpp 
skipping to change at line 114 skipping to change at line 114
ui->starRelativeScaleDoubleSpinBox->setValue(StelApp::getInstance(). getCore()->getSkyDrawer()->getRelativeStarScale()); ui->starRelativeScaleDoubleSpinBox->setValue(StelApp::getInstance(). getCore()->getSkyDrawer()->getRelativeStarScale());
connect(ui->starRelativeScaleDoubleSpinBox, SIGNAL(valueChanged(doub le)), StelApp::getInstance().getCore()->getSkyDrawer(), SLOT(setRelativeSta rScale(double))); connect(ui->starRelativeScaleDoubleSpinBox, SIGNAL(valueChanged(doub le)), StelApp::getInstance().getCore()->getSkyDrawer(), SLOT(setRelativeSta rScale(double)));
ui->starTwinkleAmountDoubleSpinBox->setValue(StelApp::getInstance(). getCore()->getSkyDrawer()->getTwinkleAmount()); ui->starTwinkleAmountDoubleSpinBox->setValue(StelApp::getInstance(). getCore()->getSkyDrawer()->getTwinkleAmount());
connect(ui->starTwinkleAmountDoubleSpinBox, SIGNAL(valueChanged(doub le)), StelApp::getInstance().getCore()->getSkyDrawer(), SLOT(setTwinkleAmou nt(double))); connect(ui->starTwinkleAmountDoubleSpinBox, SIGNAL(valueChanged(doub le)), StelApp::getInstance().getCore()->getSkyDrawer(), SLOT(setTwinkleAmou nt(double)));
ui->adaptationCheckbox->setChecked(StelApp::getInstance().getCore()- >getSkyDrawer()->getFlagLuminanceAdaptation()); ui->adaptationCheckbox->setChecked(StelApp::getInstance().getCore()- >getSkyDrawer()->getFlagLuminanceAdaptation());
connect(ui->adaptationCheckbox, SIGNAL(toggled(bool)), StelApp::getI nstance().getCore()->getSkyDrawer(), SLOT(setFlagLuminanceAdaptation(bool)) ); connect(ui->adaptationCheckbox, SIGNAL(toggled(bool)), StelApp::getI nstance().getCore()->getSkyDrawer(), SLOT(setFlagLuminanceAdaptation(bool)) );
// Planets section // Planets section
SolarSystem* ssmgr = (SolarSystem*)GETSTELMODULE("SolarSystem"); SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
ui->showPlanetCheckBox->setChecked(ssmgr->getFlagPlanets()); ui->showPlanetCheckBox->setChecked(ssmgr->getFlagPlanets());
connect(ui->showPlanetCheckBox, SIGNAL(toggled(bool)), ssmgr, SLOT(s etFlagPlanets(bool))); connect(ui->showPlanetCheckBox, SIGNAL(toggled(bool)), ssmgr, SLOT(s etFlagPlanets(bool)));
ui->planetMarkerCheckBox->setChecked(ssmgr->getFlagHints()); ui->planetMarkerCheckBox->setChecked(ssmgr->getFlagHints());
connect(ui->planetMarkerCheckBox, SIGNAL(toggled(bool)), ssmgr, SLOT (setFlagHints(bool))); connect(ui->planetMarkerCheckBox, SIGNAL(toggled(bool)), ssmgr, SLOT (setFlagHints(bool)));
ui->planetScaleMoonCheckBox->setChecked(ssmgr->getFlagMoonScale()); ui->planetScaleMoonCheckBox->setChecked(ssmgr->getFlagMoonScale());
connect(ui->planetScaleMoonCheckBox, SIGNAL(toggled(bool)), ssmgr, S LOT(setFlagMoonScale(bool))); connect(ui->planetScaleMoonCheckBox, SIGNAL(toggled(bool)), ssmgr, S LOT(setFlagMoonScale(bool)));
ui->planetOrbitCheckBox->setChecked(ssmgr->getFlagOrbits()); ui->planetOrbitCheckBox->setChecked(ssmgr->getFlagOrbits());
connect(ui->planetOrbitCheckBox, SIGNAL(toggled(bool)), ssmgr, SLOT( setFlagOrbits(bool))); connect(ui->planetOrbitCheckBox, SIGNAL(toggled(bool)), ssmgr, SLOT( setFlagOrbits(bool)));
ui->planetLightSpeedCheckBox->setChecked(ssmgr->getFlagLightTravelTi me()); ui->planetLightSpeedCheckBox->setChecked(ssmgr->getFlagLightTravelTi me());
connect(ui->planetLightSpeedCheckBox, SIGNAL(toggled(bool)), ssmgr, SLOT(setFlagLightTravelTime(bool))); connect(ui->planetLightSpeedCheckBox, SIGNAL(toggled(bool)), ssmgr, SLOT(setFlagLightTravelTime(bool)));
// Shooting stars section // Shooting stars section
MeteorMgr* mmgr = (MeteorMgr*)GETSTELMODULE("MeteorMgr"); MeteorMgr* mmgr = GETSTELMODULE(MeteorMgr);
Q_ASSERT(mmgr); Q_ASSERT(mmgr);
switch(mmgr->getZHR()) switch(mmgr->getZHR())
{ {
case 0: ui->zhrNone->setChecked(true); break; case 0: ui->zhrNone->setChecked(true); break;
case 80: ui->zhr80->setChecked(true); break; case 80: ui->zhr80->setChecked(true); break;
case 10000: ui->zhr10000->setChecked(true); break; case 10000: ui->zhr10000->setChecked(true); break;
case 144000: ui->zhr144000->setChecked(true); break; case 144000: ui->zhr144000->setChecked(true); break;
default: ui->zhr10->setChecked(true); break; default: ui->zhr10->setChecked(true); break;
} }
shootingStarsZHRChanged(); shootingStarsZHRChanged();
connect(ui->zhrNone, SIGNAL(clicked()), this, SLOT(shootingStarsZHRC hanged())); connect(ui->zhrNone, SIGNAL(clicked()), this, SLOT(shootingStarsZHRC hanged()));
connect(ui->zhr10, SIGNAL(clicked()), this, SLOT(shootingStarsZHRCha nged())); connect(ui->zhr10, SIGNAL(clicked()), this, SLOT(shootingStarsZHRCha nged()));
connect(ui->zhr80, SIGNAL(clicked()), this, SLOT(shootingStarsZHRCha nged())); connect(ui->zhr80, SIGNAL(clicked()), this, SLOT(shootingStarsZHRCha nged()));
connect(ui->zhr10000, SIGNAL(clicked()), this, SLOT(shootingStarsZHR Changed())); connect(ui->zhr10000, SIGNAL(clicked()), this, SLOT(shootingStarsZHR Changed()));
connect(ui->zhr144000, SIGNAL(clicked()), this, SLOT(shootingStarsZH RChanged())); connect(ui->zhr144000, SIGNAL(clicked()), this, SLOT(shootingStarsZH RChanged()));
// Labels section // Labels section
StarMgr* smgr = (StarMgr*)GETSTELMODULE("StarMgr"); StarMgr* smgr = GETSTELMODULE(StarMgr);
ui->starLabelCheckBox->setChecked(smgr->getFlagLabels()); ui->starLabelCheckBox->setChecked(smgr->getFlagLabels());
connect(ui->starLabelCheckBox, SIGNAL(toggled(bool)), smgr, SLOT(set FlagLabels(bool))); connect(ui->starLabelCheckBox, SIGNAL(toggled(bool)), smgr, SLOT(set FlagLabels(bool)));
NebulaMgr* nmgr = (NebulaMgr*)GETSTELMODULE("NebulaMgr"); NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
ui->nebulaLabelCheckBox->setChecked(nmgr->getFlagHints()); ui->nebulaLabelCheckBox->setChecked(nmgr->getFlagHints());
a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Nebulas"); a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Nebulas");
connect(a, SIGNAL(toggled(bool)), ui->nebulaLabelCheckBox, SLOT(setC hecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->nebulaLabelCheckBox, SLOT(setC hecked(bool)));
connect(ui->nebulaLabelCheckBox, SIGNAL(toggled(bool)), a, SLOT(setC hecked(bool))); connect(ui->nebulaLabelCheckBox, SIGNAL(toggled(bool)), a, SLOT(setC hecked(bool)));
ui->planetLabelCheckBox->setChecked(ssmgr->getFlagLabels()); ui->planetLabelCheckBox->setChecked(ssmgr->getFlagLabels());
connect(ui->planetLabelCheckBox, SIGNAL(toggled(bool)), ssmgr, SLOT( setFlagLabels(bool))); connect(ui->planetLabelCheckBox, SIGNAL(toggled(bool)), ssmgr, SLOT( setFlagLabels(bool)));
ui->starsLabelsHorizontalSlider->setValue((int)(smgr->getLabelsAmoun t()*10.f)); ui->starsLabelsHorizontalSlider->setValue((int)(smgr->getLabelsAmoun t()*10.f));
connect(ui->starsLabelsHorizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(starsLabelsValueChanged(int))); connect(ui->starsLabelsHorizontalSlider, SIGNAL(valueChanged(int)), this, SLOT(starsLabelsValueChanged(int)));
ui->planetsLabelsHorizontalSlider->setValue((int)(ssmgr->getLabelsAm ount()*10.f)); ui->planetsLabelsHorizontalSlider->setValue((int)(ssmgr->getLabelsAm ount()*10.f));
connect(ui->planetsLabelsHorizontalSlider, SIGNAL(valueChanged(int)) , this, SLOT(planetsLabelsValueChanged(int))); connect(ui->planetsLabelsHorizontalSlider, SIGNAL(valueChanged(int)) , this, SLOT(planetsLabelsValueChanged(int)));
ui->nebulasLabelsHorizontalSlider->setValue((int)(nmgr->getHintsAmou nt()*10.f)); ui->nebulasLabelsHorizontalSlider->setValue((int)(nmgr->getHintsAmou nt()*10.f));
connect(ui->nebulasLabelsHorizontalSlider, SIGNAL(valueChanged(int)) , this, SLOT(nebulasLabelsValueChanged(int))); connect(ui->nebulasLabelsHorizontalSlider, SIGNAL(valueChanged(int)) , this, SLOT(nebulasLabelsValueChanged(int)));
// Landscape section // Landscape section
LandscapeMgr* lmgr = (LandscapeMgr*)GETSTELMODULE("LandscapeMgr"); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
ui->showGroundCheckBox->setChecked(lmgr->getFlagLandscape()); ui->showGroundCheckBox->setChecked(lmgr->getFlagLandscape());
a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Ground"); a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Ground");
connect(a, SIGNAL(toggled(bool)), ui->showGroundCheckBox, SLOT(setCh ecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showGroundCheckBox, SLOT(setCh ecked(bool)));
connect(ui->showGroundCheckBox, SIGNAL(toggled(bool)), a, SLOT(setCh ecked(bool))); connect(ui->showGroundCheckBox, SIGNAL(toggled(bool)), a, SLOT(setCh ecked(bool)));
ui->showFogCheckBox->setChecked(lmgr->getFlagFog()); ui->showFogCheckBox->setChecked(lmgr->getFlagFog());
connect(ui->showFogCheckBox, SIGNAL(toggled(bool)), lmgr, SLOT(setFl agFog(bool))); connect(ui->showFogCheckBox, SIGNAL(toggled(bool)), lmgr, SLOT(setFl agFog(bool)));
ui->showAtmosphereCheckBox->setChecked(lmgr->getFlagAtmosphere()); ui->showAtmosphereCheckBox->setChecked(lmgr->getFlagAtmosphere());
a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Atmosphere"); a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Atmosphere");
skipping to change at line 196 skipping to change at line 196
ui->lightPollutionSpinBox->setValue(StelApp::getInstance().getCore() ->getSkyDrawer()->getBortleScale()); ui->lightPollutionSpinBox->setValue(StelApp::getInstance().getCore() ->getSkyDrawer()->getBortleScale());
connect(ui->lightPollutionSpinBox, SIGNAL(valueChanged(int)), lmgr, SLOT(setAtmosphereBortleLightPollution(int))); connect(ui->lightPollutionSpinBox, SIGNAL(valueChanged(int)), lmgr, SLOT(setAtmosphereBortleLightPollution(int)));
connect(ui->lightPollutionSpinBox, SIGNAL(valueChanged(int)), StelAp p::getInstance().getCore()->getSkyDrawer(), SLOT(setBortleScale(int))); connect(ui->lightPollutionSpinBox, SIGNAL(valueChanged(int)), StelAp p::getInstance().getCore()->getSkyDrawer(), SLOT(setBortleScale(int)));
ui->useAsDefaultLandscapeCheckBox->setChecked(lmgr->getCurrentLandsc apeID()==lmgr->getDefaultLandscapeID()); ui->useAsDefaultLandscapeCheckBox->setChecked(lmgr->getCurrentLandsc apeID()==lmgr->getDefaultLandscapeID());
ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getCurrentLandsc apeID()!=lmgr->getDefaultLandscapeID()); ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getCurrentLandsc apeID()!=lmgr->getDefaultLandscapeID());
connect(ui->useAsDefaultLandscapeCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentLandscapeAsDefault())); connect(ui->useAsDefaultLandscapeCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentLandscapeAsDefault()));
// Grid and lines // Grid and lines
GridLinesMgr* glmgr = (GridLinesMgr*)GETSTELMODULE("GridLinesMgr"); GridLinesMgr* glmgr = GETSTELMODULE(GridLinesMgr);
ui->showEquatorLineCheckBox->setChecked(glmgr->getFlagEquatorLine()) ; ui->showEquatorLineCheckBox->setChecked(glmgr->getFlagEquatorLine()) ;
a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Equator_Line"); a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Equator_Line");
connect(a, SIGNAL(toggled(bool)), ui->showEquatorLineCheckBox, SLOT( setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showEquatorLineCheckBox, SLOT( setChecked(bool)));
connect(ui->showEquatorLineCheckBox, SIGNAL(toggled(bool)), a, SLOT( setChecked(bool))); connect(ui->showEquatorLineCheckBox, SIGNAL(toggled(bool)), a, SLOT( setChecked(bool)));
ui->showEclipticLineCheckBox->setChecked(glmgr->getFlagEclipticLine( )); ui->showEclipticLineCheckBox->setChecked(glmgr->getFlagEclipticLine( ));
a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Ecliptic_Line"); a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Ecliptic_Line");
connect(a, SIGNAL(toggled(bool)), ui->showEclipticLineCheckBox, SLOT (setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showEclipticLineCheckBox, SLOT (setChecked(bool)));
connect(ui->showEclipticLineCheckBox, SIGNAL(toggled(bool)), a, SLOT (setChecked(bool))); connect(ui->showEclipticLineCheckBox, SIGNAL(toggled(bool)), a, SLOT (setChecked(bool)));
skipping to change at line 233 skipping to change at line 233
a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Equatorial_J2000_Grid"); a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Equatorial_J2000_Grid");
connect(a, SIGNAL(toggled(bool)), ui->showEquatorialJ2000GridCheckBo x, SLOT(setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showEquatorialJ2000GridCheckBo x, SLOT(setChecked(bool)));
connect(ui->showEquatorialJ2000GridCheckBox, SIGNAL(toggled(bool)), a, SLOT(setChecked(bool))); connect(ui->showEquatorialJ2000GridCheckBox, SIGNAL(toggled(bool)), a, SLOT(setChecked(bool)));
ui->showCardinalPointsCheckBox->setChecked(lmgr->getFlagCardinalsPoi nts()); ui->showCardinalPointsCheckBox->setChecked(lmgr->getFlagCardinalsPoi nts());
a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Cardinal_Points"); a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Cardinal_Points");
connect(a, SIGNAL(toggled(bool)), ui->showCardinalPointsCheckBox, SL OT(setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showCardinalPointsCheckBox, SL OT(setChecked(bool)));
connect(ui->showCardinalPointsCheckBox, SIGNAL(toggled(bool)), a, SL OT(setChecked(bool))); connect(ui->showCardinalPointsCheckBox, SIGNAL(toggled(bool)), a, SL OT(setChecked(bool)));
// Constellations // Constellations
ConstellationMgr* cmgr = (ConstellationMgr*)GETSTELMODULE("Constella tionMgr"); ConstellationMgr* cmgr = GETSTELMODULE(ConstellationMgr);
ui->showConstellationLinesCheckBox->setChecked(cmgr->getFlagLines()) ; ui->showConstellationLinesCheckBox->setChecked(cmgr->getFlagLines()) ;
a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Constellation_Lines"); a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Constellation_Lines");
connect(a, SIGNAL(toggled(bool)), ui->showConstellationLinesCheckBox , SLOT(setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showConstellationLinesCheckBox , SLOT(setChecked(bool)));
connect(ui->showConstellationLinesCheckBox, SIGNAL(toggled(bool)), a , SLOT(setChecked(bool))); connect(ui->showConstellationLinesCheckBox, SIGNAL(toggled(bool)), a , SLOT(setChecked(bool)));
ui->showConstellationLabelsCheckBox->setChecked(cmgr->getFlagLabels( )); ui->showConstellationLabelsCheckBox->setChecked(cmgr->getFlagLabels( ));
a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Constellation_Labels"); a = StelMainGraphicsView::getInstance().findChild<QAction*>("actionS how_Constellation_Labels");
connect(a, SIGNAL(toggled(bool)), ui->showConstellationLabelsCheckBo x, SLOT(setChecked(bool))); connect(a, SIGNAL(toggled(bool)), ui->showConstellationLabelsCheckBo x, SLOT(setChecked(bool)));
connect(ui->showConstellationLabelsCheckBox, SIGNAL(toggled(bool)), a, SLOT(setChecked(bool))); connect(ui->showConstellationLabelsCheckBox, SIGNAL(toggled(bool)), a, SLOT(setChecked(bool)));
skipping to change at line 299 skipping to change at line 299
l->addItem(core->projectionTypeKeyToNameI18n(s)); l->addItem(core->projectionTypeKeyToNameI18n(s));
} }
l->setCurrentItem(l->findItems(core->projectionTypeKeyToNameI18n(cor e->getCurrentProjectionTypeKey()), Qt::MatchExactly).at(0)); l->setCurrentItem(l->findItems(core->projectionTypeKeyToNameI18n(cor e->getCurrentProjectionTypeKey()), Qt::MatchExactly).at(0));
l->blockSignals(false); l->blockSignals(false);
ui->projectionTextBrowser->setHtml(core->getProjection(Mat4d())->get HtmlSummary()); ui->projectionTextBrowser->setHtml(core->getProjection(Mat4d())->get HtmlSummary());
// Fill the landscape list // Fill the landscape list
l = ui->landscapesListWidget; l = ui->landscapesListWidget;
l->blockSignals(true); l->blockSignals(true);
l->clear(); l->clear();
LandscapeMgr* lmgr = (LandscapeMgr*)GETSTELMODULE("LandscapeMgr"); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
l->addItems(lmgr->getAllLandscapeNames()); l->addItems(lmgr->getAllLandscapeNames());
l->setCurrentItem(l->findItems(lmgr->getCurrentLandscapeName(), Qt:: MatchExactly).at(0)); l->setCurrentItem(l->findItems(lmgr->getCurrentLandscapeName(), Qt:: MatchExactly).at(0));
l->blockSignals(false); l->blockSignals(false);
ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescr iption()); ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescr iption());
} }
void ViewDialog::skyCultureChanged(const QString& cultureName) void ViewDialog::skyCultureChanged(const QString& cultureName)
{ {
StelApp::getInstance().getSkyCultureMgr().setCurrentSkyCultureNameI1 8(cultureName); StelApp::getInstance().getSkyCultureMgr().setCurrentSkyCultureNameI1 8(cultureName);
updateSkyCultureText(); updateSkyCultureText();
skipping to change at line 359 skipping to change at line 359
void ViewDialog::projectionChanged(const QString& projectionNameI18n) void ViewDialog::projectionChanged(const QString& projectionNameI18n)
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
core->setCurrentProjectionTypeKey(core->projectionNameI18nToTypeKey( projectionNameI18n)); core->setCurrentProjectionTypeKey(core->projectionNameI18nToTypeKey( projectionNameI18n));
ui->projectionTextBrowser->document()->setDefaultStyleSheet(QString( StelApp::getInstance().getCurrentStelStyle()->htmlStyleSheet)); ui->projectionTextBrowser->document()->setDefaultStyleSheet(QString( StelApp::getInstance().getCurrentStelStyle()->htmlStyleSheet));
ui->projectionTextBrowser->setHtml(core->getProjection(Mat4d())->get HtmlSummary()); ui->projectionTextBrowser->setHtml(core->getProjection(Mat4d())->get HtmlSummary());
} }
void ViewDialog::landscapeChanged(QListWidgetItem* item) void ViewDialog::landscapeChanged(QListWidgetItem* item)
{ {
LandscapeMgr* lmgr = (LandscapeMgr*)GETSTELMODULE("LandscapeMgr"); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
lmgr->setCurrentLandscapeName(item->text()); lmgr->setCurrentLandscapeName(item->text());
ui->landscapeTextBrowser->document()->setDefaultStyleSheet(QString(S telApp::getInstance().getCurrentStelStyle()->htmlStyleSheet)); ui->landscapeTextBrowser->document()->setDefaultStyleSheet(QString(S telApp::getInstance().getCurrentStelStyle()->htmlStyleSheet));
ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescr iption()); ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescr iption());
ui->useAsDefaultLandscapeCheckBox->setChecked(lmgr->getDefaultLandsc apeID()==lmgr->getCurrentLandscapeID()); ui->useAsDefaultLandscapeCheckBox->setChecked(lmgr->getDefaultLandsc apeID()==lmgr->getCurrentLandscapeID());
ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getDefaultLandsc apeID()!=lmgr->getCurrentLandscapeID()); ui->useAsDefaultLandscapeCheckBox->setEnabled(lmgr->getDefaultLandsc apeID()!=lmgr->getCurrentLandscapeID());
} }
void ViewDialog::shootingStarsZHRChanged() void ViewDialog::shootingStarsZHRChanged()
{ {
MeteorMgr* mmgr = (MeteorMgr*)GETSTELMODULE("MeteorMgr"); MeteorMgr* mmgr = GETSTELMODULE(MeteorMgr);
int zhr=-1; int zhr=-1;
if (ui->zhrNone->isChecked()) if (ui->zhrNone->isChecked())
{ {
mmgr->setFlagShow(false); mmgr->setFlagShow(false);
zhr = 0; zhr = 0;
} }
else else
{ {
mmgr->setFlagShow(true); mmgr->setFlagShow(true);
} }
skipping to change at line 417 skipping to change at line 417
ui->zhrLabel->setText("<small><i>"+q_("Highest rate ever (1966 Leonids)")+"</i></small>"); ui->zhrLabel->setText("<small><i>"+q_("Highest rate ever (1966 Leonids)")+"</i></small>");
break; break;
default: default:
ui->zhrLabel->setText(QString("<small><i>")+"Error"+ "</i></small>"); ui->zhrLabel->setText(QString("<small><i>")+"Error"+ "</i></small>");
} }
} }
void ViewDialog::starsLabelsValueChanged(int v) void ViewDialog::starsLabelsValueChanged(int v)
{ {
StarMgr* smgr = (StarMgr*)GETSTELMODULE("StarMgr"); StarMgr* smgr = GETSTELMODULE(StarMgr);
float a= ((float)v)/10.f; float a= ((float)v)/10.f;
smgr->setLabelsAmount(a); smgr->setLabelsAmount(a);
} }
void ViewDialog::setCurrentLandscapeAsDefault(void) void ViewDialog::setCurrentLandscapeAsDefault(void)
{ {
LandscapeMgr* lmgr = (LandscapeMgr*)GETSTELMODULE("LandscapeMgr"); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
Q_ASSERT(lmgr); Q_ASSERT(lmgr);
lmgr->setDefaultLandscapeID(lmgr->getCurrentLandscapeID()); lmgr->setDefaultLandscapeID(lmgr->getCurrentLandscapeID());
ui->useAsDefaultLandscapeCheckBox->setChecked(true); ui->useAsDefaultLandscapeCheckBox->setChecked(true);
ui->useAsDefaultLandscapeCheckBox->setEnabled(false); ui->useAsDefaultLandscapeCheckBox->setEnabled(false);
} }
void ViewDialog::setCurrentCultureAsDefault(void) void ViewDialog::setCurrentCultureAsDefault(void)
{ {
StelApp::getInstance().getSkyCultureMgr().setDefaultSkyCultureID(Ste lApp::getInstance().getSkyCultureMgr().getCurrentSkyCultureID()); StelApp::getInstance().getSkyCultureMgr().setDefaultSkyCultureID(Ste lApp::getInstance().getSkyCultureMgr().getCurrentSkyCultureID());
ui->useAsDefaultSkyCultureCheckBox->setChecked(true); ui->useAsDefaultSkyCultureCheckBox->setChecked(true);
ui->useAsDefaultSkyCultureCheckBox->setEnabled(false); ui->useAsDefaultSkyCultureCheckBox->setEnabled(false);
} }
void ViewDialog::planetsLabelsValueChanged(int v) void ViewDialog::planetsLabelsValueChanged(int v)
{ {
SolarSystem* ssmgr = (SolarSystem*)GETSTELMODULE("SolarSystem"); SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
float a= ((float)v)/10.f; float a= ((float)v)/10.f;
ssmgr->setLabelsAmount(a); ssmgr->setLabelsAmount(a);
} }
void ViewDialog::nebulasLabelsValueChanged(int v) void ViewDialog::nebulasLabelsValueChanged(int v)
{ {
NebulaMgr* nmgr = (NebulaMgr*)GETSTELMODULE("NebulaMgr"); NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
float a= ((float)v)/10.f; float a= ((float)v)/10.f;
nmgr->setHintsAmount(a); nmgr->setHintsAmount(a);
nmgr->setLabelsAmount(a); nmgr->setLabelsAmount(a);
} }
// Update the widget to make sure it is synchrone if a value was changed pr ogrammatically // Update the widget to make sure it is synchrone if a value was changed pr ogrammatically
void ViewDialog::updateFromProgram() void ViewDialog::updateFromProgram()
{ {
if (!dialog->isVisible()) if (!dialog->isVisible())
return; return;
// Check that the useAsDefaultSkyCultureCheckBox needs to be updated // Check that the useAsDefaultSkyCultureCheckBox needs to be updated
bool b = StelApp::getInstance().getSkyCultureMgr().getCurrentSkyCult ureID()==StelApp::getInstance().getSkyCultureMgr().getDefaultSkyCultureID() ; bool b = StelApp::getInstance().getSkyCultureMgr().getCurrentSkyCult ureID()==StelApp::getInstance().getSkyCultureMgr().getDefaultSkyCultureID() ;
if (b!=ui->useAsDefaultSkyCultureCheckBox->isChecked()) if (b!=ui->useAsDefaultSkyCultureCheckBox->isChecked())
{ {
ui->useAsDefaultSkyCultureCheckBox->setChecked(b); ui->useAsDefaultSkyCultureCheckBox->setChecked(b);
ui->useAsDefaultSkyCultureCheckBox->setEnabled(!b); ui->useAsDefaultSkyCultureCheckBox->setEnabled(!b);
} }
LandscapeMgr* lmgr = (LandscapeMgr*)GETSTELMODULE("LandscapeMgr"); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
Q_ASSERT(lmgr); Q_ASSERT(lmgr);
b = lmgr->getCurrentLandscapeID()==lmgr->getDefaultLandscapeID(); b = lmgr->getCurrentLandscapeID()==lmgr->getDefaultLandscapeID();
if (b!=ui->useAsDefaultLandscapeCheckBox->isChecked()) if (b!=ui->useAsDefaultLandscapeCheckBox->isChecked())
{ {
ui->useAsDefaultLandscapeCheckBox->setChecked(b); ui->useAsDefaultLandscapeCheckBox->setChecked(b);
ui->useAsDefaultLandscapeCheckBox->setEnabled(!b); ui->useAsDefaultLandscapeCheckBox->setEnabled(!b);
} }
} }
 End of changes. 15 change blocks. 
15 lines changed or deleted 15 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/