ViewDialog.cpp   ViewDialog.cpp 
skipping to change at line 26 skipping to change at line 26
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "ViewDialog.hpp" #include "ViewDialog.hpp"
#include "ui_viewDialog.h" #include "ui_viewDialog.h"
#include "AddRemoveLandscapesDialog.hpp" #include "AddRemoveLandscapesDialog.hpp"
#include "AtmosphereDialog.hpp" #include "AtmosphereDialog.hpp"
#include "GreatRedSpotDialog.hpp" #include "GreatRedSpotDialog.hpp"
#include "ConfigureDSOColorsDialog.hpp"
#include "ConfigureOrbitColorsDialog.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#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"
skipping to change at line 49 skipping to change at line 51
#include "ZodiacalLight.hpp" #include "ZodiacalLight.hpp"
#include "ConstellationMgr.hpp" #include "ConstellationMgr.hpp"
#include "SporadicMeteorMgr.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 "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "GridLinesMgr.hpp"
#include <QDebug> #include <QDebug>
#include <QFrame> #include <QFrame>
#include <QFile> #include <QFile>
#include <QFileInfo> #include <QFileInfo>
#include <QSettings> #include <QSettings>
#include <QTimer> #include <QTimer>
#include <QDialog> #include <QDialog>
#include <QStringList> #include <QStringList>
#include <QColorDialog>
ViewDialog::ViewDialog(QObject* parent) : StelDialog(parent) ViewDialog::ViewDialog(QObject* parent) : StelDialog(parent)
{ {
dialogName = "View"; dialogName = "View";
ui = new Ui_viewDialogForm; ui = new Ui_viewDialogForm;
addRemoveLandscapesDialog = NULL; addRemoveLandscapesDialog = NULL;
atmosphereDialog=NULL; atmosphereDialog=NULL;
greatRedSpotDialog=NULL; greatRedSpotDialog=NULL;
configureDSOColorsDialog=NULL;
configureOrbitColorsDialog=NULL;
} }
ViewDialog::~ViewDialog() ViewDialog::~ViewDialog()
{ {
delete ui; delete ui;
ui=NULL; ui=NULL;
delete addRemoveLandscapesDialog; delete addRemoveLandscapesDialog;
addRemoveLandscapesDialog = NULL; addRemoveLandscapesDialog = NULL;
delete atmosphereDialog; delete atmosphereDialog;
atmosphereDialog = NULL; atmosphereDialog = NULL;
delete greatRedSpotDialog; delete greatRedSpotDialog;
greatRedSpotDialog = NULL; greatRedSpotDialog = NULL;
delete configureDSOColorsDialog;
configureDSOColorsDialog = NULL;
delete configureOrbitColorsDialog;
configureOrbitColorsDialog = NULL;
} }
void ViewDialog::retranslate() void ViewDialog::retranslate()
{ {
if (dialog) if (dialog)
{ {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
updateZhrDescription(GETSTELMODULE(SporadicMeteorMgr)->getZH R()); updateZhrDescription(GETSTELMODULE(SporadicMeteorMgr)->getZH R());
populateLists(); populateLists();
setBortleScaleToolTip(StelApp::getInstance().getCore()->getS kyDrawer()->getBortleScaleIndex()); setBortleScaleToolTip(StelApp::getInstance().getCore()->getS kyDrawer()->getBortleScaleIndex());
skipping to change at line 163 skipping to change at line 173
updateSelectedCatalogsCheckBoxes(); updateSelectedCatalogsCheckBoxes();
connect(nmgr, SIGNAL(catalogFiltersChanged(Nebula::CatalogGroup)), t his, SLOT(updateSelectedCatalogsCheckBoxes())); connect(nmgr, SIGNAL(catalogFiltersChanged(Nebula::CatalogGroup)), t his, SLOT(updateSelectedCatalogsCheckBoxes()));
connect(ui->buttonGroupDisplayedDSOCatalogs, SIGNAL(buttonClicked(in t)), this, SLOT(setSelectedCatalogsFromCheckBoxes())); connect(ui->buttonGroupDisplayedDSOCatalogs, SIGNAL(buttonClicked(in t)), this, SLOT(setSelectedCatalogsFromCheckBoxes()));
updateSelectedTypesCheckBoxes(); updateSelectedTypesCheckBoxes();
connect(nmgr, SIGNAL(typeFiltersChanged(Nebula::TypeGroup)), this, S LOT(updateSelectedTypesCheckBoxes())); connect(nmgr, SIGNAL(typeFiltersChanged(Nebula::TypeGroup)), this, S LOT(updateSelectedTypesCheckBoxes()));
connect(ui->buttonGroupDisplayedDSOTypes, SIGNAL(buttonClicked(int)) , this, SLOT(setSelectedTypesFromCheckBoxes())); connect(ui->buttonGroupDisplayedDSOTypes, SIGNAL(buttonClicked(int)) , this, SLOT(setSelectedTypesFromCheckBoxes()));
connectGroupBox(ui->groupBoxDSOTypeFilters,"actionSet_Nebula_TypeFil terUsage"); connectGroupBox(ui->groupBoxDSOTypeFilters,"actionSet_Nebula_TypeFil terUsage");
connectBoolProperty(ui->checkBoxProportionalHints, "NebulaMgr.hintsP roportional"); connectBoolProperty(ui->checkBoxProportionalHints, "NebulaMgr.hintsP roportional");
connectBoolProperty(ui->checkBoxSurfaceBrightnessUsage, "NebulaMgr.f lagSurfaceBrightnessUsage"); connectBoolProperty(ui->checkBoxSurfaceBrightnessUsage, "NebulaMgr.f lagSurfaceBrightnessUsage");
connectBoolProperty(ui->checkBoxDesignationsOnlyUsage, "NebulaMgr.fl agDesignationLabels"); connectBoolProperty(ui->checkBoxDesignationsOnlyUsage, "NebulaMgr.fl agDesignationLabels");
connect(ui->pushButtonConfigureDSOColors, SIGNAL(clicked()), this, S LOT(showConfigureDSOColorsDialog()));
// From Trunk, but seems OK here. It was close to end before. // From Trunk, but seems OK here. It was close to end before.
connect(ui->stackListWidget, SIGNAL(currentItemChanged(QListWidgetIt em *, QListWidgetItem *)), this, SLOT(changePage(QListWidgetItem *, QListWi dgetItem*))); connect(ui->stackListWidget, SIGNAL(currentItemChanged(QListWidgetIt em *, QListWidgetItem *)), this, SLOT(changePage(QListWidgetItem *, QListWi dgetItem*)));
// Stars section // Stars section
connectGroupBox(ui->starGroupBox, "actionShow_Stars"); // NEW FROM T RUNK connectGroupBox(ui->starGroupBox, "actionShow_Stars");
connectBoolProperty(ui->starTwinkleCheckBox, "StelSkyDrawer.flagTwin kle"); connectBoolProperty(ui->starTwinkleCheckBox, "StelSkyDrawer.flagTwin kle");
connectDoubleProperty(ui->starScaleRadiusDoubleSpinBox,"StelSkyDrawe r.absoluteStarScale"); connectDoubleProperty(ui->starScaleRadiusDoubleSpinBox,"StelSkyDrawe r.absoluteStarScale");
connectDoubleProperty(ui->starRelativeScaleDoubleSpinBox, "StelSkyDr awer.relativeStarScale"); connectDoubleProperty(ui->starRelativeScaleDoubleSpinBox, "StelSkyDr awer.relativeStarScale");
connectDoubleProperty(ui->milkyWayBrightnessDoubleSpinBox, "MilkyWay .intensity"); connectDoubleProperty(ui->milkyWayBrightnessDoubleSpinBox, "MilkyWay .intensity");
connectBoolProperty(ui->milkyWayCheckBox, "MilkyWay.flagMilkyWayDisp layed");
connectBoolProperty(ui->zodiacalLightCheckBox, "ZodiacalLight.flagZo diacalLightDisplayed"); connectBoolProperty(ui->zodiacalLightCheckBox, "ZodiacalLight.flagZo diacalLightDisplayed");
connectDoubleProperty(ui->zodiacalLightBrightnessDoubleSpinBox, "Zod iacalLight.intensity"); connectDoubleProperty(ui->zodiacalLightBrightnessDoubleSpinBox, "Zod iacalLight.intensity");
connectDoubleProperty(ui->starTwinkleAmountDoubleSpinBox, "StelSkyDr awer.twinkleAmount"); connectDoubleProperty(ui->starTwinkleAmountDoubleSpinBox, "StelSkyDr awer.twinkleAmount");
connectBoolProperty(ui->adaptationCheckbox, "StelSkyDrawer.flagLumin anceAdaptation"); connectBoolProperty(ui->adaptationCheckbox, "StelSkyDrawer.flagLumin anceAdaptation");
// Limit Magnitudes // Limit Magnitudes
// Stars // Stars
connectBoolProperty(ui->starLimitMagnitudeCheckBox,"StelSkyDrawer.fl agStarMagnitudeLimit"); connectBoolProperty(ui->starLimitMagnitudeCheckBox,"StelSkyDrawer.fl agStarMagnitudeLimit");
connectDoubleProperty(ui->starLimitMagnitudeDoubleSpinBox, "StelSkyD rawer.customStarMagLimit"); connectDoubleProperty(ui->starLimitMagnitudeDoubleSpinBox, "StelSkyD rawer.customStarMagLimit");
// Planets // Planets
skipping to change at line 211 skipping to change at line 223
// NEW SECTION FROM TRUNK: GreatRedSpot (Jupiter) // NEW SECTION FROM TRUNK: GreatRedSpot (Jupiter)
// TODO: put under Properties system! // TODO: put under Properties system!
SolarSystem* ssmgr = GETSTELMODULE(SolarSystem); SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
Q_ASSERT(ssmgr); Q_ASSERT(ssmgr);
bool grsFlag = ssmgr->getFlagCustomGrsSettings(); bool grsFlag = ssmgr->getFlagCustomGrsSettings();
ui->customGrsSettingsCheckBox->setChecked(grsFlag); ui->customGrsSettingsCheckBox->setChecked(grsFlag);
connect(ui->customGrsSettingsCheckBox, SIGNAL(toggled(bool)), this, SLOT(setFlagCustomGrsSettings(bool))); connect(ui->customGrsSettingsCheckBox, SIGNAL(toggled(bool)), this, SLOT(setFlagCustomGrsSettings(bool)));
ui->pushButtonGrsDetails->setEnabled(grsFlag); ui->pushButtonGrsDetails->setEnabled(grsFlag);
connect(ui->pushButtonGrsDetails, SIGNAL(clicked()), this, SLOT(show GreatRedSpotDialog())); connect(ui->pushButtonGrsDetails, SIGNAL(clicked()), this, SLOT(show GreatRedSpotDialog()));
connect(ui->pushButtonOrbitColors, SIGNAL(clicked(bool)), this, SLOT (showConfigureOrbitColorsDialog()));
// Shooting stars section // Shooting stars section
SporadicMeteorMgr* mmgr = GETSTELMODULE(SporadicMeteorMgr); SporadicMeteorMgr* mmgr = GETSTELMODULE(SporadicMeteorMgr);
Q_ASSERT(mmgr); Q_ASSERT(mmgr);
int zhr = mmgr->getZHR(); int zhr = mmgr->getZHR();
ui->zhrSlider->setValue(zhr); ui->zhrSlider->setValue(zhr);
ui->zhrSpinBox->setValue(zhr); ui->zhrSpinBox->setValue(zhr);
updateZhrDescription(zhr); updateZhrDescription(zhr);
//connect to the data, instead of the GUI //connect to the data, instead of the GUI
skipping to change at line 292 skipping to change at line 305
connect(drawer, SIGNAL(bortleScaleIndexChanged(int)), ui->lightPollu tionSpinBox, SLOT(setValue(int))); connect(drawer, SIGNAL(bortleScaleIndexChanged(int)), ui->lightPollu tionSpinBox, SLOT(setValue(int)));
connect(drawer, SIGNAL(bortleScaleIndexChanged(int)), this, SLOT(set BortleScaleToolTip(int))); connect(drawer, SIGNAL(bortleScaleIndexChanged(int)), this, SLOT(set BortleScaleToolTip(int)));
// Note: This has vanished in the merge on 20160411. -- Ah, moved to ConfigurationDialog. // Note: This has vanished in the merge on 20160411. -- Ah, moved to ConfigurationDialog.
//connectBoolProperty(ui->autoChangeLandscapesCheckBox,"LandscapeMgr .flagLandscapeAutoSelection"); //connectBoolProperty(ui->autoChangeLandscapesCheckBox,"LandscapeMgr .flagLandscapeAutoSelection");
// atmosphere details // atmosphere details
connect(ui->pushButtonAtmosphereDetails, SIGNAL(clicked()), this, SL OT(showAtmosphereDialog())); connect(ui->pushButtonAtmosphereDetails, SIGNAL(clicked()), this, SL OT(showAtmosphereDialog()));
// Grid and lines // Grid and lines
connectCheckBox(ui->showEquatorLineCheckBox, "actionShow_Equator_Lin connectCheckBox(ui->showEquatorLineCheckBox, "actionShow_
e"); Equator_Line");
connectCheckBox(ui->showEquatorJ2000LineCheckBox, "actionShow_Equato connectCheckBox(ui->showEquatorJ2000LineCheckBox, "actionShow_
r_J2000_Line"); Equator_J2000_Line");
connectCheckBox(ui->showEclipticLineJ2000CheckBox, "actionShow_Eclip connectCheckBox(ui->showEclipticLineJ2000CheckBox, "actionShow_
tic_J2000_Line"); Ecliptic_J2000_Line");
connectCheckBox(ui->showEclipticLineOfDateCheckBox, "actionShow_Ecli connectCheckBox(ui->showEclipticLineOfDateCheckBox, "actionShow_
ptic_Line"); Ecliptic_Line");
connectCheckBox(ui->showMeridianLineCheckBox, "actionShow_Meridian_L connectCheckBox(ui->showMeridianLineCheckBox, "actionShow_
ine"); Meridian_Line");
connectCheckBox(ui->showLongitudeLineCheckBox, "actionShow_Longitude connectCheckBox(ui->showLongitudeLineCheckBox, "actionShow_
_Line"); Longitude_Line");
connectCheckBox(ui->showHorizonLineCheckBox, "actionShow_Horizon_Lin connectCheckBox(ui->showHorizonLineCheckBox, "actionShow_
e"); Horizon_Line");
connectCheckBox(ui->showEquatorialGridCheckBox, "actionShow_Equatori connectCheckBox(ui->showEquatorialGridCheckBox, "actionShow_
al_Grid"); Equatorial_Grid");
connectCheckBox(ui->showGalacticGridCheckBox, "actionShow_Galactic_G connectCheckBox(ui->showGalacticGridCheckBox, "actionShow_
rid"); Galactic_Grid");
connectCheckBox(ui->showGalacticEquatorLineCheckBox, "actionShow_Gal connectCheckBox(ui->showGalacticEquatorLineCheckBox, "actionShow_
actic_Equator_Line"); Galactic_Equator_Line");
connectCheckBox(ui->showAzimuthalGridCheckBox, "actionShow_Azimuthal connectCheckBox(ui->showSupergalacticGridCheckBox, "actionShow_
_Grid"); Supergalactic_Grid");
connectCheckBox(ui->showEquatorialJ2000GridCheckBox, "actionShow_Equ connectCheckBox(ui->showSupergalacticEquatorLineCheckBox, "actionSho
atorial_J2000_Grid"); w_Supergalactic_Equator_Line");
connectCheckBox(ui->showEclipticGridJ2000CheckBox, "actionShow_Eclip connectCheckBox(ui->showAzimuthalGridCheckBox, "actionShow_
tic_J2000_Grid"); Azimuthal_Grid");
connectCheckBox(ui->showEclipticGridOfDateCheckBox, "actionShow_Ecli connectCheckBox(ui->showEquatorialJ2000GridCheckBox, "actionShow_
ptic_Grid"); Equatorial_J2000_Grid");
connectCheckBox(ui->showCardinalPointsCheckBox, "actionShow_Cardinal connectCheckBox(ui->showEclipticGridJ2000CheckBox, "actionShow_
_Points"); Ecliptic_J2000_Grid");
connectCheckBox(ui->showPrecessionCirclesCheckBox, "actionShow_Prece connectCheckBox(ui->showEclipticGridOfDateCheckBox, "actionShow_
ssion_Circles"); Ecliptic_Grid");
connectCheckBox(ui->showPrimeVerticalLineCheckBox, "actionShow_Prime connectCheckBox(ui->showCardinalPointsCheckBox, "actionShow_
_Vertical_Line"); Cardinal_Points");
connectCheckBox(ui->showColuresLineCheckBox, "actionShow_Colure_Line connectCheckBox(ui->showPrecessionCirclesCheckBox, "actionShow_
s"); Precession_Circles");
connectCheckBox(ui->showCircumpolarCirclesCheckBox, "actionShow_Circ connectCheckBox(ui->showPrimeVerticalLineCheckBox, "actionShow_
umpolar_Circles"); Prime_Vertical_Line");
connectCheckBox(ui->showColuresLineCheckBox, "actionShow_
Colure_Lines");
connectCheckBox(ui->showCircumpolarCirclesCheckBox, "actionShow_
Circumpolar_Circles");
connectCheckBox(ui->showCelestialJ2000PolesCheckBox, "actionShow_
Celestial_J2000_Poles");
connectCheckBox(ui->showCelestialPolesCheckBox, "actionShow_
Celestial_Poles");
connectCheckBox(ui->showZenithNadirCheckBox, "actionShow_
Zenith_Nadir");
connectCheckBox(ui->showEclipticJ2000PolesCheckBox, "actionShow_
Ecliptic_J2000_Poles");
connectCheckBox(ui->showEclipticPolesCheckBox, "actionShow_
Ecliptic_Poles");
connectCheckBox(ui->showGalacticPolesCheckBox, "actionShow_
Galactic_Poles");
connectCheckBox(ui->showSupergalacticPolesCheckBox, "actionShow_
Supergalactic_Poles");
connectCheckBox(ui->showEquinoxJ2000PointsCheckBox, "actionShow_
Equinox_J2000_Points");
connectCheckBox(ui->showEquinoxPointsCheckBox, "actionShow_
Equinox_Points");
colorButton(ui->colorEclipticGridJ2000, "GridLinesMgr.eclipt
icJ2000GridColor");
colorButton(ui->colorEclipticGridOfDate, "GridLinesMgr.eclipt
icGridColor");
colorButton(ui->colorEquatorialJ2000Grid, "GridLinesMgr.equato
rJ2000GridColor");
colorButton(ui->colorEquatorialGrid, "GridLinesMgr.equato
rGridColor");
colorButton(ui->colorGalacticGrid, "GridLinesMgr.galact
icGridColor");
colorButton(ui->colorSupergalacticGrid, "GridLinesMgr.superg
alacticGridColor");
colorButton(ui->colorAzimuthalGrid, "GridLinesMgr.azimut
halGridColor");
colorButton(ui->colorEclipticLineJ2000, "GridLinesMgr.eclipt
icJ2000LineColor");
colorButton(ui->colorEclipticLineOfDate, "GridLinesMgr.eclipt
icLineColor");
colorButton(ui->colorEquatorJ2000Line, "GridLinesMgr.equato
rJ2000LineColor");
colorButton(ui->colorEquatorLine, "GridLinesMgr.equato
rLineColor");
colorButton(ui->colorGalacticEquatorLine, "GridLinesMgr.galact
icEquatorLineColor");
colorButton(ui->colorSupergalacticEquatorLine, "GridLinesMgr.superg
alacticEquatorLineColor");
colorButton(ui->colorHorizonLine, "GridLinesMgr.horizo
nLineColor");
colorButton(ui->colorLongitudeLine, "GridLinesMgr.longit
udeLineColor");
colorButton(ui->colorColuresLine, "GridLinesMgr.colure
LinesColor");
colorButton(ui->colorCircumpolarCircles, "GridLinesMgr.circum
polarCirclesColor");
colorButton(ui->colorPrecessionCircles, "GridLinesMgr.preces
sionCirclesColor");
colorButton(ui->colorPrimeVerticalLine, "GridLinesMgr.primeV
erticalLineColor");
colorButton(ui->colorMeridianLine, "GridLinesMgr.meridi
anLineColor");
colorButton(ui->colorCelestialJ2000Poles, "GridLinesMgr.celest
ialJ2000PolesColor");
colorButton(ui->colorCelestialPoles, "GridLinesMgr.celest
ialPolesColor");
colorButton(ui->colorZenithNadir, "GridLinesMgr.zenith
NadirColor");
colorButton(ui->colorEclipticJ2000Poles, "GridLinesMgr.eclipt
icJ2000PolesColor");
colorButton(ui->colorEclipticPoles, "GridLinesMgr.eclipt
icPolesColor");
colorButton(ui->colorGalacticPoles, "GridLinesMgr.galact
icPolesColor");
colorButton(ui->colorSupergalacticPoles, "GridLinesMgr.superg
alacticPolesColor");
colorButton(ui->colorEquinoxJ2000Points, "GridLinesMgr.equino
xJ2000PointsColor");
colorButton(ui->colorEquinoxPoints, "GridLinesMgr.equino
xPointsColor");
colorButton(ui->colorCardinalPoints, "LandscapeMgr.cardin
alsPointsColor");
connect(ui->colorEclipticGridJ2000, SIGNAL(released()),
this, SLOT(askEclipticJ2000GridColor()));
connect(ui->colorEclipticGridOfDate, SIGNAL(released()),
this, SLOT(askEclipticGridColor()));
connect(ui->colorEquatorialJ2000Grid, SIGNAL(released()),
this, SLOT(askEquatorJ2000GridColor()));
connect(ui->colorEquatorialGrid, SIGNAL(released()),
this, SLOT(askEquatorGridColor()));
connect(ui->colorGalacticGrid, SIGNAL(released()),
this, SLOT(askGalacticGridColor()));
connect(ui->colorSupergalacticGrid, SIGNAL(released()),
this, SLOT(askSupergalacticGridColor()));
connect(ui->colorAzimuthalGrid, SIGNAL(released()),
this, SLOT(askAzimuthalGridColor()));
connect(ui->colorEclipticLineJ2000, SIGNAL(released()),
this, SLOT(askEclipticLineJ2000Color()));
connect(ui->colorEclipticLineOfDate, SIGNAL(released()),
this, SLOT(askEclipticLineColor()));
connect(ui->colorEquatorJ2000Line, SIGNAL(released()),
this, SLOT(askEquatorLineJ2000Color()));
connect(ui->colorEquatorLine, SIGNAL(released()),
this, SLOT(askEquatorLineColor()));
connect(ui->colorGalacticEquatorLine, SIGNAL(released()),
this, SLOT(askGalacticEquatorLineColor()));
connect(ui->colorSupergalacticEquatorLine, SIGNAL(released()),
this, SLOT(askSupergalacticEquatorLineColor()));
connect(ui->colorHorizonLine, SIGNAL(released()),
this, SLOT(askHorizonLineColor()));
connect(ui->colorLongitudeLine, SIGNAL(released()),
this, SLOT(askLongitudeLineColor()));
connect(ui->colorColuresLine, SIGNAL(released()),
this, SLOT(askColureLinesColor()));
connect(ui->colorCircumpolarCircles, SIGNAL(released()),
this, SLOT(askCircumpolarCirclesColor()));
connect(ui->colorPrecessionCircles, SIGNAL(released()),
this, SLOT(askPrecessionCirclesColor()));
connect(ui->colorPrimeVerticalLine, SIGNAL(released()),
this, SLOT(askPrimeVerticalLineColor()));
connect(ui->colorMeridianLine, SIGNAL(released()),
this, SLOT(askMeridianLineColor()));
connect(ui->colorCelestialJ2000Poles, SIGNAL(released()),
this, SLOT(askCelestialJ2000PolesColor()));
connect(ui->colorCelestialPoles, SIGNAL(released()),
this, SLOT(askCelestialPolesColor()));
connect(ui->colorZenithNadir, SIGNAL(released()),
this, SLOT(askZenithNadirColor()));
connect(ui->colorEclipticJ2000Poles, SIGNAL(released()),
this, SLOT(askEclipticJ2000PolesColor()));
connect(ui->colorEclipticPoles, SIGNAL(released()),
this, SLOT(askEclipticPolesColor()));
connect(ui->colorGalacticPoles, SIGNAL(released()),
this, SLOT(askGalacticPolesColor()));
connect(ui->colorSupergalacticPoles, SIGNAL(released()),
this, SLOT(askSupergalacticPolesColor()));
connect(ui->colorEquinoxJ2000Points, SIGNAL(released()),
this, SLOT(askEquinoxJ2000PointsColor()));
connect(ui->colorEquinoxPoints, SIGNAL(released()),
this, SLOT(askEquinoxPointsColor()));
connect(ui->colorCardinalPoints, SIGNAL(released()),
this, SLOT(askCardinalPointsColor()));
// Constellations // Constellations
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");
connectDoubleProperty(ui->constellationArtBrightnessSpinBox,"Constel lationMgr.artIntensity"); connectDoubleProperty(ui->constellationArtBrightnessSpinBox,"Constel lationMgr.artIntensity");
connectDoubleProperty(ui->constellationLineThicknessSpinBox,"Constel lationMgr.constellationLineThickness"); connectDoubleProperty(ui->constellationLineThicknessSpinBox,"Constel lationMgr.constellationLineThickness");
colorButton(ui->colorConstellationBoundaries, "ConstellationMgr.bo
undariesColor");
colorButton(ui->colorConstellationLabels, "ConstellationMgr.na
mesColor");
colorButton(ui->colorConstellationLines, "ConstellationMgr.li
nesColor");
connect(ui->colorConstellationBoundaries, SIGNAL(released()),
this, SLOT(askConstellationBoundariesColor()));
connect(ui->colorConstellationLabels, SIGNAL(released()),
this, SLOT(askConstellationLabelsColor()));
connect(ui->colorConstellationLines, SIGNAL(released()),
this, SLOT(askConstellationLinesColor()));
// Starlore // Starlore
connect(ui->useAsDefaultSkyCultureCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentCultureAsDefault())); connect(ui->useAsDefaultSkyCultureCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentCultureAsDefault()));
connect(&StelApp::getInstance().getSkyCultureMgr(), SIGNAL(defaultSk yCultureChanged(QString)),this,SLOT(updateDefaultSkyCulture())); connect(&StelApp::getInstance().getSkyCultureMgr(), SIGNAL(defaultSk yCultureChanged(QString)),this,SLOT(updateDefaultSkyCulture()));
updateDefaultSkyCulture(); updateDefaultSkyCulture();
connectCheckBox(ui->nativeNameCheckBox,"actionShow_Skyculture_Native names"); connectCheckBox(ui->nativeNameCheckBox,"actionShow_Skyculture_Native names");
// allow to display short names and inhibit translation. // allow to display short names and inhibit translation.
connectIntProperty(ui->skyCultureNamesStyleComboBox,"ConstellationMg r.constellationDisplayStyle"); connectIntProperty(ui->skyCultureNamesStyleComboBox,"ConstellationMg r.constellationDisplayStyle");
// Sky layers. This not yet finished and not visible in releases. // Sky layers. This not yet finished and not visible in releases.
// TODO: These 4 lines are commented away in trunk. // TODO: These 4 lines are commented away in trunk.
populateSkyLayersList(); populateSkyLayersList();
connect(this, SIGNAL(visibleChanged(bool)), this, SLOT(populateSkyLa yersList())); connect(this, SIGNAL(visibleChanged(bool)), this, SLOT(populateSkyLa yersList()));
connect(ui->skyLayerListWidget, SIGNAL(currentTextChanged(const QStr ing&)), this, SLOT(skyLayersSelectionChanged(const QString&))); connect(ui->skyLayerListWidget, SIGNAL(currentTextChanged(const QStr ing&)), this, SLOT(skyLayersSelectionChanged(const QString&)));
connect(ui->skyLayerEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(skyLayersEnabledChanged(int))); connect(ui->skyLayerEnableCheckBox, SIGNAL(stateChanged(int)), this, SLOT(skyLayersEnabledChanged(int)));
updateTabBarListWidgetWidth(); updateTabBarListWidgetWidth();
} }
void ViewDialog::colorButton(QToolButton* toolButton, QString propName)
{
StelProperty* prop = StelApp::getInstance().getStelPropertyManager()
->getProperty(propName);
Vec3f vColor = prop->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
// Use style sheet for create a nice buttons :)
toolButton->setStyleSheet("QToolButton { background-color:" + color.
name() + "; }");
toolButton->setFixedSize(QSize(18, 18));
}
void ViewDialog::askEclipticJ2000GridColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.eclipticJ2000GridColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticG
ridJ2000->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticJ2000Grid(vColo
r);
StelApp::getInstance().getSettings()->setValue("color/eclipt
ical_J2000_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticGridJ2000->setStyleSheet("QToolButton { bac
kground-color:" + c.name() + "; }");
}
}
void ViewDialog::askEclipticGridColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.eclipticGridColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticG
ridOfDate->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticGrid(vColor);
StelApp::getInstance().getSettings()->setValue("color/eclipt
ical_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticGridOfDate->setStyleSheet("QToolButton { ba
ckground-color:" + c.name() + "; }");
}
}
void ViewDialog::askEquatorJ2000GridColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.equatorJ2000GridColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquatoria
lJ2000Grid->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquatorJ2000Grid(vColor
);
StelApp::getInstance().getSettings()->setValue("color/equato
rial_J2000_color", StelUtils::vec3fToStr(vColor));
ui->colorEquatorialJ2000Grid->setStyleSheet("QToolButton { b
ackground-color:" + c.name() + "; }");
}
}
void ViewDialog::askEquatorGridColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.equatorGridColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquatoria
lGrid->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquatorGrid(vColor);
StelApp::getInstance().getSettings()->setValue("color/equato
rial_color", StelUtils::vec3fToStr(vColor));
ui->colorEquatorialGrid->setStyleSheet("QToolButton { backgr
ound-color:" + c.name() + "; }");
}
}
void ViewDialog::askGalacticGridColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.galacticGridColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorGalacticG
rid->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorGalacticGrid(vColor);
StelApp::getInstance().getSettings()->setValue("color/galact
ic_color", StelUtils::vec3fToStr(vColor));
ui->colorGalacticGrid->setStyleSheet("QToolButton { backgrou
nd-color:" + c.name() + "; }");
}
}
void ViewDialog::askSupergalacticGridColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.supergalacticGridColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorSupergala
cticGrid->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorSupergalacticGrid(vColo
r);
StelApp::getInstance().getSettings()->setValue("color/superg
alactic_color", StelUtils::vec3fToStr(vColor));
ui->colorSupergalacticGrid->setStyleSheet("QToolButton { bac
kground-color:" + c.name() + "; }");
}
}
void ViewDialog::askAzimuthalGridColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.azimuthalGridColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorAzimuthal
Grid->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorAzimuthalGrid(vColor);
StelApp::getInstance().getSettings()->setValue("color/azimut
hal_color", StelUtils::vec3fToStr(vColor));
ui->colorAzimuthalGrid->setStyleSheet("QToolButton { backgro
und-color:" + c.name() + "; }");
}
}
void ViewDialog::askEclipticLineJ2000Color()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.eclipticJ2000LineColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticL
ineJ2000->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticJ2000Line(vColo
r);
StelApp::getInstance().getSettings()->setValue("color/eclipt
ic_J2000_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticLineJ2000->setStyleSheet("QToolButton { bac
kground-color:" + c.name() + "; }");
}
}
void ViewDialog::askEclipticLineColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.eclipticLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticL
ineOfDate->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticLine(vColor);
StelApp::getInstance().getSettings()->setValue("color/eclipt
ic_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticLineOfDate->setStyleSheet("QToolButton { ba
ckground-color:" + c.name() + "; }");
}
}
void ViewDialog::askEquatorLineJ2000Color()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.equatorJ2000LineColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquatorJ2
000Line->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquatorJ2000Line(vColor
);
StelApp::getInstance().getSettings()->setValue("color/equato
r_J2000_color", StelUtils::vec3fToStr(vColor));
ui->colorEquatorJ2000Line->setStyleSheet("QToolButton { back
ground-color:" + c.name() + "; }");
}
}
void ViewDialog::askEquatorLineColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.equatorLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquatorLi
ne->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquatorLine(vColor);
StelApp::getInstance().getSettings()->setValue("color/equato
r_color", StelUtils::vec3fToStr(vColor));
ui->colorEquatorLine->setStyleSheet("QToolButton { backgroun
d-color:" + c.name() + "; }");
}
}
void ViewDialog::askGalacticEquatorLineColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.galacticEquatorLineColor")->getValue().value<Vec3f>()
;
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorGalacticE
quatorLine->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorGalacticEquatorLine(vCo
lor);
StelApp::getInstance().getSettings()->setValue("color/galact
ic_equator_color", StelUtils::vec3fToStr(vColor));
ui->colorGalacticEquatorLine->setStyleSheet("QToolButton { b
ackground-color:" + c.name() + "; }");
}
}
void ViewDialog::askSupergalacticEquatorLineColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.supergalacticEquatorLineColor")->getValue().value<Vec
3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorSupergala
cticEquatorLine->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorSupergalacticEquatorLin
e(vColor);
StelApp::getInstance().getSettings()->setValue("color/superg
alactic_equator_color", StelUtils::vec3fToStr(vColor));
ui->colorSupergalacticEquatorLine->setStyleSheet("QToolButto
n { background-color:" + c.name() + "; }");
}
}
void ViewDialog::askHorizonLineColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.horizonLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorHorizonLi
ne->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorHorizonLine(vColor);
StelApp::getInstance().getSettings()->setValue("color/horizo
n_color", StelUtils::vec3fToStr(vColor));
ui->colorHorizonLine->setStyleSheet("QToolButton { backgroun
d-color:" + c.name() + "; }");
}
}
void ViewDialog::askLongitudeLineColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.longitudeLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorLongitude
Line->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorLongitudeLine(vColor);
StelApp::getInstance().getSettings()->setValue("color/longit
ude_color", StelUtils::vec3fToStr(vColor));
ui->colorLongitudeLine->setStyleSheet("QToolButton { backgro
und-color:" + c.name() + "; }");
}
}
void ViewDialog::askColureLinesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.colureLinesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorColuresLi
ne->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorColureLines(vColor);
StelApp::getInstance().getSettings()->setValue("color/colure
s_color", StelUtils::vec3fToStr(vColor));
ui->colorColuresLine->setStyleSheet("QToolButton { backgroun
d-color:" + c.name() + "; }");
}
}
void ViewDialog::askCircumpolarCirclesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.circumpolarCirclesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorCircumpol
arCircles->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorCircumpolarCircles(vCol
or);
StelApp::getInstance().getSettings()->setValue("color/circum
polar_circles_color", StelUtils::vec3fToStr(vColor));
ui->colorCircumpolarCircles->setStyleSheet("QToolButton { ba
ckground-color:" + c.name() + "; }");
}
}
void ViewDialog::askPrecessionCirclesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.precessionCirclesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorPrecessio
nCircles->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorPrecessionCircles(vColo
r);
StelApp::getInstance().getSettings()->setValue("color/preces
sion_circles_color", StelUtils::vec3fToStr(vColor));
ui->colorPrecessionCircles->setStyleSheet("QToolButton { bac
kground-color:" + c.name() + "; }");
}
}
void ViewDialog::askPrimeVerticalLineColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.primeVerticalLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorPrimeVert
icalLine->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorPrimeVerticalLine(vColo
r);
StelApp::getInstance().getSettings()->setValue("color/prime_
vertical_color", StelUtils::vec3fToStr(vColor));
ui->colorPrimeVerticalLine->setStyleSheet("QToolButton { bac
kground-color:" + c.name() + "; }");
}
}
void ViewDialog::askMeridianLineColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.meridianLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorMeridianL
ine->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorMeridianLine(vColor);
StelApp::getInstance().getSettings()->setValue("color/meridi
an_color", StelUtils::vec3fToStr(vColor));
ui->colorMeridianLine->setStyleSheet("QToolButton { backgrou
nd-color:" + c.name() + "; }");
}
}
void ViewDialog::askCelestialJ2000PolesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.celestialJ2000PolesColor")->getValue().value<Vec3f>()
;
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorCelestial
J2000Poles->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorCelestialJ2000Poles(vCo
lor);
StelApp::getInstance().getSettings()->setValue("color/celest
ial_J2000_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorCelestialJ2000Poles->setStyleSheet("QToolButton { b
ackground-color:" + c.name() + "; }");
}
}
void ViewDialog::askCelestialPolesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.celestialPolesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorCelestial
Poles->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorCelestialPoles(vColor);
StelApp::getInstance().getSettings()->setValue("color/celest
ial_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorCelestialPoles->setStyleSheet("QToolButton { backgr
ound-color:" + c.name() + "; }");
}
}
void ViewDialog::askZenithNadirColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.zenithNadirColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorZenithNad
ir->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorZenithNadir(vColor);
StelApp::getInstance().getSettings()->setValue("color/zenith
_nadir_color", StelUtils::vec3fToStr(vColor));
ui->colorZenithNadir->setStyleSheet("QToolButton { backgroun
d-color:" + c.name() + "; }");
}
}
void ViewDialog::askEclipticJ2000PolesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.eclipticJ2000PolesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticJ
2000Poles->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticJ2000Poles(vCol
or);
StelApp::getInstance().getSettings()->setValue("color/eclipt
ic_J2000_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticJ2000Poles->setStyleSheet("QToolButton { ba
ckground-color:" + c.name() + "; }");
}
}
void ViewDialog::askEclipticPolesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.eclipticPolesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticP
oles->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticPoles(vColor);
StelApp::getInstance().getSettings()->setValue("color/eclipt
ic_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticPoles->setStyleSheet("QToolButton { backgro
und-color:" + c.name() + "; }");
}
}
void ViewDialog::askGalacticPolesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.galacticPolesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorGalacticP
oles->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorGalacticPoles(vColor);
StelApp::getInstance().getSettings()->setValue("color/galact
ic_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorGalacticPoles->setStyleSheet("QToolButton { backgro
und-color:" + c.name() + "; }");
}
}
void ViewDialog::askSupergalacticPolesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.supergalacticPolesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorSupergala
cticPoles->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorSupergalacticPoles(vCol
or);
StelApp::getInstance().getSettings()->setValue("color/superg
alactic_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorSupergalacticPoles->setStyleSheet("QToolButton { ba
ckground-color:" + c.name() + "; }");
}
}
void ViewDialog::askEquinoxJ2000PointsColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.equinoxJ2000PointsColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquinoxJ2
000Points->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquinoxJ2000Points(vCol
or);
StelApp::getInstance().getSettings()->setValue("color/equino
x_J2000_points_color", StelUtils::vec3fToStr(vColor));
ui->colorEquinoxJ2000Points->setStyleSheet("QToolButton { ba
ckground-color:" + c.name() + "; }");
}
}
void ViewDialog::askEquinoxPointsColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("GridLinesMgr.equinoxPointsColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquinoxPo
ints->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquinoxPoints(vColor);
StelApp::getInstance().getSettings()->setValue("color/equino
x_points_color", StelUtils::vec3fToStr(vColor));
ui->colorEquinoxPoints->setStyleSheet("QToolButton { backgro
und-color:" + c.name() + "; }");
}
}
void ViewDialog::askCardinalPointsColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("LandscapeMgr.cardinalsPointsColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorCardinalP
oints->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(LandscapeMgr)->setColorCardinalPoints(vColor);
StelApp::getInstance().getSettings()->setValue("color/cardin
al_color", StelUtils::vec3fToStr(vColor));
ui->colorCardinalPoints->setStyleSheet("QToolButton { backgr
ound-color:" + c.name() + "; }");
}
}
void ViewDialog::askConstellationBoundariesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("ConstellationMgr.boundariesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorConstella
tionBoundaries->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(ConstellationMgr)->setBoundariesColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/const_
boundary_color", StelUtils::vec3fToStr(vColor));
ui->colorConstellationBoundaries->setStyleSheet("QToolButton
{ background-color:" + c.name() + "; }");
}
}
void ViewDialog::askConstellationLabelsColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("ConstellationMgr.namesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorConstella
tionLabels->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(ConstellationMgr)->setLabelsColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/const_
names_color", StelUtils::vec3fToStr(vColor));
ui->colorConstellationLabels->setStyleSheet("QToolButton { b
ackground-color:" + c.name() + "; }");
}
}
void ViewDialog::askConstellationLinesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("ConstellationMgr.linesColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorConstella
tionLines->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(ConstellationMgr)->setLinesColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/const_
lines_color", StelUtils::vec3fToStr(vColor));
ui->colorConstellationLines->setStyleSheet("QToolButton { ba
ckground-color:" + c.name() + "; }");
}
}
void ViewDialog::updateTabBarListWidgetWidth() void ViewDialog::updateTabBarListWidgetWidth()
{ {
ui->stackListWidget->setWrapping(false); ui->stackListWidget->setWrapping(false);
// Update list item sizes after translation // Update list item sizes after translation
ui->stackListWidget->adjustSize(); ui->stackListWidget->adjustSize();
QAbstractItemModel* model = ui->stackListWidget->model(); QAbstractItemModel* model = ui->stackListWidget->model();
if (!model) if (!model)
{ {
skipping to change at line 482 skipping to change at line 1082
ui->checkBoxPlanetaryNebulaeType->setChecked(flags & Nebula::TypePla netaryNebulae); ui->checkBoxPlanetaryNebulaeType->setChecked(flags & Nebula::TypePla netaryNebulae);
ui->checkBoxHydrogenRegionsType->setChecked(flags & Nebula::TypeHydr ogenRegions); ui->checkBoxHydrogenRegionsType->setChecked(flags & Nebula::TypeHydr ogenRegions);
ui->checkBoxSupernovaRemnantsType->setChecked(flags & Nebula::TypeSu pernovaRemnants); ui->checkBoxSupernovaRemnantsType->setChecked(flags & Nebula::TypeSu pernovaRemnants);
ui->checkBoxOtherType->setChecked(flags & Nebula::TypeOther); ui->checkBoxOtherType->setChecked(flags & Nebula::TypeOther);
} }
void ViewDialog::setFlagCustomGrsSettings(bool b) void ViewDialog::setFlagCustomGrsSettings(bool b)
{ {
GETSTELMODULE(SolarSystem)->setFlagCustomGrsSettings(b); GETSTELMODULE(SolarSystem)->setFlagCustomGrsSettings(b);
ui->pushButtonGrsDetails->setEnabled(b); ui->pushButtonGrsDetails->setEnabled(b);
if (!b)
if (!b && greatRedSpotDialog!=NULL)
greatRedSpotDialog->setVisible(false); greatRedSpotDialog->setVisible(false);
} }
// 20160411. New function introduced with trunk merge. Not sure yet if usef ul or bad with property connections?. // 20160411. New function introduced with trunk merge. Not sure yet if usef ul or bad with property connections?.
void ViewDialog::populateLightPollution() void ViewDialog::populateLightPollution()
{ {
StelCore *core = StelApp::getInstance().getCore(); StelCore *core = StelApp::getInstance().getCore();
LandscapeMgr *lmgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr *lmgr = GETSTELMODULE(LandscapeMgr);
int bIdx = core->getSkyDrawer()->getBortleScaleIndex(); int bIdx = core->getSkyDrawer()->getBortleScaleIndex();
if (lmgr->getFlagUseLightPollutionFromDatabase()) if (lmgr->getFlagUseLightPollutionFromDatabase())
skipping to change at line 597 skipping to change at line 1198
// Fill the projection list // Fill the projection list
l = ui->projectionListWidget; l = ui->projectionListWidget;
l->blockSignals(true); l->blockSignals(true);
l->clear(); l->clear();
const QStringList mappings = core->getAllProjectionTypeKeys(); const QStringList mappings = core->getAllProjectionTypeKeys();
foreach (QString s, mappings) foreach (QString s, mappings)
{ {
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->getCurrentProjectionNameI18n(), Qt::MatchExactly).at(0));
l->blockSignals(false); l->blockSignals(false);
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());
// 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 = GETSTELMODULE(LandscapeMgr); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
QStringList landscapeList = lmgr->getAllLandscapeNames(); QStringList landscapeList = lmgr->getAllLandscapeNames();
skipping to change at line 697 skipping to change at line 1298
void ViewDialog::changeProjection(const QString& projectionNameI18n) void ViewDialog::changeProjection(const QString& projectionNameI18n)
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
core->setCurrentProjectionTypeKey(core->projectionNameI18nToTypeKey( projectionNameI18n)); core->setCurrentProjectionTypeKey(core->projectionNameI18nToTypeKey( projectionNameI18n));
} }
void ViewDialog::projectionChanged() void ViewDialog::projectionChanged()
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
QListWidget* l = ui->projectionListWidget; QListWidget* l = ui->projectionListWidget;
l->setCurrentItem(l->findItems(core->projectionTypeKeyToNameI18n(cor e->getCurrentProjectionTypeKey()), Qt::MatchExactly).at(0),QItemSelectionMo del::SelectCurrent); l->setCurrentItem(l->findItems(core->getCurrentProjectionNameI18n(), Qt::MatchExactly).at(0),QItemSelectionModel::SelectCurrent);
ui->projectionTextBrowser->setHtml(core->getProjection(StelCore::Fra meJ2000)->getHtmlSummary()); ui->projectionTextBrowser->setHtml(core->getProjection(StelCore::Fra meJ2000)->getHtmlSummary());
} }
void ViewDialog::changeLandscape(QListWidgetItem* item) void ViewDialog::changeLandscape(QListWidgetItem* item)
{ {
LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr); LandscapeMgr* lmgr = GETSTELMODULE(LandscapeMgr);
lmgr->setCurrentLandscapeName(item->data(Qt::UserRole).toString()); lmgr->setCurrentLandscapeName(item->data(Qt::UserRole).toString());
} }
void ViewDialog::landscapeChanged(QString id, QString name) void ViewDialog::landscapeChanged(QString id, QString name)
skipping to change at line 750 skipping to change at line 1351
} }
void ViewDialog::showGreatRedSpotDialog() void ViewDialog::showGreatRedSpotDialog()
{ {
if(greatRedSpotDialog == NULL) if(greatRedSpotDialog == NULL)
greatRedSpotDialog = new GreatRedSpotDialog(); greatRedSpotDialog = new GreatRedSpotDialog();
greatRedSpotDialog->setVisible(true); greatRedSpotDialog->setVisible(true);
} }
void ViewDialog::showConfigureDSOColorsDialog()
{
if(configureDSOColorsDialog == NULL)
configureDSOColorsDialog = new ConfigureDSOColorsDialog();
configureDSOColorsDialog->setVisible(true);
}
void ViewDialog::showConfigureOrbitColorsDialog()
{
if(configureOrbitColorsDialog == NULL)
configureOrbitColorsDialog = new ConfigureOrbitColorsDialog(
);
configureOrbitColorsDialog->setVisible(true);
}
void ViewDialog::updateZhrDescription(int zhr) void ViewDialog::updateZhrDescription(int zhr)
{ {
// GZ changed to small regions instead of hard "case" to better see a manual setting. // GZ changed to small regions instead of hard "case" to better see a manual setting.
if (zhr==0) if (zhr==0)
ui->zhrLabel->setText("<small><i>"+q_("No shooting stars")+" </i></small>"); ui->zhrLabel->setText("<small><i>"+q_("No shooting stars")+" </i></small>");
else if (zhr<=10) else if (zhr<=10)
ui->zhrLabel->setText("<small><i>"+q_("Normal rate")+"</i></ small>"); ui->zhrLabel->setText("<small><i>"+q_("Normal rate")+"</i></ small>");
else if ((zhr>=20) && (zhr<=30)) // was 25 else if ((zhr>=20) && (zhr<=30)) // was 25
ui->zhrLabel->setText("<small><i>"+q_("Standard Orionids rat e")+"</i></small>"); ui->zhrLabel->setText("<small><i>"+q_("Standard Orionids rat e")+"</i></small>");
else if ((zhr>=90) && (zhr<=110)) // was 100 else if ((zhr>=90) && (zhr<=110)) // was 100
 End of changes. 16 change blocks. 
42 lines changed or deleted 888 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/