ViewDialog.cpp   ViewDialog.cpp 
skipping to change at line 37 skipping to change at line 37
#include "StelSkyCultureMgr.hpp" #include "StelSkyCultureMgr.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "LandscapeMgr.hpp" #include "LandscapeMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StarMgr.hpp" #include "StarMgr.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include "SolarSystem.hpp" #include "SolarSystem.hpp"
#include "NebulaMgr.hpp" #include "NebulaMgr.hpp"
#include "MeteorMgr.hpp"
#include "MilkyWay.hpp" #include "MilkyWay.hpp"
#include "ZodiacalLight.hpp" #include "ZodiacalLight.hpp"
#include "ConstellationMgr.hpp" #include "ConstellationMgr.hpp"
#include "SporadicMeteorMgr.hpp"
#include "StelStyle.hpp" #include "StelStyle.hpp"
#include "StelSkyLayerMgr.hpp" #include "StelSkyLayerMgr.hpp"
#include "StelGuiBase.hpp" #include "StelGuiBase.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelGuiItems.hpp" #include "StelGuiItems.hpp"
#include "StelActionMgr.hpp" #include "StelActionMgr.hpp"
#include <QDebug> #include <QDebug>
#include <QFrame> #include <QFrame>
#include <QFile> #include <QFile>
skipping to change at line 136 skipping to change at line 136
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
//Kinetic scrolling for tablet pc and pc //Kinetic scrolling for tablet pc and pc
QList<QWidget *> addscroll; QList<QWidget *> addscroll;
addscroll << ui->projectionListWidget << ui->culturesListWidget << u i->skyCultureTextBrowser << ui->landscapesListWidget; addscroll << ui->projectionListWidget << ui->culturesListWidget << u i->skyCultureTextBrowser << ui->landscapesListWidget;
StelDialog::installKineticScrolling(addscroll); StelDialog::installKineticScrolling(addscroll);
#endif #endif
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
populateLists(); populateLists();
ui->viewportOffsetSpinBox->setValue((int) round(StelApp::getInstance
().getCore()->getCurrentStelProjectorParams().viewportCenterOffset[1] * 100
.0f));
connect(ui->culturesListWidget, SIGNAL(currentTextChanged(const QStr ing&)), this, SLOT(skyCultureChanged(const QString&))); connect(ui->culturesListWidget, SIGNAL(currentTextChanged(const QStr ing&)), this, SLOT(skyCultureChanged(const QString&)));
connect(ui->projectionListWidget, SIGNAL(currentTextChanged(const QS tring&)), this, SLOT(projectionChanged(const QString&))); connect(ui->projectionListWidget, SIGNAL(currentTextChanged(const QS tring&)), this, SLOT(projectionChanged(const QString&)));
connect(ui->viewportOffsetSpinBox, SIGNAL(valueChanged(int)), this, SLOT(viewportVerticalShiftChanged(int)));
connect(ui->landscapesListWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(landscapeChanged(QListWidgetItem*))); connect(ui->landscapesListWidget, SIGNAL(itemClicked(QListWidgetItem *)), this, SLOT(landscapeChanged(QListWidgetItem*)));
// Connect and initialize checkboxes and other widgets // Connect and initialize checkboxes and other widgets
NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
// DSO
updateSelectedCatalogsCheckBoxes();
connect(ui->buttonGroupDisplayedDSOCatalogs, SIGNAL(buttonClicked(in
t)), this, SLOT(setSelectedCatalogsFromCheckBoxes()));
updateSelectedTypesCheckBoxes();
connect(ui->buttonGroupDisplayedDSOTypes, SIGNAL(buttonClicked(int))
, this, SLOT(setSelectedTypesFromCheckBoxes()));
ui->groupBoxDSOTypeFilters->setChecked(nmgr->getFlagTypeFiltersUsage
());
connect(ui->groupBoxDSOTypeFilters, SIGNAL(toggled(bool)), nmgr, SLO
T(setFlagTypeFiltersUsage(bool)));
ui->checkBoxProportionalHints->setChecked(nmgr->getHintsProportional
());
connect(ui->checkBoxProportionalHints, SIGNAL(toggled(bool)), nmgr,
SLOT(setHintsProportional(bool)));
ui->checkBoxSurfaceBrightnessUsage->setChecked(nmgr->getFlagSurfaceB
rightnessUsage());
connect(ui->checkBoxSurfaceBrightnessUsage, SIGNAL(toggled(bool)), n
mgr, SLOT(setFlagSurfaceBrightnessUsage(bool)));
// Stars section // Stars section
ui->starTwinkleCheckBox->setChecked(StelApp::getInstance().getCore() ->getSkyDrawer()->getFlagTwinkle()); ui->starTwinkleCheckBox->setChecked(StelApp::getInstance().getCore() ->getSkyDrawer()->getFlagTwinkle());
connect(ui->starTwinkleCheckBox, SIGNAL(toggled(bool)), StelApp::get Instance().getCore()->getSkyDrawer(), SLOT(setFlagTwinkle(bool))); connect(ui->starTwinkleCheckBox, SIGNAL(toggled(bool)), StelApp::get Instance().getCore()->getSkyDrawer(), SLOT(setFlagTwinkle(bool)));
ui->starScaleRadiusDoubleSpinBox->setValue(StelApp::getInstance().ge tCore()->getSkyDrawer()->getAbsoluteStarScale()); ui->starScaleRadiusDoubleSpinBox->setValue(StelApp::getInstance().ge tCore()->getSkyDrawer()->getAbsoluteStarScale());
connect(ui->starScaleRadiusDoubleSpinBox, SIGNAL(valueChanged(double )), StelApp::getInstance().getCore()->getSkyDrawer(), SLOT(setAbsoluteStarS cale(double))); connect(ui->starScaleRadiusDoubleSpinBox, SIGNAL(valueChanged(double )), StelApp::getInstance().getCore()->getSkyDrawer(), SLOT(setAbsoluteStarS cale(double)));
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)));
skipping to change at line 168 skipping to change at line 185
connect(ui->zodiacalLightBrightnessDoubleSpinBox, SIGNAL(valueChange d(double)), zl, SLOT(setIntensity(double))); connect(ui->zodiacalLightBrightnessDoubleSpinBox, SIGNAL(valueChange d(double)), zl, SLOT(setIntensity(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)) );
// Limit Magnitudes // Limit Magnitudes
const StelSkyDrawer* drawer = StelApp::getInstance().getCore()->getS kyDrawer(); const StelSkyDrawer* drawer = StelApp::getInstance().getCore()->getS kyDrawer();
// Stars
ui->starLimitMagnitudeCheckBox->setChecked(drawer->getFlagStarMagnit udeLimit()); ui->starLimitMagnitudeCheckBox->setChecked(drawer->getFlagStarMagnit udeLimit());
ui->nebulaLimitMagnitudeCheckBox->setChecked(drawer->getFlagNebulaMa gnitudeLimit());
ui->starLimitMagnitudeDoubleSpinBox->setValue(drawer->getCustomStarM agnitudeLimit()); ui->starLimitMagnitudeDoubleSpinBox->setValue(drawer->getCustomStarM agnitudeLimit());
// Planets
ui->planetLimitMagnitudeCheckBox->setChecked(drawer->getFlagPlanetMa
gnitudeLimit());
ui->planetLimitMagnitudeDoubleSpinBox->setValue(drawer->getCustomPla
netMagnitudeLimit());
// DSO
ui->nebulaLimitMagnitudeCheckBox->setChecked(drawer->getFlagNebulaMa
gnitudeLimit());
ui->nebulaLimitMagnitudeDoubleSpinBox->setValue(drawer->getCustomNeb ulaMagnitudeLimit()); ui->nebulaLimitMagnitudeDoubleSpinBox->setValue(drawer->getCustomNeb ulaMagnitudeLimit());
connect(ui->starLimitMagnitudeCheckBox, SIGNAL(toggled(bool)), connect(ui->starLimitMagnitudeCheckBox, SIGNAL(toggled(bool)),
drawer, SLOT(setFlagStarMagnitudeLimit(bool))); drawer, SLOT(setFlagStarMagnitudeLimit(bool)));
connect(ui->planetLimitMagnitudeCheckBox, SIGNAL(toggled(bool)),
drawer, SLOT(setFlagPlanetMagnitudeLimit(bool)));
connect(ui->nebulaLimitMagnitudeCheckBox, SIGNAL(toggled(bool)), connect(ui->nebulaLimitMagnitudeCheckBox, SIGNAL(toggled(bool)),
drawer, SLOT(setFlagNebulaMagnitudeLimit(bool))); drawer, SLOT(setFlagNebulaMagnitudeLimit(bool)));
connect(ui->starLimitMagnitudeDoubleSpinBox, SIGNAL(valueChanged(dou ble)), connect(ui->starLimitMagnitudeDoubleSpinBox, SIGNAL(valueChanged(dou ble)),
drawer, SLOT(setCustomStarMagnitudeLimit(double))); drawer, SLOT(setCustomStarMagnitudeLimit(double)));
connect(ui->planetLimitMagnitudeDoubleSpinBox, SIGNAL(valueChanged(d
ouble)),
drawer, SLOT(setCustomPlanetMagnitudeLimit(double)));
connect(ui->nebulaLimitMagnitudeDoubleSpinBox, connect(ui->nebulaLimitMagnitudeDoubleSpinBox,
SIGNAL(valueChanged(double)), SIGNAL(valueChanged(double)),
drawer, drawer, SLOT(setCustomNebulaMagnitudeLimit(double)));
SLOT(setCustomNebulaMagnitudeLimit(double)));
// Planets section // Planets section
SolarSystem* ssmgr = 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->moonScaleFactor->setValue(ssmgr->getMoonScale()); ui->moonScaleFactor->setValue(ssmgr->getMoonScale());
connect(ui->moonScaleFactor, SIGNAL(valueChanged(double)), ssmgr, SL OT(setMoonScale(double))); connect(ui->moonScaleFactor, SIGNAL(valueChanged(double)), ssmgr, SL OT(setMoonScale(double)));
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->planetIsolatedOrbitCheckBox->setChecked(ssmgr->getFlagIsolatedOr
bits());
connect(ui->planetIsolatedOrbitCheckBox, SIGNAL(toggled(bool)), ssmg
r, SLOT(setFlagIsolatedOrbits(bool)));
ui->planetIsolatedTrailsCheckBox->setChecked(ssmgr->getFlagIsolatedT
rails());
connect(ui->planetIsolatedTrailsCheckBox, SIGNAL(toggled(bool)), ssm
gr, SLOT(setFlagIsolatedTrails(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 = GETSTELMODULE(MeteorMgr); SporadicMeteorMgr* mmgr = GETSTELMODULE(SporadicMeteorMgr);
Q_ASSERT(mmgr); Q_ASSERT(mmgr);
ui->zhrSpinBox->setValue(mmgr->getZHR()); connect(mmgr, SIGNAL(zhrChanged(int)), this, SLOT(setZHR(int)));
connect(mmgr, SIGNAL(zhrChanged(int)), this, SLOT(updateZhrControls( connect(ui->zhrSlider, SIGNAL(valueChanged(int)), this, SLOT(setZHR(
int))); int)));
connect(ui->zhrSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setZhr connect(ui->zhrSpinBox, SIGNAL(valueChanged(int)), this, SLOT(setZHR
FromControls(int))); (int)));
updateZhrDescription(); setZHR(mmgr->getZHR());
// Labels section // Labels section
StarMgr* smgr = GETSTELMODULE(StarMgr); StarMgr* smgr = GETSTELMODULE(StarMgr);
connectCheckBox(ui->starLabelCheckBox, "actionShow_Stars_Labels"); connectCheckBox(ui->starLabelCheckBox, "actionShow_Stars_Labels");
connectCheckBox(ui->nebulaLabelCheckBox, "actionShow_Nebulas"); connectGroupBox(ui->groupBoxLabelsAndMarkers, "actionShow_Nebulas");
connectCheckBox(ui->planetLabelCheckBox, "actionShow_Planets_Labels" ); connectCheckBox(ui->planetLabelCheckBox, "actionShow_Planets_Labels" );
NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
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->getLabelsAmo unt()*10.f));
connect(ui->nebulasLabelsHorizontalSlider, SIGNAL(valueChanged(int)) , this, SLOT(nebulasLabelsValueChanged(int))); connect(ui->nebulasLabelsHorizontalSlider, SIGNAL(valueChanged(int)) , this, SLOT(nebulasLabelsValueChanged(int)));
ui->nebulasHintsHorizontalSlider->setValue((int)(nmgr->getHintsAmoun
t()*10.f));
connect(ui->nebulasHintsHorizontalSlider, SIGNAL(valueChanged(int)),
this, SLOT(nebulasMarkersValueChanged(int)));
// Landscape section // Landscape section
LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
connectCheckBox(ui->showGroundCheckBox, "actionShow_Ground"); connectCheckBox(ui->showGroundCheckBox, "actionShow_Ground");
connectCheckBox(ui->showFogCheckBox, "actionShow_Fog"); connectCheckBox(ui->showFogCheckBox, "actionShow_Fog");
connectGroupBox(ui->atmosphereGroupBox, "actionShow_Atmosphere"); connectGroupBox(ui->atmosphereGroupBox, "actionShow_Atmosphere");
connectCheckBox(ui->landscapeIlluminationCheckBox, "actionShow_Lands capeIllumination"); connectCheckBox(ui->landscapeIlluminationCheckBox, "actionShow_Lands capeIllumination");
connectCheckBox(ui->landscapeLabelsCheckBox, "actionShow_LandscapeLa bels");
ui->landscapePositionCheckBox->setChecked(lmgr->getFlagLandscapeSets Location()); ui->landscapePositionCheckBox->setChecked(lmgr->getFlagLandscapeSets Location());
connect(ui->landscapePositionCheckBox, SIGNAL(toggled(bool)), lmgr, SLOT(setFlagLandscapeSetsLocation(bool))); connect(ui->landscapePositionCheckBox, SIGNAL(toggled(bool)), lmgr, SLOT(setFlagLandscapeSetsLocation(bool)));
ui->landscapeBrightnessCheckBox->setChecked(lmgr->getFlagLandscapeUs eMinimalBrightness()); ui->landscapeBrightnessCheckBox->setChecked(lmgr->getFlagLandscapeUs eMinimalBrightness());
connect(ui->landscapeBrightnessCheckBox, SIGNAL(toggled(bool)), this , SLOT(setFlagLandscapeUseMinimalBrightness(bool))); connect(ui->landscapeBrightnessCheckBox, SIGNAL(toggled(bool)), this , SLOT(setFlagLandscapeUseMinimalBrightness(bool)));
ui->landscapeBrightnessSpinBox->setValue(lmgr->getDefaultMinimalBrig htness()); ui->landscapeBrightnessSpinBox->setValue(lmgr->getDefaultMinimalBrig htness());
connect(ui->landscapeBrightnessSpinBox, SIGNAL(valueChanged(double)) , lmgr, SLOT(setDefaultMinimalBrightness(double))); connect(ui->landscapeBrightnessSpinBox, SIGNAL(valueChanged(double)) , lmgr, SLOT(setDefaultMinimalBrightness(double)));
ui->localLandscapeBrightnessCheckBox->setChecked(lmgr->getFlagLandsc apeSetsMinimalBrightness()); ui->localLandscapeBrightnessCheckBox->setChecked(lmgr->getFlagLandsc apeSetsMinimalBrightness());
connect(ui->localLandscapeBrightnessCheckBox, SIGNAL(toggled(bool)), lmgr, SLOT(setFlagLandscapeSetsMinimalBrightness(bool))); connect(ui->localLandscapeBrightnessCheckBox, SIGNAL(toggled(bool)), lmgr, SLOT(setFlagLandscapeSetsMinimalBrightness(bool)));
skipping to change at line 269 skipping to change at line 299
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()));
connect(GETSTELMODULE(LandscapeMgr), SIGNAL(landscapesChanged()), th is, SLOT(populateLists())); connect(GETSTELMODULE(LandscapeMgr), SIGNAL(landscapesChanged()), th is, SLOT(populateLists()));
connect(ui->pushButtonAddRemoveLandscapes, SIGNAL(clicked()), this, SLOT(showAddRemoveLandscapesDialog())); connect(ui->pushButtonAddRemoveLandscapes, SIGNAL(clicked()), this, SLOT(showAddRemoveLandscapesDialog()));
// Grid and lines // Grid and lines
connectCheckBox(ui->showEquatorLineCheckBox, "actionShow_Equator_Lin e"); connectCheckBox(ui->showEquatorLineCheckBox, "actionShow_Equator_Lin e");
connectCheckBox(ui->showEclipticLineCheckBox, "actionShow_Ecliptic_L connectCheckBox(ui->showEquatorJ2000LineCheckBox, "actionShow_Equato
ine"); r_J2000_Line");
connectCheckBox(ui->showEclipticLineJ2000CheckBox, "actionShow_Eclip
tic_J2000_Line");
connectCheckBox(ui->showEclipticLineOfDateCheckBox, "actionShow_Ecli
ptic_Line");
connectCheckBox(ui->showMeridianLineCheckBox, "actionShow_Meridian_L ine"); connectCheckBox(ui->showMeridianLineCheckBox, "actionShow_Meridian_L ine");
connectCheckBox(ui->showLongitudeLineCheckBox, "actionShow_Longitude _Line"); connectCheckBox(ui->showLongitudeLineCheckBox, "actionShow_Longitude _Line");
connectCheckBox(ui->showHorizonLineCheckBox, "actionShow_Horizon_Lin e"); connectCheckBox(ui->showHorizonLineCheckBox, "actionShow_Horizon_Lin e");
connectCheckBox(ui->showEquatorialGridCheckBox, "actionShow_Equatori al_Grid"); connectCheckBox(ui->showEquatorialGridCheckBox, "actionShow_Equatori al_Grid");
connectCheckBox(ui->showGalacticGridCheckBox, "actionShow_Galactic_G rid"); connectCheckBox(ui->showGalacticGridCheckBox, "actionShow_Galactic_G rid");
connectCheckBox(ui->showGalacticEquatorLineCheckBox, "actionShow_Gal actic_Equator_Line"); connectCheckBox(ui->showGalacticEquatorLineCheckBox, "actionShow_Gal actic_Equator_Line");
connectCheckBox(ui->showAzimuthalGridCheckBox, "actionShow_Azimuthal _Grid"); connectCheckBox(ui->showAzimuthalGridCheckBox, "actionShow_Azimuthal _Grid");
connectCheckBox(ui->showEquatorialJ2000GridCheckBox, "actionShow_Equ atorial_J2000_Grid"); connectCheckBox(ui->showEquatorialJ2000GridCheckBox, "actionShow_Equ atorial_J2000_Grid");
connectCheckBox(ui->showEclipticGridJ2000CheckBox, "actionShow_Eclip tic_J2000_Grid"); connectCheckBox(ui->showEclipticGridJ2000CheckBox, "actionShow_Eclip tic_J2000_Grid");
connectCheckBox(ui->showEclipticGridOfDateCheckBox, "actionShow_Ecli ptic_Grid");
connectCheckBox(ui->showCardinalPointsCheckBox, "actionShow_Cardinal _Points"); connectCheckBox(ui->showCardinalPointsCheckBox, "actionShow_Cardinal _Points");
connectCheckBox(ui->showPrecessionCirclesCheckBox, "actionShow_Prece ssion_Circles");
// Constellations // Constellations
ConstellationMgr* cmgr = GETSTELMODULE(ConstellationMgr); ConstellationMgr* cmgr = GETSTELMODULE(ConstellationMgr);
connectCheckBox(ui->showConstellationLinesCheckBox, "actionShow_Cons tellation_Lines"); connectCheckBox(ui->showConstellationLinesCheckBox, "actionShow_Cons tellation_Lines");
connectCheckBox(ui->showConstellationLabelsCheckBox, "actionShow_Con stellation_Labels"); connectCheckBox(ui->showConstellationLabelsCheckBox, "actionShow_Con stellation_Labels");
connectCheckBox(ui->showConstellationBoundariesCheckBox, "actionShow _Constellation_Boundaries"); connectCheckBox(ui->showConstellationBoundariesCheckBox, "actionShow _Constellation_Boundaries");
connectCheckBox(ui->showConstellationArtCheckBox, "actionShow_Conste llation_Art"); connectCheckBox(ui->showConstellationArtCheckBox, "actionShow_Conste llation_Art");
ui->constellationArtBrightnessSpinBox->setValue(cmgr->getArtIntensit y()); ui->constellationArtBrightnessSpinBox->setValue(cmgr->getArtIntensit y());
connect(ui->constellationArtBrightnessSpinBox, SIGNAL(valueChanged(d ouble)), cmgr, SLOT(setArtIntensity(double))); connect(ui->constellationArtBrightnessSpinBox, SIGNAL(valueChanged(d ouble)), cmgr, SLOT(setArtIntensity(double)));
ui->constellationLineThicknessSpinBox->setValue(cmgr->getConstellati onLineThickness()); ui->constellationLineThicknessSpinBox->setValue(cmgr->getConstellati onLineThickness());
skipping to change at line 350 skipping to change at line 384
{ {
int textWidth = fontMetrics.width(ui->stackListWidget->item( row)->text()); int textWidth = fontMetrics.width(ui->stackListWidget->item( row)->text());
width += iconSize > textWidth ? iconSize : textWidth; // use the wider one width += iconSize > textWidth ? iconSize : textWidth; // use the wider one
width += 24; // margin - 12px left and 12px right width += 24; // margin - 12px left and 12px right
} }
// Hack to force the window to be resized... // Hack to force the window to be resized...
ui->stackListWidget->setMinimumWidth(width); ui->stackListWidget->setMinimumWidth(width);
} }
void ViewDialog::setSelectedCatalogsFromCheckBoxes()
{
Nebula::CatalogGroup flags(0);
if (ui->checkBoxNGC->isChecked())
flags |= Nebula::CatNGC;
if (ui->checkBoxIC->isChecked())
flags |= Nebula::CatIC;
if (ui->checkBoxM->isChecked())
flags |= Nebula::CatM;
if (ui->checkBoxC->isChecked())
flags |= Nebula::CatC;
if (ui->checkBoxB->isChecked())
flags |= Nebula::CatB;
if (ui->checkBoxSh2->isChecked())
flags |= Nebula::CatSh2;
if (ui->checkBoxVdB->isChecked())
flags |= Nebula::CatVdB;
if (ui->checkBoxRCW->isChecked())
flags |= Nebula::CatRCW;
if (ui->checkBoxLBN->isChecked())
flags |= Nebula::CatLBN;
if (ui->checkBoxLDN->isChecked())
flags |= Nebula::CatLDN;
if (ui->checkBoxCr->isChecked())
flags |= Nebula::CatCr;
if (ui->checkBoxMel->isChecked())
flags |= Nebula::CatMel;
if (ui->checkBoxCed->isChecked())
flags |= Nebula::CatCed;
if (ui->checkBoxPGC->isChecked())
flags |= Nebula::CatPGC;
if (ui->checkBoxUGC->isChecked())
flags |= Nebula::CatUGC;
GETSTELMODULE(NebulaMgr)->setCatalogFilters(flags);
}
void ViewDialog::setSelectedTypesFromCheckBoxes()
{
Nebula::TypeGroup flags(0);
if (ui->checkBoxGalaxiesType->isChecked())
flags |= Nebula::TypeGalaxies;
if (ui->checkBoxActiveGalaxiesType->isChecked())
flags |= Nebula::TypeActiveGalaxies;
if (ui->checkBoxInteractingGalaxiesType->isChecked())
flags |= Nebula::TypeInteractingGalaxies;
if (ui->checkBoxStarClustersType->isChecked())
flags |= Nebula::TypeStarClusters;
if (ui->checkBoxBrightNebulaeType->isChecked())
flags |= Nebula::TypeBrightNebulae;
if (ui->checkBoxDarkNebulaeType->isChecked())
flags |= Nebula::TypeDarkNebulae;
if (ui->checkBoxPlanetaryNebulaeType->isChecked())
flags |= Nebula::TypePlanetaryNebulae;
if (ui->checkBoxHydrogenRegionsType->isChecked())
flags |= Nebula::TypeHydrogenRegions;
if (ui->checkBoxSupernovaRemnantsType->isChecked())
flags |= Nebula::TypeSupernovaRemnants;
if (ui->checkBoxOtherType->isChecked())
flags |= Nebula::TypeOther;
GETSTELMODULE(NebulaMgr)->setTypeFilters(flags);
}
void ViewDialog::updateSelectedCatalogsCheckBoxes()
{
const Nebula::CatalogGroup& flags = GETSTELMODULE(NebulaMgr)->getCat
alogFilters();
ui->checkBoxNGC->setChecked(flags & Nebula::CatNGC);
ui->checkBoxIC->setChecked(flags & Nebula::CatIC);
ui->checkBoxM->setChecked(flags & Nebula::CatM);
ui->checkBoxC->setChecked(flags & Nebula::CatC);
ui->checkBoxB->setChecked(flags & Nebula::CatB);
ui->checkBoxSh2->setChecked(flags & Nebula::CatSh2);
ui->checkBoxVdB->setChecked(flags & Nebula::CatVdB);
ui->checkBoxRCW->setChecked(flags & Nebula::CatRCW);
ui->checkBoxLDN->setChecked(flags & Nebula::CatLDN);
ui->checkBoxLBN->setChecked(flags & Nebula::CatLBN);
ui->checkBoxCr->setChecked(flags & Nebula::CatCr);
ui->checkBoxMel->setChecked(flags & Nebula::CatMel);
ui->checkBoxCed->setChecked(flags & Nebula::CatCed);
ui->checkBoxPGC->setChecked(flags & Nebula::CatPGC);
ui->checkBoxUGC->setChecked(flags & Nebula::CatUGC);
}
void ViewDialog::updateSelectedTypesCheckBoxes()
{
const Nebula::TypeGroup& flags = GETSTELMODULE(NebulaMgr)->getTypeFi
lters();
ui->checkBoxGalaxiesType->setChecked(flags & Nebula::TypeGalaxies);
ui->checkBoxActiveGalaxiesType->setChecked(flags & Nebula::TypeActiv
eGalaxies);
ui->checkBoxInteractingGalaxiesType->setChecked(flags & Nebula::Type
InteractingGalaxies);
ui->checkBoxStarClustersType->setChecked(flags & Nebula::TypeStarClu
sters);
ui->checkBoxBrightNebulaeType->setChecked(flags & Nebula::TypeBright
Nebulae);
ui->checkBoxDarkNebulaeType->setChecked(flags & Nebula::TypeDarkNebu
lae);
ui->checkBoxPlanetaryNebulaeType->setChecked(flags & Nebula::TypePla
netaryNebulae);
ui->checkBoxHydrogenRegionsType->setChecked(flags & Nebula::TypeHydr
ogenRegions);
ui->checkBoxSupernovaRemnantsType->setChecked(flags & Nebula::TypeSu
pernovaRemnants);
ui->checkBoxOtherType->setChecked(flags & Nebula::TypeOther);
}
void ViewDialog::setFlagLandscapeUseMinimalBrightness(bool b) void ViewDialog::setFlagLandscapeUseMinimalBrightness(bool b)
{ {
LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
lmgr->setFlagLandscapeUseMinimalBrightness(b); lmgr->setFlagLandscapeUseMinimalBrightness(b);
populateLandscapeMinimalBrightness(); populateLandscapeMinimalBrightness();
} }
void ViewDialog::populateLandscapeMinimalBrightness() void ViewDialog::populateLandscapeMinimalBrightness()
{ {
if (ui->landscapeBrightnessCheckBox->isChecked()) if (ui->landscapeBrightnessCheckBox->isChecked())
skipping to change at line 603 skipping to change at line 740
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));
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
Q_ASSERT(gui); Q_ASSERT(gui);
ui->projectionTextBrowser->document()->setDefaultStyleSheet(QString( gui->getStelStyle().htmlStyleSheet)); ui->projectionTextBrowser->document()->setDefaultStyleSheet(QString( gui->getStelStyle().htmlStyleSheet));
ui->projectionTextBrowser->setHtml(core->getProjection(StelCore::Fra meJ2000)->getHtmlSummary()); ui->projectionTextBrowser->setHtml(core->getProjection(StelCore::Fra meJ2000)->getHtmlSummary());
} }
void ViewDialog::viewportVerticalShiftChanged(const int shift)
{
StelCore* core = StelApp::getInstance().getCore();
StelProjector::StelProjectorParams params=core->getCurrentStelProjec
torParams();
params.viewportCenterOffset[1]=qMax(-0.5f, qMin(shift/100.0f, 0.5f))
; // Sanity check
params.viewportCenter.set(params.viewportXywh[0]+(0.5f+params.viewpo
rtCenterOffset.v[0])*params.viewportXywh[2],
params.viewportXywh[1]+(0.5f+params.viewpo
rtCenterOffset.v[1])*params.viewportXywh[3]);
core->setCurrentStelProjectorParams(params);
}
void ViewDialog::landscapeChanged(QListWidgetItem* item) void ViewDialog::landscapeChanged(QListWidgetItem* item)
{ {
LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
lmgr->setCurrentLandscapeName(item->data(Qt::UserRole).toString()); lmgr->setCurrentLandscapeName(item->data(Qt::UserRole).toString());
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
Q_ASSERT(gui); Q_ASSERT(gui);
ui->landscapeTextBrowser->document()->setDefaultStyleSheet(QString(g ui->getStelStyle().htmlStyleSheet)); ui->landscapeTextBrowser->document()->setDefaultStyleSheet(QString(g ui->getStelStyle().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());
//StelSkyDrawer *drawer=StelApp::getInstance().getSkyDrawer(); // Reset values that might have changed.
// GZ: Reset values that might have changed.
ui->showFogCheckBox->setChecked(lmgr->getFlagFog()); ui->showFogCheckBox->setChecked(lmgr->getFlagFog());
ui->lightPollutionSpinBox->setValue(StelApp::getInstance().getCore() ->getSkyDrawer()->getBortleScaleIndex()); ui->lightPollutionSpinBox->setValue(StelApp::getInstance().getCore() ->getSkyDrawer()->getBortleScaleIndex());
} }
void ViewDialog::showAddRemoveLandscapesDialog() void ViewDialog::showAddRemoveLandscapesDialog()
{ {
if(addRemoveLandscapesDialog == NULL) if(addRemoveLandscapesDialog == NULL)
addRemoveLandscapesDialog = new AddRemoveLandscapesDialog(); addRemoveLandscapesDialog = new AddRemoveLandscapesDialog();
addRemoveLandscapesDialog->setVisible(true); addRemoveLandscapesDialog->setVisible(true);
} }
void ViewDialog::showAtmosphereDialog() void ViewDialog::showAtmosphereDialog()
{ {
if(atmosphereDialog == NULL) if(atmosphereDialog == NULL)
atmosphereDialog = new AtmosphereDialog(); atmosphereDialog = new AtmosphereDialog();
//ui->temperatureDoubleSpinBox->setValue(StelApp::getInstance().getC
ore()->getSkyDrawer()->getAtmosphereTemperature());
//ui->extinctionDoubleSpinBox->setValue(StelApp::getInstance().getCo
re()->getSkyDrawer()->getExtinctionCoefficient());
//ui->pressureDoubleSpinBox->setValue(StelApp::getInstance().getCore
()->getSkyDrawer()->getAtmospherePressure());
atmosphereDialog->setVisible(true); atmosphereDialog->setVisible(true);
} }
void ViewDialog::setZhrFromControls(int zhr) void ViewDialog::setZHR(int zhr)
{
MeteorMgr* mmgr = GETSTELMODULE(MeteorMgr);
if (zhr==0)
{
mmgr->setFlagShow(false);
}
else
{
mmgr->setFlagShow(true);
mmgr->setZHR(zhr);
}
updateZhrDescription();
}
void ViewDialog::updateZhrControls(int zhr)
{ {
SporadicMeteorMgr* mmgr = GETSTELMODULE(SporadicMeteorMgr);
mmgr->blockSignals(true);
ui->zhrSlider->blockSignals(true);
ui->zhrSpinBox->blockSignals(true);
mmgr->setFlagShow(zhr > 0);
mmgr->setZHR(zhr);
ui->zhrSlider->setValue(zhr);
ui->zhrSpinBox->setValue(zhr); ui->zhrSpinBox->setValue(zhr);
updateZhrDescription(); updateZhrDescription();
mmgr->blockSignals(false);
ui->zhrSlider->blockSignals(false);
ui->zhrSpinBox->blockSignals(false);
} }
void ViewDialog::updateZhrDescription() void ViewDialog::updateZhrDescription()
{ {
int zhr = ui->zhrSpinBox->value(); int zhr = ui->zhrSpinBox->value();
switch (zhr) switch (zhr)
{ {
case 0: case 0:
ui->zhrLabel->setText("<small><i>"+q_("No shooting s tars")+"</i></small>"); ui->zhrLabel->setText("<small><i>"+q_("No shooting s tars")+"</i></small>");
break; break;
skipping to change at line 742 skipping to change at line 884
{ {
SolarSystem* ssmgr = 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 = GETSTELMODULE(NebulaMgr); NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
float a= ((float)v)/10.f; float a= ((float)v)/10.f;
nmgr->setHintsAmount(a);
nmgr->setLabelsAmount(a); nmgr->setLabelsAmount(a);
} }
void ViewDialog::nebulasMarkersValueChanged(int v)
{
NebulaMgr* nmgr = GETSTELMODULE(NebulaMgr);
float a= ((float)v)/10.f;
nmgr->setHintsAmount(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())
{ {
 End of changes. 31 change blocks. 
42 lines changed or deleted 223 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/