ViewDialog.cpp   ViewDialog.cpp 
skipping to change at line 39 skipping to change at line 39
#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"
#include "SolarSystem.hpp" #include "SolarSystem.hpp"
#include "Planet.hpp"
#include "NebulaMgr.hpp" #include "NebulaMgr.hpp"
#include "MilkyWay.hpp" #include "MilkyWay.hpp"
#include "ZodiacalLight.hpp" #include "ZodiacalLight.hpp"
#include "ConstellationMgr.hpp" #include "ConstellationMgr.hpp"
#include "AsterismMgr.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 "GridLinesMgr.hpp"
skipping to change at line 64 skipping to change at line 66
#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> #include <QColorDialog>
ViewDialog::ViewDialog(QObject* parent) : StelDialog("View", parent) ViewDialog::ViewDialog(QObject* parent) : StelDialog("View", parent)
, addRemoveLandscapesDialog(NULL) , addRemoveLandscapesDialog(Q_NULLPTR)
, atmosphereDialog(NULL) , atmosphereDialog(Q_NULLPTR)
, greatRedSpotDialog(NULL) , greatRedSpotDialog(Q_NULLPTR)
, configureDSOColorsDialog(NULL) , configureDSOColorsDialog(Q_NULLPTR)
, configureOrbitColorsDialog(NULL) , configureOrbitColorsDialog(Q_NULLPTR)
{ {
ui = new Ui_viewDialogForm; ui = new Ui_viewDialogForm;
} }
ViewDialog::~ViewDialog() ViewDialog::~ViewDialog()
{ {
delete ui; delete ui;
ui=NULL; ui=Q_NULLPTR;
delete addRemoveLandscapesDialog; delete addRemoveLandscapesDialog;
addRemoveLandscapesDialog = NULL; addRemoveLandscapesDialog = Q_NULLPTR;
delete atmosphereDialog; delete atmosphereDialog;
atmosphereDialog = NULL; atmosphereDialog = Q_NULLPTR;
delete greatRedSpotDialog; delete greatRedSpotDialog;
greatRedSpotDialog = NULL; greatRedSpotDialog = Q_NULLPTR;
delete configureDSOColorsDialog; delete configureDSOColorsDialog;
configureDSOColorsDialog = NULL; configureDSOColorsDialog = Q_NULLPTR;
delete configureOrbitColorsDialog; delete configureOrbitColorsDialog;
configureOrbitColorsDialog = NULL; configureOrbitColorsDialog = Q_NULLPTR;
} }
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();
populateToolTips();
populatePlanetMagnitudeAlgorithmsList();
populatePlanetMagnitudeAlgorithmDescription();
setBortleScaleToolTip(StelApp::getInstance().getCore()->getS kyDrawer()->getBortleScaleIndex()); setBortleScaleToolTip(StelApp::getInstance().getCore()->getS kyDrawer()->getBortleScaleIndex());
//Hack to shrink the tabs to optimal size after language cha nge //Hack to shrink the tabs to optimal size after language cha nge
//by causing the list items to be laid out again. //by causing the list items to be laid out again.
updateTabBarListWidgetWidth(); updateTabBarListWidgetWidth();
} }
} }
void ViewDialog::styleChanged() void ViewDialog::styleChanged()
{ {
if (dialog) if (dialog)
{ {
populateLists(); populateLists();
populateToolTips();
populatePlanetMagnitudeAlgorithmsList();
populatePlanetMagnitudeAlgorithmDescription();
} }
} }
void ViewDialog::connectGroupBox(QGroupBox* groupBox, const QString& action Id) void ViewDialog::connectGroupBox(QGroupBox* groupBox, const QString& action Id)
{ {
StelAction* action = StelApp::getInstance().getStelActionManager()-> findAction(actionId); StelAction* action = StelApp::getInstance().getStelActionManager()-> findAction(actionId);
Q_ASSERT(action); Q_ASSERT(action);
groupBox->setChecked(action->isChecked()); groupBox->setChecked(action->isChecked());
connect(action, SIGNAL(toggled(bool)), groupBox, SLOT(setChecked(boo l))); connect(action, SIGNAL(toggled(bool)), groupBox, SLOT(setChecked(boo l)));
connect(groupBox, SIGNAL(toggled(bool)), action, SLOT(setChecked(boo l))); connect(groupBox, SIGNAL(toggled(bool)), action, SLOT(setChecked(boo l)));
skipping to change at line 144 skipping to change at line 152
//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())) ;
connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMove dTo(QPoint))); connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMove dTo(QPoint)));
populateLists(); populateLists();
populateToolTips();
// TODOs after properties merge: // TODOs after properties merge:
// New method: populateLightPollution may be useful. Make sure it is . // New method: populateLightPollution may be useful. Make sure it is .
// Jupiter's GRS should become property, and recheck the other "from trunk" entries. // Jupiter's GRS should become property, and recheck the other "from trunk" entries.
connect(ui->culturesListWidget, SIGNAL(currentTextChanged(const QStr ing&)),&StelApp::getInstance().getSkyCultureMgr(),SLOT(setCurrentSkyCulture NameI18(QString))); connect(ui->culturesListWidget, SIGNAL(currentTextChanged(const QStr ing&)),&StelApp::getInstance().getSkyCultureMgr(),SLOT(setCurrentSkyCulture NameI18(QString)));
connect(&StelApp::getInstance().getSkyCultureMgr(), SIGNAL(currentSk yCultureChanged(QString)), this, SLOT(skyCultureChanged())); connect(&StelApp::getInstance().getSkyCultureMgr(), SIGNAL(currentSk yCultureChanged(QString)), this, SLOT(skyCultureChanged()));
// Connect and initialize checkboxes and other widgets // Connect and initialize checkboxes and other widgets
SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
Q_ASSERT(ssmgr);
// Stars section // Stars section
connectGroupBox(ui->starGroupBox, "actionShow_Stars"); connectGroupBox(ui->starGroupBox, "actionShow_Stars");
connectDoubleProperty(ui->starScaleRadiusDoubleSpinBox,"StelSkyDrawe r.absoluteStarScale"); connectDoubleProperty(ui->starScaleRadiusDoubleSpinBox,"StelSkyDrawe r.absoluteStarScale");
connectDoubleProperty(ui->starRelativeScaleDoubleSpinBox, "StelSkyDr awer.relativeStarScale"); connectDoubleProperty(ui->starRelativeScaleDoubleSpinBox, "StelSkyDr awer.relativeStarScale");
connectBoolProperty(ui->starTwinkleCheckBox, "StelSkyDrawer.flagTwin kle"); connectBoolProperty(ui->starTwinkleCheckBox, "StelSkyDrawer.flagTwin kle");
connectDoubleProperty(ui->starTwinkleAmountDoubleSpinBox, "StelSkyDr awer.twinkleAmount"); connectDoubleProperty(ui->starTwinkleAmountDoubleSpinBox, "StelSkyDr awer.twinkleAmount");
connectBoolProperty(ui->starLimitMagnitudeCheckBox,"StelSkyDrawer.fl agStarMagnitudeLimit"); connectBoolProperty(ui->starLimitMagnitudeCheckBox,"StelSkyDrawer.fl agStarMagnitudeLimit");
connectDoubleProperty(ui->starLimitMagnitudeDoubleSpinBox, "StelSkyD rawer.customStarMagLimit"); connectDoubleProperty(ui->starLimitMagnitudeDoubleSpinBox, "StelSkyD rawer.customStarMagLimit");
connectCheckBox(ui->starLabelCheckBox, "actionShow_Stars_Labels"); connectCheckBox(ui->starLabelCheckBox, "actionShow_Stars_Labels");
connectDoubleProperty(ui->starsLabelsHorizontalSlider,"StarMgr.label sAmount",0.0,10.0); connectDoubleProperty(ui->starsLabelsHorizontalSlider,"StarMgr.label sAmount",0.0,10.0);
skipping to change at line 198 skipping to change at line 209
connect(drawer, SIGNAL(bortleScaleIndexChanged(int)), this, SLOT(set BortleScaleToolTip(int))); connect(drawer, SIGNAL(bortleScaleIndexChanged(int)), this, SLOT(set BortleScaleToolTip(int)));
// atmosphere details // atmosphere details
connect(ui->pushButtonAtmosphereDetails, SIGNAL(clicked()), this, SL OT(showAtmosphereDialog())); connect(ui->pushButtonAtmosphereDetails, SIGNAL(clicked()), this, SL OT(showAtmosphereDialog()));
// Planets section // Planets section
connectGroupBox(ui->planetsGroupBox, "actionShow_Planets"); connectGroupBox(ui->planetsGroupBox, "actionShow_Planets");
connectCheckBox(ui->planetMarkerCheckBox, "actionShow_Planets_Hints" ); connectCheckBox(ui->planetMarkerCheckBox, "actionShow_Planets_Hints" );
connectCheckBox(ui->planetOrbitCheckBox, "actionShow_Planets_Orbits" ); connectCheckBox(ui->planetOrbitCheckBox, "actionShow_Planets_Orbits" );
connectBoolProperty(ui->planetIsolatedOrbitCheckBox, "SolarSystem.fl agIsolatedOrbits"); connectBoolProperty(ui->planetIsolatedOrbitCheckBox, "SolarSystem.fl agIsolatedOrbits");
ui->planetIsolatedOrbitCheckBox->setEnabled(ssmgr->getFlagOrbits());
connect(ssmgr,SIGNAL(flagOrbitsChanged(bool)),ui->planetIsolatedOrbi
tCheckBox, SLOT(setEnabled(bool)));
connectBoolProperty(ui->planetIsolatedTrailsCheckBox, "SolarSystem.f lagIsolatedTrails"); connectBoolProperty(ui->planetIsolatedTrailsCheckBox, "SolarSystem.f lagIsolatedTrails");
connectBoolProperty(ui->planetLightSpeedCheckBox, "SolarSystem.flagL ightTravelTime"); connectBoolProperty(ui->planetLightSpeedCheckBox, "SolarSystem.flagL ightTravelTime");
connectBoolProperty(ui->planetUseObjModelsCheckBox, "SolarSystem.fla
gUseObjModels");
connectBoolProperty(ui->planetShowObjSelfShadowsCheckBox, "SolarSyst
em.flagShowObjSelfShadows");
ui->planetShowObjSelfShadowsCheckBox->setEnabled(ssmgr->getFlagUseOb
jModels());
connect(ssmgr,SIGNAL(flagUseObjModelsChanged(bool)),ui->planetShowOb
jSelfShadowsCheckBox, SLOT(setEnabled(bool)));
connectBoolProperty(ui->planetLimitMagnitudeCheckBox,"StelSkyDrawer. flagPlanetMagnitudeLimit"); connectBoolProperty(ui->planetLimitMagnitudeCheckBox,"StelSkyDrawer. flagPlanetMagnitudeLimit");
connectDoubleProperty(ui->planetLimitMagnitudeDoubleSpinBox,"StelSky Drawer.customPlanetMagLimit"); connectDoubleProperty(ui->planetLimitMagnitudeDoubleSpinBox,"StelSky Drawer.customPlanetMagLimit");
connectBoolProperty(ui->planetScaleMoonCheckBox, "SolarSystem.flagMo onScale"); connectBoolProperty(ui->planetScaleMoonCheckBox, "SolarSystem.flagMo onScale");
connectDoubleProperty(ui->moonScaleFactor,"SolarSystem.moonScale"); connectDoubleProperty(ui->moonScaleFactor,"SolarSystem.moonScale");
connectBoolProperty(ui->planetScaleMinorBodyCheckBox, "SolarSystem.f
lagMinorBodyScale");
connectDoubleProperty(ui->minorBodyScaleFactor,"SolarSystem.minorBod
yScale");
connectCheckBox(ui->planetLabelCheckBox, "actionShow_Planets_Labels" ); connectCheckBox(ui->planetLabelCheckBox, "actionShow_Planets_Labels" );
connectDoubleProperty(ui->planetsLabelsHorizontalSlider, "SolarSyste m.labelsAmount",0.0,10.0); connectDoubleProperty(ui->planetsLabelsHorizontalSlider, "SolarSyste m.labelsAmount",0.0,10.0);
connect(ui->pushButtonOrbitColors, SIGNAL(clicked(bool)), this, SLOT (showConfigureOrbitColorsDialog())); connect(ui->pushButtonOrbitColors, SIGNAL(clicked(bool)), this, SLOT (showConfigureOrbitColorsDialog()));
populatePlanetMagnitudeAlgorithmsList();
int idx = ui->planetMagnitudeAlgorithmComboBox->findData(Planet::get
ApparentMagnitudeAlgorithm(), Qt::UserRole, Qt::MatchCaseSensitive);
if (idx==-1)
{
// Use ExplanSupl2013 as default
idx = ui->planetMagnitudeAlgorithmComboBox->findData(Planet:
:Expl_Sup_2013, Qt::UserRole, Qt::MatchCaseSensitive);
}
ui->planetMagnitudeAlgorithmComboBox->setCurrentIndex(idx);
connect(ui->planetMagnitudeAlgorithmComboBox, SIGNAL(currentIndexCha
nged(int)), this, SLOT(setPlanetMagnitudeAlgorithm(int)));
populatePlanetMagnitudeAlgorithmDescription();
// GreatRedSpot (Jupiter) // GreatRedSpot (Jupiter)
// TODO: put under Properties system! // TODO: put under Properties system!
SolarSystem* ssmgr = GETSTELMODULE(SolarSystem);
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()));
// Shooting stars section // Shooting stars section
SporadicMeteorMgr* mmgr = GETSTELMODULE(SporadicMeteorMgr); SporadicMeteorMgr* mmgr = GETSTELMODULE(SporadicMeteorMgr);
Q_ASSERT(mmgr); Q_ASSERT(mmgr);
connectIntProperty(ui->zhrSpinBox, "SporadicMeteorMgr.zhr"); connectIntProperty(ui->zhrSpinBox, "SporadicMeteorMgr.zhr");
skipping to change at line 250 skipping to change at line 278
connectBoolProperty(ui->checkBoxDesignationsOnlyUsage, "NebulaMgr.fl agDesignationLabels"); connectBoolProperty(ui->checkBoxDesignationsOnlyUsage, "NebulaMgr.fl agDesignationLabels");
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->nebulaLimitMagnitudeCheckBox,"StelSkyDrawer. flagNebulaMagnitudeLimit"); connectBoolProperty(ui->nebulaLimitMagnitudeCheckBox,"StelSkyDrawer. flagNebulaMagnitudeLimit");
connectDoubleProperty(ui->nebulaLimitMagnitudeDoubleSpinBox,"StelSky Drawer.customNebulaMagLimit"); connectDoubleProperty(ui->nebulaLimitMagnitudeDoubleSpinBox,"StelSky Drawer.customNebulaMagLimit");
connect(ui->pushButtonConfigureDSOColors, SIGNAL(clicked()), this, S LOT(showConfigureDSOColorsDialog())); connect(ui->pushButtonConfigureDSOColors, SIGNAL(clicked()), this, S LOT(showConfigureDSOColorsDialog()));
// Landscape section // Landscape section
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"); connectCheckBox(ui->atmosphereCheckBox, "actionShow_Atmosphere");
connectCheckBox(ui->landscapeIlluminationCheckBox, "actionShow_Lands capeIllumination"); connectCheckBox(ui->landscapeIlluminationCheckBox, "actionShow_Lands capeIllumination");
connectCheckBox(ui->landscapeLabelsCheckBox, "actionShow_LandscapeLa bels"); connectCheckBox(ui->landscapeLabelsCheckBox, "actionShow_LandscapeLa bels");
connectBoolProperty(ui->landscapePositionCheckBox, "LandscapeMgr.fla gLandscapeSetsLocation"); connectBoolProperty(ui->landscapePositionCheckBox, "LandscapeMgr.fla gLandscapeSetsLocation");
connectBoolProperty(ui->landscapeBrightnessCheckBox,"LandscapeMgr.fl agLandscapeUseMinimalBrightness"); connectBoolProperty(ui->landscapeBrightnessCheckBox,"LandscapeMgr.fl agLandscapeUseMinimalBrightness");
connect(lmgr,SIGNAL(flagLandscapeUseMinimalBrightnessChanged(bool)), ui->localLandscapeBrightnessCheckBox,SLOT(setEnabled(bool))); connect(lmgr,SIGNAL(flagLandscapeUseMinimalBrightnessChanged(bool)), ui->localLandscapeBrightnessCheckBox,SLOT(setEnabled(bool)));
connect(lmgr,SIGNAL(flagLandscapeUseMinimalBrightnessChanged(bool)), ui->landscapeBrightnessSpinBox,SLOT(setEnabled(bool))); connect(lmgr,SIGNAL(flagLandscapeUseMinimalBrightnessChanged(bool)), ui->landscapeBrightnessSpinBox,SLOT(setEnabled(bool)));
ui->localLandscapeBrightnessCheckBox->setEnabled(lmgr->getFlagLandsc apeUseMinimalBrightness()); ui->localLandscapeBrightnessCheckBox->setEnabled(lmgr->getFlagLandsc apeUseMinimalBrightness());
ui->landscapeBrightnessSpinBox->setEnabled(lmgr->getFlagLandscapeUse MinimalBrightness()); ui->landscapeBrightnessSpinBox->setEnabled(lmgr->getFlagLandscapeUse MinimalBrightness());
skipping to change at line 276 skipping to change at line 304
connect(lmgr, SIGNAL(currentLandscapeChanged(QString,QString)), this , SLOT(landscapeChanged(QString,QString))); connect(lmgr, SIGNAL(currentLandscapeChanged(QString,QString)), this , SLOT(landscapeChanged(QString,QString)));
connect(ui->useAsDefaultLandscapeCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentLandscapeAsDefault())); connect(ui->useAsDefaultLandscapeCheckBox, SIGNAL(clicked()), this, SLOT(setCurrentLandscapeAsDefault()));
connect(lmgr,SIGNAL(defaultLandscapeChanged(QString)),this,SLOT(upda teDefaultLandscape())); connect(lmgr,SIGNAL(defaultLandscapeChanged(QString)),this,SLOT(upda teDefaultLandscape()));
updateDefaultLandscape(); updateDefaultLandscape();
connect(lmgr, SIGNAL(landscapesChanged()), this, SLOT(populateLists( ))); connect(lmgr, SIGNAL(landscapesChanged()), this, SLOT(populateLists( )));
connect(ui->pushButtonAddRemoveLandscapes, SIGNAL(clicked()), this, SLOT(showAddRemoveLandscapesDialog())); connect(ui->pushButtonAddRemoveLandscapes, SIGNAL(clicked()), this, SLOT(showAddRemoveLandscapesDialog()));
// Grid and lines // Grid and lines
connectGroupBox(ui->celestialSphereGroupBox, "actionShow_ Gridlines");
connectCheckBox(ui->showEquatorLineCheckBox, "actionShow_ Equator_Line"); connectCheckBox(ui->showEquatorLineCheckBox, "actionShow_ Equator_Line");
connectCheckBox(ui->showEquatorJ2000LineCheckBox, "actionShow_ Equator_J2000_Line"); connectCheckBox(ui->showEquatorJ2000LineCheckBox, "actionShow_ Equator_J2000_Line");
connectCheckBox(ui->showEclipticLineJ2000CheckBox, "actionShow_ Ecliptic_J2000_Line"); connectCheckBox(ui->showEclipticLineJ2000CheckBox, "actionShow_ Ecliptic_J2000_Line");
connectCheckBox(ui->showEclipticLineOfDateCheckBox, "actionShow_ Ecliptic_Line"); connectCheckBox(ui->showEclipticLineOfDateCheckBox, "actionShow_ Ecliptic_Line");
connectCheckBox(ui->showMeridianLineCheckBox, "actionShow_ Meridian_Line"); connectCheckBox(ui->showMeridianLineCheckBox, "actionShow_ Meridian_Line");
connectCheckBox(ui->showLongitudeLineCheckBox, "actionShow_ Longitude_Line"); connectCheckBox(ui->showLongitudeLineCheckBox, "actionShow_ Longitude_Line");
connectCheckBox(ui->showHorizonLineCheckBox, "actionShow_ Horizon_Line"); connectCheckBox(ui->showHorizonLineCheckBox, "actionShow_ Horizon_Line");
connectCheckBox(ui->showEquatorialGridCheckBox, "actionShow_ Equatorial_Grid"); connectCheckBox(ui->showEquatorialGridCheckBox, "actionShow_ Equatorial_Grid");
connectCheckBox(ui->showGalacticGridCheckBox, "actionShow_ Galactic_Grid"); connectCheckBox(ui->showGalacticGridCheckBox, "actionShow_ Galactic_Grid");
connectCheckBox(ui->showGalacticEquatorLineCheckBox, "actionShow_ Galactic_Equator_Line"); connectCheckBox(ui->showGalacticEquatorLineCheckBox, "actionShow_ Galactic_Equator_Line");
skipping to change at line 403 skipping to change at line 432
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");
colorButton(ui->colorConstellationBoundaries, "ConstellationMgr.bo undariesColor"); colorButton(ui->colorConstellationBoundaries, "ConstellationMgr.bo undariesColor");
colorButton(ui->colorConstellationLabels, "ConstellationMgr.na mesColor"); colorButton(ui->colorConstellationLabels, "ConstellationMgr.na mesColor");
colorButton(ui->colorConstellationLines, "ConstellationMgr.li nesColor"); colorButton(ui->colorConstellationLines, "ConstellationMgr.li nesColor");
connect(ui->colorConstellationBoundaries, SIGNAL(released()), this, SLOT(askConstellationBoundariesColor())); connect(ui->colorConstellationBoundaries, SIGNAL(released()), this, SLOT(askConstellationBoundariesColor()));
connect(ui->colorConstellationLabels, SIGNAL(released()), this, SLOT(askConstellationLabelsColor())); connect(ui->colorConstellationLabels, SIGNAL(released()), this, SLOT(askConstellationLabelsColor()));
connect(ui->colorConstellationLines, SIGNAL(released()), this, SLOT(askConstellationLinesColor())); connect(ui->colorConstellationLines, SIGNAL(released()), this, SLOT(askConstellationLinesColor()));
connectCheckBox(ui->showAsterismLinesCheckBox, "actionShow_Asterism_
Lines");
connectDoubleProperty(ui->asterismLineThicknessSpinBox, "AsterismMgr
.asterismLineThickness");
connectCheckBox(ui->showAsterismLabelsCheckBox, "actionShow_Asterism
_Labels");
colorButton(ui->colorAsterismLabels, "AsterismMgr.namesColor");
colorButton(ui->colorAsterismLines, "AsterismMgr.linesColor");
connect(ui->colorAsterismLabels, SIGNAL(released()), this, SL
OT(askAsterismLabelsColor()));
connect(ui->colorAsterismLines, SIGNAL(released()), this, SL
OT(askAsterismLinesColor()));
// 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();
} }
skipping to change at line 429 skipping to change at line 467
// Use style sheet for create a nice buttons :) // Use style sheet for create a nice buttons :)
toolButton->setStyleSheet("QToolButton { background-color:" + color. name() + "; }"); toolButton->setStyleSheet("QToolButton { background-color:" + color. name() + "; }");
toolButton->setFixedSize(QSize(18, 18)); toolButton->setFixedSize(QSize(18, 18));
} }
void ViewDialog::askEclipticJ2000GridColor() void ViewDialog::askEclipticJ2000GridColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticJ2000GridColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticJ2000GridColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticG ridJ2000->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEcli pticGridJ2000->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticJ2000Grid(vColo r); GETSTELMODULE(GridLinesMgr)->setColorEclipticJ2000Grid(vColo r);
StelApp::getInstance().getSettings()->setValue("color/eclipt ical_J2000_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/eclipt ical_J2000_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticGridJ2000->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }"); ui->colorEclipticGridJ2000->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEclipticGridColor() void ViewDialog::askEclipticGridColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticGridColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticGridColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticG ridOfDate->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEcli pticGridOfDate->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticGrid(vColor); GETSTELMODULE(GridLinesMgr)->setColorEclipticGrid(vColor);
StelApp::getInstance().getSettings()->setValue("color/eclipt ical_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/eclipt ical_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticGridOfDate->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorEclipticGridOfDate->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEquatorJ2000GridColor() void ViewDialog::askEquatorJ2000GridColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equatorJ2000GridColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equatorJ2000GridColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquatoria lJ2000Grid->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEqua torialJ2000Grid->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquatorJ2000Grid(vColor ); GETSTELMODULE(GridLinesMgr)->setColorEquatorJ2000Grid(vColor );
StelApp::getInstance().getSettings()->setValue("color/equato rial_J2000_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/equato rial_J2000_color", StelUtils::vec3fToStr(vColor));
ui->colorEquatorialJ2000Grid->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }"); ui->colorEquatorialJ2000Grid->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEquatorGridColor() void ViewDialog::askEquatorGridColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equatorGridColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equatorGridColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquatoria lGrid->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEqua torialGrid->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquatorGrid(vColor); GETSTELMODULE(GridLinesMgr)->setColorEquatorGrid(vColor);
StelApp::getInstance().getSettings()->setValue("color/equato rial_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/equato rial_color", StelUtils::vec3fToStr(vColor));
ui->colorEquatorialGrid->setStyleSheet("QToolButton { backgr ound-color:" + c.name() + "; }"); ui->colorEquatorialGrid->setStyleSheet("QToolButton { backgr ound-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askGalacticGridColor() void ViewDialog::askGalacticGridColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.galacticGridColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.galacticGridColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorGalacticG rid->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorGala cticGrid->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorGalacticGrid(vColor); GETSTELMODULE(GridLinesMgr)->setColorGalacticGrid(vColor);
StelApp::getInstance().getSettings()->setValue("color/galact ic_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/galact ic_color", StelUtils::vec3fToStr(vColor));
ui->colorGalacticGrid->setStyleSheet("QToolButton { backgrou nd-color:" + c.name() + "; }"); ui->colorGalacticGrid->setStyleSheet("QToolButton { backgrou nd-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askSupergalacticGridColor() void ViewDialog::askSupergalacticGridColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.supergalacticGridColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.supergalacticGridColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorSupergala cticGrid->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorSupe rgalacticGrid->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorSupergalacticGrid(vColo r); GETSTELMODULE(GridLinesMgr)->setColorSupergalacticGrid(vColo r);
StelApp::getInstance().getSettings()->setValue("color/superg alactic_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/superg alactic_color", StelUtils::vec3fToStr(vColor));
ui->colorSupergalacticGrid->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }"); ui->colorSupergalacticGrid->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askAzimuthalGridColor() void ViewDialog::askAzimuthalGridColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.azimuthalGridColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.azimuthalGridColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorAzimuthal Grid->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorAzim uthalGrid->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorAzimuthalGrid(vColor); GETSTELMODULE(GridLinesMgr)->setColorAzimuthalGrid(vColor);
StelApp::getInstance().getSettings()->setValue("color/azimut hal_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/azimut hal_color", StelUtils::vec3fToStr(vColor));
ui->colorAzimuthalGrid->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }"); ui->colorAzimuthalGrid->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEclipticLineJ2000Color() void ViewDialog::askEclipticLineJ2000Color()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticJ2000LineColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticJ2000LineColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticL ineJ2000->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEcli pticLineJ2000->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticJ2000Line(vColo r); GETSTELMODULE(GridLinesMgr)->setColorEclipticJ2000Line(vColo r);
StelApp::getInstance().getSettings()->setValue("color/eclipt ic_J2000_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/eclipt ic_J2000_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticLineJ2000->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }"); ui->colorEclipticLineJ2000->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEclipticLineColor() void ViewDialog::askEclipticLineColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticLineColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticL ineOfDate->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEcli pticLineOfDate->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticLine(vColor); GETSTELMODULE(GridLinesMgr)->setColorEclipticLine(vColor);
StelApp::getInstance().getSettings()->setValue("color/eclipt ic_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/eclipt ic_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticLineOfDate->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorEclipticLineOfDate->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEquatorLineJ2000Color() void ViewDialog::askEquatorLineJ2000Color()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equatorJ2000LineColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equatorJ2000LineColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquatorJ2 000Line->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEqua torJ2000Line->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquatorJ2000Line(vColor ); GETSTELMODULE(GridLinesMgr)->setColorEquatorJ2000Line(vColor );
StelApp::getInstance().getSettings()->setValue("color/equato r_J2000_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/equato r_J2000_color", StelUtils::vec3fToStr(vColor));
ui->colorEquatorJ2000Line->setStyleSheet("QToolButton { back ground-color:" + c.name() + "; }"); ui->colorEquatorJ2000Line->setStyleSheet("QToolButton { back ground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEquatorLineColor() void ViewDialog::askEquatorLineColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equatorLineColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equatorLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquatorLi ne->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEqua torLine->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquatorLine(vColor); GETSTELMODULE(GridLinesMgr)->setColorEquatorLine(vColor);
StelApp::getInstance().getSettings()->setValue("color/equato r_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/equato r_color", StelUtils::vec3fToStr(vColor));
ui->colorEquatorLine->setStyleSheet("QToolButton { backgroun d-color:" + c.name() + "; }"); ui->colorEquatorLine->setStyleSheet("QToolButton { backgroun d-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askGalacticEquatorLineColor() void ViewDialog::askGalacticEquatorLineColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.galacticEquatorLineColor")->getValue().value<Vec3f>() ; Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.galacticEquatorLineColor")->getValue().value<Vec3f>() ;
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorGalacticE quatorLine->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorGala cticEquatorLine->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorGalacticEquatorLine(vCo lor); GETSTELMODULE(GridLinesMgr)->setColorGalacticEquatorLine(vCo lor);
StelApp::getInstance().getSettings()->setValue("color/galact ic_equator_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/galact ic_equator_color", StelUtils::vec3fToStr(vColor));
ui->colorGalacticEquatorLine->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }"); ui->colorGalacticEquatorLine->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askSupergalacticEquatorLineColor() void ViewDialog::askSupergalacticEquatorLineColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.supergalacticEquatorLineColor")->getValue().value<Vec 3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.supergalacticEquatorLineColor")->getValue().value<Vec 3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorSupergala cticEquatorLine->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorSupe rgalacticEquatorLine->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorSupergalacticEquatorLin e(vColor); GETSTELMODULE(GridLinesMgr)->setColorSupergalacticEquatorLin e(vColor);
StelApp::getInstance().getSettings()->setValue("color/superg alactic_equator_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/superg alactic_equator_color", StelUtils::vec3fToStr(vColor));
ui->colorSupergalacticEquatorLine->setStyleSheet("QToolButto n { background-color:" + c.name() + "; }"); ui->colorSupergalacticEquatorLine->setStyleSheet("QToolButto n { background-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askHorizonLineColor() void ViewDialog::askHorizonLineColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.horizonLineColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.horizonLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorHorizonLi ne->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorHori zonLine->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorHorizonLine(vColor); GETSTELMODULE(GridLinesMgr)->setColorHorizonLine(vColor);
StelApp::getInstance().getSettings()->setValue("color/horizo n_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/horizo n_color", StelUtils::vec3fToStr(vColor));
ui->colorHorizonLine->setStyleSheet("QToolButton { backgroun d-color:" + c.name() + "; }"); ui->colorHorizonLine->setStyleSheet("QToolButton { backgroun d-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askLongitudeLineColor() void ViewDialog::askLongitudeLineColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.longitudeLineColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.longitudeLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorLongitude Line->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorLong itudeLine->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorLongitudeLine(vColor); GETSTELMODULE(GridLinesMgr)->setColorLongitudeLine(vColor);
StelApp::getInstance().getSettings()->setValue("color/oc_lon gitude_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/oc_lon gitude_color", StelUtils::vec3fToStr(vColor));
ui->colorLongitudeLine->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }"); ui->colorLongitudeLine->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askColureLinesColor() void ViewDialog::askColureLinesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.colureLinesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.colureLinesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorColuresLi ne->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorColu resLine->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorColureLines(vColor); GETSTELMODULE(GridLinesMgr)->setColorColureLines(vColor);
StelApp::getInstance().getSettings()->setValue("color/colure s_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/colure s_color", StelUtils::vec3fToStr(vColor));
ui->colorColuresLine->setStyleSheet("QToolButton { backgroun d-color:" + c.name() + "; }"); ui->colorColuresLine->setStyleSheet("QToolButton { backgroun d-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askCircumpolarCirclesColor() void ViewDialog::askCircumpolarCirclesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.circumpolarCirclesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.circumpolarCirclesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorCircumpol arCircles->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorCirc umpolarCircles->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorCircumpolarCircles(vCol or); GETSTELMODULE(GridLinesMgr)->setColorCircumpolarCircles(vCol or);
StelApp::getInstance().getSettings()->setValue("color/circum polar_circles_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/circum polar_circles_color", StelUtils::vec3fToStr(vColor));
ui->colorCircumpolarCircles->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorCircumpolarCircles->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askPrecessionCirclesColor() void ViewDialog::askPrecessionCirclesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.precessionCirclesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.precessionCirclesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorPrecessio nCircles->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorPrec essionCircles->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorPrecessionCircles(vColo r); GETSTELMODULE(GridLinesMgr)->setColorPrecessionCircles(vColo r);
StelApp::getInstance().getSettings()->setValue("color/preces sion_circles_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/preces sion_circles_color", StelUtils::vec3fToStr(vColor));
ui->colorPrecessionCircles->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }"); ui->colorPrecessionCircles->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askPrimeVerticalLineColor() void ViewDialog::askPrimeVerticalLineColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.primeVerticalLineColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.primeVerticalLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorPrimeVert icalLine->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorPrim eVerticalLine->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorPrimeVerticalLine(vColo r); GETSTELMODULE(GridLinesMgr)->setColorPrimeVerticalLine(vColo r);
StelApp::getInstance().getSettings()->setValue("color/prime_ vertical_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/prime_ vertical_color", StelUtils::vec3fToStr(vColor));
ui->colorPrimeVerticalLine->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }"); ui->colorPrimeVerticalLine->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askMeridianLineColor() void ViewDialog::askMeridianLineColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.meridianLineColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.meridianLineColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorMeridianL ine->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorMeri dianLine->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorMeridianLine(vColor); GETSTELMODULE(GridLinesMgr)->setColorMeridianLine(vColor);
StelApp::getInstance().getSettings()->setValue("color/meridi an_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/meridi an_color", StelUtils::vec3fToStr(vColor));
ui->colorMeridianLine->setStyleSheet("QToolButton { backgrou nd-color:" + c.name() + "; }"); ui->colorMeridianLine->setStyleSheet("QToolButton { backgrou nd-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askCelestialJ2000PolesColor() void ViewDialog::askCelestialJ2000PolesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.celestialJ2000PolesColor")->getValue().value<Vec3f>() ; Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.celestialJ2000PolesColor")->getValue().value<Vec3f>() ;
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorCelestial J2000Poles->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorCele stialJ2000Poles->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorCelestialJ2000Poles(vCo lor); GETSTELMODULE(GridLinesMgr)->setColorCelestialJ2000Poles(vCo lor);
StelApp::getInstance().getSettings()->setValue("color/celest ial_J2000_poles_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/celest ial_J2000_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorCelestialJ2000Poles->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }"); ui->colorCelestialJ2000Poles->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askCelestialPolesColor() void ViewDialog::askCelestialPolesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.celestialPolesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.celestialPolesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorCelestial Poles->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorCele stialPoles->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorCelestialPoles(vColor); GETSTELMODULE(GridLinesMgr)->setColorCelestialPoles(vColor);
StelApp::getInstance().getSettings()->setValue("color/celest ial_poles_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/celest ial_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorCelestialPoles->setStyleSheet("QToolButton { backgr ound-color:" + c.name() + "; }"); ui->colorCelestialPoles->setStyleSheet("QToolButton { backgr ound-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askZenithNadirColor() void ViewDialog::askZenithNadirColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.zenithNadirColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.zenithNadirColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorZenithNad ir->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorZeni thNadir->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorZenithNadir(vColor); GETSTELMODULE(GridLinesMgr)->setColorZenithNadir(vColor);
StelApp::getInstance().getSettings()->setValue("color/zenith _nadir_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/zenith _nadir_color", StelUtils::vec3fToStr(vColor));
ui->colorZenithNadir->setStyleSheet("QToolButton { backgroun d-color:" + c.name() + "; }"); ui->colorZenithNadir->setStyleSheet("QToolButton { backgroun d-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEclipticJ2000PolesColor() void ViewDialog::askEclipticJ2000PolesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticJ2000PolesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticJ2000PolesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticJ 2000Poles->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEcli pticJ2000Poles->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticJ2000Poles(vCol or); GETSTELMODULE(GridLinesMgr)->setColorEclipticJ2000Poles(vCol or);
StelApp::getInstance().getSettings()->setValue("color/eclipt ic_J2000_poles_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/eclipt ic_J2000_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticJ2000Poles->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorEclipticJ2000Poles->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEclipticPolesColor() void ViewDialog::askEclipticPolesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticPolesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.eclipticPolesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEclipticP oles->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEcli pticPoles->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEclipticPoles(vColor); GETSTELMODULE(GridLinesMgr)->setColorEclipticPoles(vColor);
StelApp::getInstance().getSettings()->setValue("color/eclipt ic_poles_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/eclipt ic_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorEclipticPoles->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }"); ui->colorEclipticPoles->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askGalacticPolesColor() void ViewDialog::askGalacticPolesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.galacticPolesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.galacticPolesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorGalacticP oles->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorGala cticPoles->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorGalacticPoles(vColor); GETSTELMODULE(GridLinesMgr)->setColorGalacticPoles(vColor);
StelApp::getInstance().getSettings()->setValue("color/galact ic_poles_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/galact ic_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorGalacticPoles->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }"); ui->colorGalacticPoles->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askSupergalacticPolesColor() void ViewDialog::askSupergalacticPolesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.supergalacticPolesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.supergalacticPolesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorSupergala cticPoles->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorSupe rgalacticPoles->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorSupergalacticPoles(vCol or); GETSTELMODULE(GridLinesMgr)->setColorSupergalacticPoles(vCol or);
StelApp::getInstance().getSettings()->setValue("color/superg alactic_poles_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/superg alactic_poles_color", StelUtils::vec3fToStr(vColor));
ui->colorSupergalacticPoles->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorSupergalacticPoles->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEquinoxJ2000PointsColor() void ViewDialog::askEquinoxJ2000PointsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equinoxJ2000PointsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equinoxJ2000PointsColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquinoxJ2 000Points->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEqui noxJ2000Points->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquinoxJ2000Points(vCol or); GETSTELMODULE(GridLinesMgr)->setColorEquinoxJ2000Points(vCol or);
StelApp::getInstance().getSettings()->setValue("color/equino x_J2000_points_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/equino x_J2000_points_color", StelUtils::vec3fToStr(vColor));
ui->colorEquinoxJ2000Points->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorEquinoxJ2000Points->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askEquinoxPointsColor() void ViewDialog::askEquinoxPointsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equinoxPointsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.equinoxPointsColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorEquinoxPo ints->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorEqui noxPoints->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorEquinoxPoints(vColor); GETSTELMODULE(GridLinesMgr)->setColorEquinoxPoints(vColor);
StelApp::getInstance().getSettings()->setValue("color/equino x_points_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/equino x_points_color", StelUtils::vec3fToStr(vColor));
ui->colorEquinoxPoints->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }"); ui->colorEquinoxPoints->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askSolsticeJ2000PointsColor() void ViewDialog::askSolsticeJ2000PointsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.solsticeJ2000PointsColor")->getValue().value<Vec3f>() ; Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.solsticeJ2000PointsColor")->getValue().value<Vec3f>() ;
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorSolsticeJ 2000Points->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorSols ticeJ2000Points->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorSolsticeJ2000Points(vCo lor); GETSTELMODULE(GridLinesMgr)->setColorSolsticeJ2000Points(vCo lor);
StelApp::getInstance().getSettings()->setValue("color/solsti ce_J2000_points_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/solsti ce_J2000_points_color", StelUtils::vec3fToStr(vColor));
ui->colorSolsticeJ2000Points->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }"); ui->colorSolsticeJ2000Points->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askSolsticePointsColor() void ViewDialog::askSolsticePointsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.solsticePointsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("GridLinesMgr.solsticePointsColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorSolsticeP oints->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorSols ticePoints->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(GridLinesMgr)->setColorSolsticePoints(vColor); GETSTELMODULE(GridLinesMgr)->setColorSolsticePoints(vColor);
StelApp::getInstance().getSettings()->setValue("color/solsti ce_points_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/solsti ce_points_color", StelUtils::vec3fToStr(vColor));
ui->colorSolsticePoints->setStyleSheet("QToolButton { backgr ound-color:" + c.name() + "; }"); ui->colorSolsticePoints->setStyleSheet("QToolButton { backgr ound-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askCardinalPointsColor() void ViewDialog::askCardinalPointsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("LandscapeMgr.cardinalsPointsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("LandscapeMgr.cardinalsPointsColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorCardinalP oints->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorCard inalPoints->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(LandscapeMgr)->setColorCardinalPoints(vColor); GETSTELMODULE(LandscapeMgr)->setColorCardinalPoints(vColor);
StelApp::getInstance().getSettings()->setValue("color/cardin al_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/cardin al_color", StelUtils::vec3fToStr(vColor));
ui->colorCardinalPoints->setStyleSheet("QToolButton { backgr ound-color:" + c.name() + "; }"); ui->colorCardinalPoints->setStyleSheet("QToolButton { backgr ound-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askConstellationBoundariesColor() void ViewDialog::askConstellationBoundariesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("ConstellationMgr.boundariesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("ConstellationMgr.boundariesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorConstella tionBoundaries->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorCons tellationBoundaries->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(ConstellationMgr)->setBoundariesColor(vColor); GETSTELMODULE(ConstellationMgr)->setBoundariesColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/const_ boundary_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/const_ boundary_color", StelUtils::vec3fToStr(vColor));
ui->colorConstellationBoundaries->setStyleSheet("QToolButton { background-color:" + c.name() + "; }"); ui->colorConstellationBoundaries->setStyleSheet("QToolButton { background-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askConstellationLabelsColor() void ViewDialog::askConstellationLabelsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("ConstellationMgr.namesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("ConstellationMgr.namesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorConstella tionLabels->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorCons tellationLabels->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(ConstellationMgr)->setLabelsColor(vColor); GETSTELMODULE(ConstellationMgr)->setLabelsColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/const_ names_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/const_ names_color", StelUtils::vec3fToStr(vColor));
ui->colorConstellationLabels->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }"); ui->colorConstellationLabels->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askConstellationLinesColor() void ViewDialog::askConstellationLinesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("ConstellationMgr.linesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("ConstellationMgr.linesColor")->getValue().value<Vec3f>();
QColor color(0,0,0); QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]); color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorConstella tionLines->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorCons tellationLines->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(ConstellationMgr)->setLinesColor(vColor); GETSTELMODULE(ConstellationMgr)->setLinesColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/const_ lines_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/const_ lines_color", StelUtils::vec3fToStr(vColor));
ui->colorConstellationLines->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorConstellationLines->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ViewDialog::askAsterismLabelsColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("AsterismMgr.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, Q_NULLPTR, q_(ui->colorAste
rismLabels->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(AsterismMgr)->setLabelsColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/asteri
sm_names_color", StelUtils::vec3fToStr(vColor));
ui->colorAsterismLabels->setStyleSheet("QToolButton { backgr
ound-color:" + c.name() + "; }");
}
}
void ViewDialog::askAsterismLinesColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("AsterismMgr.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, Q_NULLPTR, q_(ui->colorAste
rismLines->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(AsterismMgr)->setLinesColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/asteri
sm_lines_color", StelUtils::vec3fToStr(vColor));
ui->colorAsterismLines->setStyleSheet("QToolButton { backgro
und-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 1017 skipping to change at line 1085
if (ui->checkBoxCr->isChecked()) if (ui->checkBoxCr->isChecked())
flags |= Nebula::CatCr; flags |= Nebula::CatCr;
if (ui->checkBoxMel->isChecked()) if (ui->checkBoxMel->isChecked())
flags |= Nebula::CatMel; flags |= Nebula::CatMel;
if (ui->checkBoxCed->isChecked()) if (ui->checkBoxCed->isChecked())
flags |= Nebula::CatCed; flags |= Nebula::CatCed;
if (ui->checkBoxPGC->isChecked()) if (ui->checkBoxPGC->isChecked())
flags |= Nebula::CatPGC; flags |= Nebula::CatPGC;
if (ui->checkBoxUGC->isChecked()) if (ui->checkBoxUGC->isChecked())
flags |= Nebula::CatUGC; flags |= Nebula::CatUGC;
if (ui->checkBoxArp->isChecked())
flags |= Nebula::CatArp;
if (ui->checkBoxVV->isChecked())
flags |= Nebula::CatVV;
if (ui->checkBoxPK->isChecked())
flags |= Nebula::CatPK;
GETSTELMODULE(NebulaMgr)->setCatalogFilters(flags); GETSTELMODULE(NebulaMgr)->setCatalogFilters(flags);
} }
void ViewDialog::setSelectedTypesFromCheckBoxes() void ViewDialog::setSelectedTypesFromCheckBoxes()
{ {
Nebula::TypeGroup flags(0); Nebula::TypeGroup flags(0);
if (ui->checkBoxGalaxiesType->isChecked()) if (ui->checkBoxGalaxiesType->isChecked())
flags |= Nebula::TypeGalaxies; flags |= Nebula::TypeGalaxies;
skipping to change at line 1068 skipping to change at line 1142
ui->checkBoxSh2->setChecked(flags & Nebula::CatSh2); ui->checkBoxSh2->setChecked(flags & Nebula::CatSh2);
ui->checkBoxVdB->setChecked(flags & Nebula::CatVdB); ui->checkBoxVdB->setChecked(flags & Nebula::CatVdB);
ui->checkBoxRCW->setChecked(flags & Nebula::CatRCW); ui->checkBoxRCW->setChecked(flags & Nebula::CatRCW);
ui->checkBoxLDN->setChecked(flags & Nebula::CatLDN); ui->checkBoxLDN->setChecked(flags & Nebula::CatLDN);
ui->checkBoxLBN->setChecked(flags & Nebula::CatLBN); ui->checkBoxLBN->setChecked(flags & Nebula::CatLBN);
ui->checkBoxCr->setChecked(flags & Nebula::CatCr); ui->checkBoxCr->setChecked(flags & Nebula::CatCr);
ui->checkBoxMel->setChecked(flags & Nebula::CatMel); ui->checkBoxMel->setChecked(flags & Nebula::CatMel);
ui->checkBoxCed->setChecked(flags & Nebula::CatCed); ui->checkBoxCed->setChecked(flags & Nebula::CatCed);
ui->checkBoxPGC->setChecked(flags & Nebula::CatPGC); ui->checkBoxPGC->setChecked(flags & Nebula::CatPGC);
ui->checkBoxUGC->setChecked(flags & Nebula::CatUGC); ui->checkBoxUGC->setChecked(flags & Nebula::CatUGC);
ui->checkBoxArp->setChecked(flags & Nebula::CatArp);
ui->checkBoxVV->setChecked(flags & Nebula::CatVV);
ui->checkBoxPK->setChecked(flags & Nebula::CatPK);
} }
void ViewDialog::updateSelectedTypesCheckBoxes() void ViewDialog::updateSelectedTypesCheckBoxes()
{ {
const Nebula::TypeGroup& flags = GETSTELMODULE(NebulaMgr)->getTypeFi lters(); const Nebula::TypeGroup& flags = GETSTELMODULE(NebulaMgr)->getTypeFi lters();
ui->checkBoxGalaxiesType->setChecked(flags & Nebula::TypeGalaxies); ui->checkBoxGalaxiesType->setChecked(flags & Nebula::TypeGalaxies);
ui->checkBoxActiveGalaxiesType->setChecked(flags & Nebula::TypeActiv eGalaxies); ui->checkBoxActiveGalaxiesType->setChecked(flags & Nebula::TypeActiv eGalaxies);
ui->checkBoxInteractingGalaxiesType->setChecked(flags & Nebula::Type InteractingGalaxies); ui->checkBoxInteractingGalaxiesType->setChecked(flags & Nebula::Type InteractingGalaxies);
ui->checkBoxStarClustersType->setChecked(flags & Nebula::TypeStarClu sters); ui->checkBoxStarClustersType->setChecked(flags & Nebula::TypeStarClu sters);
skipping to change at line 1091 skipping to change at line 1168
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 && greatRedSpotDialog!=NULL) if (!b && greatRedSpotDialog!=Q_NULLPTR)
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 1165 skipping to change at line 1242
nelm.append("4.0"); nelm.append("4.0");
QString tooltip = QString("%1 (%2 %3)") QString tooltip = QString("%1 (%2 %3)")
.arg(list.at(i)) .arg(list.at(i))
.arg(q_("The naked-eye limiting magnitude is")) .arg(q_("The naked-eye limiting magnitude is"))
.arg(nelm.at(i)); .arg(nelm.at(i));
ui->lightPollutionSpinBox->setToolTip(tooltip); ui->lightPollutionSpinBox->setToolTip(tooltip);
} }
void ViewDialog::populateToolTips()
{
ui->planetUseObjModelsCheckBox->setToolTip(QString("<p>%1</p>").arg(
q_("Uses a polygonal 3D model for some selected subplanetary objects (small
moons, asteroids, comets) instead of a spherical approximation")));
ui->planetShowObjSelfShadowsCheckBox->setToolTip(QString("<p>%1</p>"
).arg(q_("Use a &quot;shadow map&quot; to simulate self-shadows of non-conv
ex solar system objects. May reduce shadow penumbra quality on some objects
.")));
}
void ViewDialog::populateLists() void ViewDialog::populateLists()
{ {
// Fill the culture list widget from the available list // Fill the culture list widget from the available list
QListWidget* l = ui->culturesListWidget; QListWidget* l = ui->culturesListWidget;
l->blockSignals(true); l->blockSignals(true);
l->clear(); l->clear();
l->addItems(StelApp::getInstance().getSkyCultureMgr().getSkyCultureL istI18()); l->addItems(StelApp::getInstance().getSkyCultureMgr().getSkyCultureL istI18());
l->setCurrentItem(l->findItems(StelApp::getInstance().getSkyCultureM gr().getCurrentSkyCultureNameI18(), Qt::MatchExactly).at(0)); l->setCurrentItem(l->findItems(StelApp::getInstance().getSkyCultureM gr().getCurrentSkyCultureNameI18(), Qt::MatchExactly).at(0));
l->blockSignals(false); l->blockSignals(false);
updateSkyCultureText(); updateSkyCultureText();
skipping to change at line 1337 skipping to change at line 1420
} }
} }
ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescr iption()); ui->landscapeTextBrowser->setHtml(lmgr->getCurrentLandscapeHtmlDescr iption());
updateDefaultLandscape(); updateDefaultLandscape();
// Reset values that might have changed. // Reset values that might have changed.
ui->showFogCheckBox->setChecked(lmgr->getFlagFog()); ui->showFogCheckBox->setChecked(lmgr->getFlagFog());
} }
void ViewDialog::showAddRemoveLandscapesDialog() void ViewDialog::showAddRemoveLandscapesDialog()
{ {
if(addRemoveLandscapesDialog == NULL) if(addRemoveLandscapesDialog == Q_NULLPTR)
addRemoveLandscapesDialog = new AddRemoveLandscapesDialog(); addRemoveLandscapesDialog = new AddRemoveLandscapesDialog();
addRemoveLandscapesDialog->setVisible(true); addRemoveLandscapesDialog->setVisible(true);
} }
void ViewDialog::showAtmosphereDialog() void ViewDialog::showAtmosphereDialog()
{ {
if(atmosphereDialog == NULL) if(atmosphereDialog == Q_NULLPTR)
atmosphereDialog = new AtmosphereDialog(); atmosphereDialog = new AtmosphereDialog();
atmosphereDialog->setVisible(true); atmosphereDialog->setVisible(true);
} }
void ViewDialog::showGreatRedSpotDialog() void ViewDialog::showGreatRedSpotDialog()
{ {
if(greatRedSpotDialog == NULL) if(greatRedSpotDialog == Q_NULLPTR)
greatRedSpotDialog = new GreatRedSpotDialog(); greatRedSpotDialog = new GreatRedSpotDialog();
greatRedSpotDialog->setVisible(true); greatRedSpotDialog->setVisible(true);
} }
void ViewDialog::showConfigureDSOColorsDialog() void ViewDialog::showConfigureDSOColorsDialog()
{ {
if(configureDSOColorsDialog == NULL) if(configureDSOColorsDialog == Q_NULLPTR)
configureDSOColorsDialog = new ConfigureDSOColorsDialog(); configureDSOColorsDialog = new ConfigureDSOColorsDialog();
configureDSOColorsDialog->setVisible(true); configureDSOColorsDialog->setVisible(true);
} }
void ViewDialog::showConfigureOrbitColorsDialog() void ViewDialog::showConfigureOrbitColorsDialog()
{ {
if(configureOrbitColorsDialog == NULL) if(configureOrbitColorsDialog == Q_NULLPTR)
configureOrbitColorsDialog = new ConfigureOrbitColorsDialog( ); configureOrbitColorsDialog = new ConfigureOrbitColorsDialog( );
configureOrbitColorsDialog->setVisible(true); 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>");
skipping to change at line 1439 skipping to change at line 1522
ui->useAsDefaultLandscapeCheckBox->setChecked(b); ui->useAsDefaultLandscapeCheckBox->setChecked(b);
ui->useAsDefaultLandscapeCheckBox->setEnabled(!b); ui->useAsDefaultLandscapeCheckBox->setEnabled(!b);
} }
void ViewDialog::changePage(QListWidgetItem *current, QListWidgetItem *prev ious) void ViewDialog::changePage(QListWidgetItem *current, QListWidgetItem *prev ious)
{ {
if (!current) if (!current)
current = previous; current = previous;
ui->stackedWidget->setCurrentIndex(ui->stackListWidget->row(current) ); ui->stackedWidget->setCurrentIndex(ui->stackListWidget->row(current) );
} }
void ViewDialog::populatePlanetMagnitudeAlgorithmsList()
{
Q_ASSERT(ui->planetMagnitudeAlgorithmComboBox);
QComboBox* algorithms = ui->planetMagnitudeAlgorithmComboBox;
//Save the current selection to be restored later
algorithms->blockSignals(true);
int index = algorithms->currentIndex();
QVariant selectedAlgorithmId = algorithms->itemData(index);
algorithms->clear();
//For each algorithm, display the localized name and store the key a
s user data.
algorithms->addItem(qc_("G. Mueller (1893)", "magnitude algorithm"),
Planet::Mueller_1893);
algorithms->addItem(qc_("Astronomical Almanach (1984)", "magnitude a
lgorithm"), Planet::Astr_Alm_1984);
algorithms->addItem(qc_("Explanatory Supplement (1992)", "magnitude
algorithm"), Planet::Expl_Sup_1992);
algorithms->addItem(qc_("Explanatory Supplement (2013)", "magnitude
algorithm"), Planet::Expl_Sup_2013);
algorithms->addItem(qc_("Generic", "magnitude algorithm"), Planet::G
eneric);
//Restore the selection
index = algorithms->findData(selectedAlgorithmId, Qt::UserRole, Qt::
MatchCaseSensitive);
algorithms->setCurrentIndex(index);
//algorithms->model()->sort(0);
algorithms->blockSignals(false);
}
void ViewDialog::setPlanetMagnitudeAlgorithm(int algorithmID)
{
Planet::ApparentMagnitudeAlgorithm currentAlgorithm = (Planet::Appar
entMagnitudeAlgorithm) ui->planetMagnitudeAlgorithmComboBox->itemData(algor
ithmID).toInt();
Planet::setApparentMagnitudeAlgorithm(currentAlgorithm);
populatePlanetMagnitudeAlgorithmDescription();
}
void ViewDialog::populatePlanetMagnitudeAlgorithmDescription()
{
int currentAlgorithm = ui->planetMagnitudeAlgorithmComboBox->findDat
a(Planet::getApparentMagnitudeAlgorithm(), Qt::UserRole, Qt::MatchCaseSensi
tive);
if (currentAlgorithm==-1)
{
// Use ExplanSupl2013 as default
currentAlgorithm = ui->planetMagnitudeAlgorithmComboBox->fin
dData(Planet::Expl_Sup_2013, Qt::UserRole, Qt::MatchCaseSensitive);
}
QString info = "";
switch (currentAlgorithm) {
case Planet::Astr_Alm_1984:
info = q_("The algorithm was used in the <em>Astrono
mical Almanac</em> (1984 and later) and gives V (instrumental) magnitudes (
allegedly from D.L. Harris).");
break;
case Planet::Mueller_1893:
info = q_("The algorithm is based on visual observat
ions 1877-1891 by G. Mueller and was published in <em>Explanatory Supplemen
t to the Astronomical Ephemeris</em> (1961).");
break;
case Planet::Expl_Sup_1992:
info = q_("The algorithm was published in the <em>Ex
planatory Supplement to the Astronomical Almanac</em> (1992).");
break;
case Planet::Expl_Sup_2013:
info = q_("The algorithm was published in the 3rd ed
ition of the <em>Explanatory Supplement to the Astronomical Almanac</em> (2
013).");
break;
default:
info = q_("Visual magnitude based on phase angle and
albedo.");
break;
}
ui->planetMagnitudeAlgorithmDescription->setText(QString("<small>%1<
/small>").arg(info));
}
 End of changes. 67 change blocks. 
55 lines changed or deleted 166 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/