ConfigureDSOColorsDialog.cpp   ConfigureDSOColorsDialog.cpp 
skipping to change at line 140 skipping to change at line 140
// 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 ConfigureDSOColorsDialog::askDSOLabelsColor() void ConfigureDSOColorsDialog::askDSOLabelsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.labelsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.labelsColor")->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->colorDSOLabels ->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOL abels->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setLabelsColor(vColor); GETSTELMODULE(NebulaMgr)->setLabelsColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_la bel_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_la bel_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOLabels->setStyleSheet("QToolButton { background- color:" + c.name() + "; }"); ui->colorDSOLabels->setStyleSheet("QToolButton { background- color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOMarkersColor() void ConfigureDSOColorsDialog::askDSOMarkersColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.circlesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.circlesColor")->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->colorDSOMarker s->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOM arkers->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setCirclesColor(vColor); GETSTELMODULE(NebulaMgr)->setCirclesColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_ci rcle_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_ci rcle_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOMarkers->setStyleSheet("QToolButton { background -color:" + c.name() + "; }"); ui->colorDSOMarkers->setStyleSheet("QToolButton { background -color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOGalaxiesColor() void ConfigureDSOColorsDialog::askDSOGalaxiesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.galaxiesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.galaxiesColor")->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->colorDSOGalaxi es->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOG alaxies->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setGalaxyColor(vColor); GETSTELMODULE(NebulaMgr)->setGalaxyColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_ga laxy_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_ga laxy_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOGalaxies->setStyleSheet("QToolButton { backgroun d-color:" + c.name() + "; }"); ui->colorDSOGalaxies->setStyleSheet("QToolButton { backgroun d-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOActiveGalaxiesColor() void ConfigureDSOColorsDialog::askDSOActiveGalaxiesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.activeGalaxiesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.activeGalaxiesColor")->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->colorDSOActive Galaxies->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOA ctiveGalaxies->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setActiveGalaxyColor(vColor); GETSTELMODULE(NebulaMgr)->setActiveGalaxyColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_ac tive_galaxy_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_ac tive_galaxy_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOActiveGalaxies->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }"); ui->colorDSOActiveGalaxies->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSORadioGalaxiesColor() void ConfigureDSOColorsDialog::askDSORadioGalaxiesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.radioGalaxiesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.radioGalaxiesColor")->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->colorDSORadioG alaxies->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOR adioGalaxies->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setRadioGalaxyColor(vColor); GETSTELMODULE(NebulaMgr)->setRadioGalaxyColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_ra dio_galaxy_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_ra dio_galaxy_color", StelUtils::vec3fToStr(vColor));
ui->colorDSORadioGalaxies->setStyleSheet("QToolButton { back ground-color:" + c.name() + "; }"); ui->colorDSORadioGalaxies->setStyleSheet("QToolButton { back ground-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOInteractingGalaxiesColor() void ConfigureDSOColorsDialog::askDSOInteractingGalaxiesColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.interactingGalaxiesColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.interactingGalaxiesColor")->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->colorDSOIntera ctingGalaxies->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOI nteractingGalaxies->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setInteractingGalaxyColor(vColor); GETSTELMODULE(NebulaMgr)->setInteractingGalaxyColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_in teracting_galaxy_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_in teracting_galaxy_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOInteractingGalaxies->setStyleSheet("QToolButton { background-color:" + c.name() + "; }"); ui->colorDSOInteractingGalaxies->setStyleSheet("QToolButton { background-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOQuasarsColor() void ConfigureDSOColorsDialog::askDSOQuasarsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.quasarsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.quasarsColor")->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->colorDSOQuasar s->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOQ uasars->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setQuasarColor(vColor); GETSTELMODULE(NebulaMgr)->setQuasarColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_qu asar_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_qu asar_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOQuasars->setStyleSheet("QToolButton { background -color:" + c.name() + "; }"); ui->colorDSOQuasars->setStyleSheet("QToolButton { background -color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOPossibleQuasarsColor() void ConfigureDSOColorsDialog::askDSOPossibleQuasarsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.possibleQuasarsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.possibleQuasarsColor")->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->colorDSOPossib leQuasars->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOP ossibleQuasars->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setPossibleQuasarColor(vColor); GETSTELMODULE(NebulaMgr)->setPossibleQuasarColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_po ssible_quasar_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_po ssible_quasar_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOPossibleQuasars->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorDSOPossibleQuasars->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOStarClustersColor() void ConfigureDSOColorsDialog::askDSOStarClustersColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.clustersColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.clustersColor")->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->colorDSOStarCl usters->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOS tarClusters->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setClusterColor(vColor); GETSTELMODULE(NebulaMgr)->setClusterColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_cl uster_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_cl uster_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOStarClusters->setStyleSheet("QToolButton { backg round-color:" + c.name() + "; }"); ui->colorDSOStarClusters->setStyleSheet("QToolButton { backg round-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOOpenStarClustersColor() void ConfigureDSOColorsDialog::askDSOOpenStarClustersColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.openClustersColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.openClustersColor")->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->colorDSOOpenSt arClusters->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOO penStarClusters->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setOpenClusterColor(vColor); GETSTELMODULE(NebulaMgr)->setOpenClusterColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_op en_cluster_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_op en_cluster_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOOpenStarClusters->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }"); ui->colorDSOOpenStarClusters->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOGlobularStarClustersColor() void ConfigureDSOColorsDialog::askDSOGlobularStarClustersColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.globularClustersColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.globularClustersColor")->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->colorDSOGlobul arStarClusters->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOG lobularStarClusters->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setGlobularClusterColor(vColor); GETSTELMODULE(NebulaMgr)->setGlobularClusterColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_gl obular_cluster_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_gl obular_cluster_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOGlobularStarClusters->setStyleSheet("QToolButton { background-color:" + c.name() + "; }"); ui->colorDSOGlobularStarClusters->setStyleSheet("QToolButton { background-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOStellarAssociationsColor() void ConfigureDSOColorsDialog::askDSOStellarAssociationsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.stellarAssociationsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.stellarAssociationsColor")->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->colorDSOStella rAssociations->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOS tellarAssociations->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setStellarAssociationColor(vColor) ; GETSTELMODULE(NebulaMgr)->setStellarAssociationColor(vColor) ;
StelApp::getInstance().getSettings()->setValue("color/dso_st ellar_association_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_st ellar_association_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOStellarAssociations->setStyleSheet("QToolButton { background-color:" + c.name() + "; }"); ui->colorDSOStellarAssociations->setStyleSheet("QToolButton { background-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOStarCloudsColor() void ConfigureDSOColorsDialog::askDSOStarCloudsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.starCloudsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.starCloudsColor")->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->colorDSOStarCl ouds->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOS tarClouds->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setStarCloudColor(vColor); GETSTELMODULE(NebulaMgr)->setStarCloudColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_st ar_cloud_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_st ar_cloud_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOStarClouds->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }"); ui->colorDSOStarClouds->setStyleSheet("QToolButton { backgro und-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOPlanetaryNebulaeColor() void ConfigureDSOColorsDialog::askDSOPlanetaryNebulaeColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.planetaryNebulaeColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.planetaryNebulaeColor")->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->colorDSOPlanet aryNebulae->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOP lanetaryNebulae->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setPlanetaryNebulaColor(vColor); GETSTELMODULE(NebulaMgr)->setPlanetaryNebulaColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_pl anetary_nebula_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_pl anetary_nebula_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOPlanetaryNebulae->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }"); ui->colorDSOPlanetaryNebulae->setStyleSheet("QToolButton { b ackground-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSODarkNebulaeColor() void ConfigureDSOColorsDialog::askDSODarkNebulaeColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.darkNebulaeColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.darkNebulaeColor")->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->colorDSODarkNe bulae->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOD arkNebulae->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setDarkNebulaColor(vColor); GETSTELMODULE(NebulaMgr)->setDarkNebulaColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_da rk_nebula_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_da rk_nebula_color", StelUtils::vec3fToStr(vColor));
ui->colorDSODarkNebulae->setStyleSheet("QToolButton { backgr ound-color:" + c.name() + "; }"); ui->colorDSODarkNebulae->setStyleSheet("QToolButton { backgr ound-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOReflectionNebulaeColor() void ConfigureDSOColorsDialog::askDSOReflectionNebulaeColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.reflectionNebulaeColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.reflectionNebulaeColor")->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->colorDSOReflec tionNebulae->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOR eflectionNebulae->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setReflectionNebulaColor(vColor); GETSTELMODULE(NebulaMgr)->setReflectionNebulaColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_re flection_nebula_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_re flection_nebula_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOReflectionNebulae->setStyleSheet("QToolButton { background-color:" + c.name() + "; }"); ui->colorDSOReflectionNebulae->setStyleSheet("QToolButton { background-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOBipolarNebulaeColor() void ConfigureDSOColorsDialog::askDSOBipolarNebulaeColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.bipolarNebulaeColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.bipolarNebulaeColor")->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->colorDSOBipola rNebulae->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOB ipolarNebulae->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setBipolarNebulaColor(vColor); GETSTELMODULE(NebulaMgr)->setBipolarNebulaColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_bi polar_nebula_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_bi polar_nebula_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOBipolarNebulae->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }"); ui->colorDSOBipolarNebulae->setStyleSheet("QToolButton { bac kground-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOEmissionNebulaeColor() void ConfigureDSOColorsDialog::askDSOEmissionNebulaeColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.emissionNebulaeColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.emissionNebulaeColor")->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->colorDSOEmissi onNebulae->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOE missionNebulae->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setEmissionNebulaColor(vColor); GETSTELMODULE(NebulaMgr)->setEmissionNebulaColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_em ission_nebula_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_em ission_nebula_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOEmissionNebulae->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorDSOEmissionNebulae->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOPossiblePlanetaryNebulaeColor() void ConfigureDSOColorsDialog::askDSOPossiblePlanetaryNebulaeColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.possiblePlanetaryNebulaeColor")->getValue().value<Vec3f> (); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.possiblePlanetaryNebulaeColor")->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->colorDSOPossib lePlanetaryNebulae->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOP ossiblePlanetaryNebulae->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setPossiblePlanetaryNebulaColor(vC olor); GETSTELMODULE(NebulaMgr)->setPossiblePlanetaryNebulaColor(vC olor);
StelApp::getInstance().getSettings()->setValue("color/dso_po ssible_planetary_nebula_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_po ssible_planetary_nebula_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOPossiblePlanetaryNebulae->setStyleSheet("QToolBu tton { background-color:" + c.name() + "; }"); ui->colorDSOPossiblePlanetaryNebulae->setStyleSheet("QToolBu tton { background-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOProtoplanetaryNebulaeColor() void ConfigureDSOColorsDialog::askDSOProtoplanetaryNebulaeColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.protoplanetaryNebulaeColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.protoplanetaryNebulaeColor")->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->colorDSOProtop lanetaryNebulae->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOP rotoplanetaryNebulae->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setProtoplanetaryNebulaColor(vColo r); GETSTELMODULE(NebulaMgr)->setProtoplanetaryNebulaColor(vColo r);
StelApp::getInstance().getSettings()->setValue("color/dso_pr otoplanetary_nebula_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_pr otoplanetary_nebula_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOProtoplanetaryNebulae->setStyleSheet("QToolButto n { background-color:" + c.name() + "; }"); ui->colorDSOProtoplanetaryNebulae->setStyleSheet("QToolButto n { background-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSONebulosityClustersColor() void ConfigureDSOColorsDialog::askDSONebulosityClustersColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.clusterWithNebulosityColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.clusterWithNebulosityColor")->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->colorDSONebulo sityClusters->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSON ebulosityClusters->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setClusterWithNebulosityColor(vCol or); GETSTELMODULE(NebulaMgr)->setClusterWithNebulosityColor(vCol or);
StelApp::getInstance().getSettings()->setValue("color/dso_cl uster_with_nebulosity_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_cl uster_with_nebulosity_color", StelUtils::vec3fToStr(vColor));
ui->colorDSONebulosityClusters->setStyleSheet("QToolButton { background-color:" + c.name() + "; }"); ui->colorDSONebulosityClusters->setStyleSheet("QToolButton { background-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSONebulaeColor() void ConfigureDSOColorsDialog::askDSONebulaeColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.nebulaeColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.nebulaeColor")->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->colorDSONebula e->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSON ebulae->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setNebulaColor(vColor); GETSTELMODULE(NebulaMgr)->setNebulaColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_ne bula_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_ne bula_color", StelUtils::vec3fToStr(vColor));
ui->colorDSONebulae->setStyleSheet("QToolButton { background -color:" + c.name() + "; }"); ui->colorDSONebulae->setStyleSheet("QToolButton { background -color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOHydrogenRegionsColor() void ConfigureDSOColorsDialog::askDSOHydrogenRegionsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.hydrogenRegionsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.hydrogenRegionsColor")->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->colorDSOHydrog enRegions->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOH ydrogenRegions->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setHydrogenRegionColor(vColor); GETSTELMODULE(NebulaMgr)->setHydrogenRegionColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_hy drogen_region_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_hy drogen_region_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOHydrogenRegions->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorDSOHydrogenRegions->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOInterstellarMatterColor() void ConfigureDSOColorsDialog::askDSOInterstellarMatterColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.interstellarMatterColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.interstellarMatterColor")->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->colorDSOInters tellarMatter->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOI nterstellarMatter->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setInterstellarMatterColor(vColor) ; GETSTELMODULE(NebulaMgr)->setInterstellarMatterColor(vColor) ;
StelApp::getInstance().getSettings()->setValue("color/dso_in terstellar_matter_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_in terstellar_matter_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOInterstellarMatter->setStyleSheet("QToolButton { background-color:" + c.name() + "; }"); ui->colorDSOInterstellarMatter->setStyleSheet("QToolButton { background-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOEmissionObjectsColor() void ConfigureDSOColorsDialog::askDSOEmissionObjectsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.emissionObjectsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.emissionObjectsColor")->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->colorDSOEmissi onObjects->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOE missionObjects->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setEmissionObjectColor(vColor); GETSTELMODULE(NebulaMgr)->setEmissionObjectColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_em ission_object_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_em ission_object_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOEmissionObjects->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorDSOEmissionObjects->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOMolecularCloudsColor() void ConfigureDSOColorsDialog::askDSOMolecularCloudsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.molecularCloudsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.molecularCloudsColor")->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->colorDSOMolecu larClouds->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOM olecularClouds->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setMolecularCloudColor(vColor); GETSTELMODULE(NebulaMgr)->setMolecularCloudColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_mo lecular_cloud_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_mo lecular_cloud_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOMolecularClouds->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorDSOMolecularClouds->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOBLLacObjectsColor() void ConfigureDSOColorsDialog::askDSOBLLacObjectsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.blLacObjectsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.blLacObjectsColor")->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->colorDSOBLLacO bjects->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOB LLacObjects->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setBlLacObjectColor(vColor); GETSTELMODULE(NebulaMgr)->setBlLacObjectColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_bl _lac_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_bl _lac_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOBLLacObjects->setStyleSheet("QToolButton { backg round-color:" + c.name() + "; }"); ui->colorDSOBLLacObjects->setStyleSheet("QToolButton { backg round-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOBlazarsColor() void ConfigureDSOColorsDialog::askDSOBlazarsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.blazarsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.blazarsColor")->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->colorDSOBlazar s->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOB lazars->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setBlazarColor(vColor); GETSTELMODULE(NebulaMgr)->setBlazarColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_bl azar_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_bl azar_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOBlazars->setStyleSheet("QToolButton { background -color:" + c.name() + "; }"); ui->colorDSOBlazars->setStyleSheet("QToolButton { background -color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOYoungStellarObjectsColor() void ConfigureDSOColorsDialog::askDSOYoungStellarObjectsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.youngStellarObjectsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.youngStellarObjectsColor")->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->colorDSOYoungS tellarObjects->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOY oungStellarObjects->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setYoungStellarObjectColor(vColor) ; GETSTELMODULE(NebulaMgr)->setYoungStellarObjectColor(vColor) ;
StelApp::getInstance().getSettings()->setValue("color/dso_yo ung_stellar_object_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_yo ung_stellar_object_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOYoungStellarObjects->setStyleSheet("QToolButton { background-color:" + c.name() + "; }"); ui->colorDSOYoungStellarObjects->setStyleSheet("QToolButton { background-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOSupernovaRemnantsColor() void ConfigureDSOColorsDialog::askDSOSupernovaRemnantsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.supernovaRemnantsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.supernovaRemnantsColor")->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->colorDSOSupern ovaRemnants->toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOS upernovaRemnants->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setSupernovaRemnantColor(vColor); GETSTELMODULE(NebulaMgr)->setSupernovaRemnantColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_su pernova_remnant_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_su pernova_remnant_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOSupernovaRemnants->setStyleSheet("QToolButton { background-color:" + c.name() + "; }"); ui->colorDSOSupernovaRemnants->setStyleSheet("QToolButton { background-color:" + c.name() + "; }");
} }
} }
void ConfigureDSOColorsDialog::askDSOStarsColor() void ConfigureDSOColorsDialog::askDSOStarsColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.starsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("NebulaMgr.starsColor")->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->colorDSOStars- >toolTip())); QColor c = QColorDialog::getColor(color, Q_NULLPTR, q_(ui->colorDSOS tars->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(NebulaMgr)->setStarColor(vColor); GETSTELMODULE(NebulaMgr)->setStarColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/dso_st ar_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/dso_st ar_color", StelUtils::vec3fToStr(vColor));
ui->colorDSOStars->setStyleSheet("QToolButton { background-c olor:" + c.name() + "; }"); ui->colorDSOStars->setStyleSheet("QToolButton { background-c olor:" + c.name() + "; }");
} }
} }
 End of changes. 31 change blocks. 
31 lines changed or deleted 31 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/