ConfigureOrbitColorsDialog.cpp   ConfigureOrbitColorsDialog.cpp 
skipping to change at line 33 skipping to change at line 33
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include "ConfigureOrbitColorsDialog.hpp" #include "ConfigureOrbitColorsDialog.hpp"
#include "ui_orbitColorsDialog.h" #include "ui_orbitColorsDialog.h"
#include <QSettings> #include <QSettings>
#include <QColorDialog> #include <QColorDialog>
ConfigureOrbitColorsDialog::ConfigureOrbitColorsDialog() ConfigureOrbitColorsDialog::ConfigureOrbitColorsDialog() : StelDialog("Conf igureOrbitColorsDialog")
{ {
dialogName = "ConfigureOrbitColorsDialog";
ui = new Ui_ConfigureOrbitColorsDialogForm; ui = new Ui_ConfigureOrbitColorsDialogForm;
} }
ConfigureOrbitColorsDialog::~ConfigureOrbitColorsDialog() ConfigureOrbitColorsDialog::~ConfigureOrbitColorsDialog()
{ {
delete ui; delete ui;
} }
void ConfigureOrbitColorsDialog::retranslate() void ConfigureOrbitColorsDialog::retranslate()
{ {
skipping to change at line 80 skipping to change at line 79
colorButton(ui->colorGenericOrbits, "SolarSystem.orbitsC olor"); colorButton(ui->colorGenericOrbits, "SolarSystem.orbitsC olor");
colorButton(ui->colorGroupsMajorPlanetsOrbits, "SolarSystem.majorPl anetsOrbitsColor"); colorButton(ui->colorGroupsMajorPlanetsOrbits, "SolarSystem.majorPl anetsOrbitsColor");
colorButton(ui->colorGroupsMinorPlanetsOrbits, "SolarSystem.minorPl anetsOrbitsColor"); colorButton(ui->colorGroupsMinorPlanetsOrbits, "SolarSystem.minorPl anetsOrbitsColor");
colorButton(ui->colorGroupsDwarfPlanetsOrbits, "SolarSystem.dwarfPl anetsOrbitsColor"); colorButton(ui->colorGroupsDwarfPlanetsOrbits, "SolarSystem.dwarfPl anetsOrbitsColor");
colorButton(ui->colorGroupsMoonsOrbits, "SolarSystem.moonsOr bitsColor"); colorButton(ui->colorGroupsMoonsOrbits, "SolarSystem.moonsOr bitsColor");
colorButton(ui->colorGroupsCubewanosOrbits, "SolarSystem.cubewan osOrbitsColor"); colorButton(ui->colorGroupsCubewanosOrbits, "SolarSystem.cubewan osOrbitsColor");
colorButton(ui->colorGroupsPlutinosOrbits, "SolarSystem.plutino sOrbitsColor"); colorButton(ui->colorGroupsPlutinosOrbits, "SolarSystem.plutino sOrbitsColor");
colorButton(ui->colorGroupsSDOOrbits, "SolarSystem.scatter edDiskObjectsOrbitsColor"); colorButton(ui->colorGroupsSDOOrbits, "SolarSystem.scatter edDiskObjectsOrbitsColor");
colorButton(ui->colorGroupsOCOOrbits, "SolarSystem.oortClo udObjectsOrbitsColor"); colorButton(ui->colorGroupsOCOOrbits, "SolarSystem.oortClo udObjectsOrbitsColor");
colorButton(ui->colorGroupsCometsOrbits, "SolarSystem.cometsO rbitsColor"); colorButton(ui->colorGroupsCometsOrbits, "SolarSystem.cometsO rbitsColor");
colorButton(ui->colorGroupsSednoidsOrbits, "SolarSystem.sednoid sOrbitsColor");
colorButton(ui->colorMPMercuryOrbit, "SolarSystem.mercury OrbitColor"); colorButton(ui->colorMPMercuryOrbit, "SolarSystem.mercury OrbitColor");
colorButton(ui->colorMPVenusOrbit, "SolarSystem.venusOr bitColor"); colorButton(ui->colorMPVenusOrbit, "SolarSystem.venusOr bitColor");
colorButton(ui->colorMPEarthOrbit, "SolarSystem.earthOr bitColor"); colorButton(ui->colorMPEarthOrbit, "SolarSystem.earthOr bitColor");
colorButton(ui->colorMPMarsOrbit, "SolarSystem.marsOrb itColor"); colorButton(ui->colorMPMarsOrbit, "SolarSystem.marsOrb itColor");
colorButton(ui->colorMPJupiterOrbit, "SolarSystem.jupiter OrbitColor"); colorButton(ui->colorMPJupiterOrbit, "SolarSystem.jupiter OrbitColor");
colorButton(ui->colorMPSaturnOrbit, "SolarSystem.saturnO rbitColor"); colorButton(ui->colorMPSaturnOrbit, "SolarSystem.saturnO rbitColor");
colorButton(ui->colorMPUranusOrbit, "SolarSystem.uranusO rbitColor"); colorButton(ui->colorMPUranusOrbit, "SolarSystem.uranusO rbitColor");
colorButton(ui->colorMPNeptuneOrbit, "SolarSystem.neptune OrbitColor"); colorButton(ui->colorMPNeptuneOrbit, "SolarSystem.neptune OrbitColor");
connect(ui->colorGenericOrbits, SIGNAL(released()), this, SLOT(askGenericOrbitColor())); connect(ui->colorGenericOrbits, SIGNAL(released()), this, SLOT(askGenericOrbitColor()));
connect(ui->colorGroupsMajorPlanetsOrbits, SIGNAL(released()), this, SLOT(askMajorPlanetsGroupOrbitColor())); connect(ui->colorGroupsMajorPlanetsOrbits, SIGNAL(released()), this, SLOT(askMajorPlanetsGroupOrbitColor()));
connect(ui->colorGroupsMinorPlanetsOrbits, SIGNAL(released()), this, SLOT(askMinorPlanetsGroupOrbitColor())); connect(ui->colorGroupsMinorPlanetsOrbits, SIGNAL(released()), this, SLOT(askMinorPlanetsGroupOrbitColor()));
connect(ui->colorGroupsDwarfPlanetsOrbits, SIGNAL(released()), this, SLOT(askDwarfPlanetsGroupOrbitColor())); connect(ui->colorGroupsDwarfPlanetsOrbits, SIGNAL(released()), this, SLOT(askDwarfPlanetsGroupOrbitColor()));
connect(ui->colorGroupsMoonsOrbits, SIGNAL(released()), this, SLOT(askMoonsGroupOrbitColor())); connect(ui->colorGroupsMoonsOrbits, SIGNAL(released()), this, SLOT(askMoonsGroupOrbitColor()));
connect(ui->colorGroupsCubewanosOrbits, SIGNAL(released()), this, SLOT(askCubewanosGroupOrbitColor())); connect(ui->colorGroupsCubewanosOrbits, SIGNAL(released()), this, SLOT(askCubewanosGroupOrbitColor()));
connect(ui->colorGroupsPlutinosOrbits, SIGNAL(released()), this, SLOT(askPlutinosGroupOrbitColor())); connect(ui->colorGroupsPlutinosOrbits, SIGNAL(released()), this, SLOT(askPlutinosGroupOrbitColor()));
connect(ui->colorGroupsSDOOrbits, SIGNAL(released()), this, SLOT(askSDOGroupOrbitColor())); connect(ui->colorGroupsSDOOrbits, SIGNAL(released()), this, SLOT(askSDOGroupOrbitColor()));
connect(ui->colorGroupsOCOOrbits, SIGNAL(released()), this, SLOT(askOCOGroupOrbitColor())); connect(ui->colorGroupsOCOOrbits, SIGNAL(released()), this, SLOT(askOCOGroupOrbitColor()));
connect(ui->colorGroupsCometsOrbits, SIGNAL(released()), this, SLOT(askCometsGroupOrbitColor())); connect(ui->colorGroupsCometsOrbits, SIGNAL(released()), this, SLOT(askCometsGroupOrbitColor()));
connect(ui->colorGroupsSednoidsOrbits, SIGNAL(released()), this, SLOT(askSednoidsGroupOrbitColor()));
connect(ui->colorMPMercuryOrbit, SIGNAL(released()), this, SLOT(askMercuryOrbitColor())); connect(ui->colorMPMercuryOrbit, SIGNAL(released()), this, SLOT(askMercuryOrbitColor()));
connect(ui->colorMPVenusOrbit, SIGNAL(released()), this, SLOT(askVenusOrbitColor())); connect(ui->colorMPVenusOrbit, SIGNAL(released()), this, SLOT(askVenusOrbitColor()));
connect(ui->colorMPEarthOrbit, SIGNAL(released()), this, SLOT(askEarthOrbitColor())); connect(ui->colorMPEarthOrbit, SIGNAL(released()), this, SLOT(askEarthOrbitColor()));
connect(ui->colorMPMarsOrbit, SIGNAL(released()), this, SLOT(askMarsOrbitColor())); connect(ui->colorMPMarsOrbit, SIGNAL(released()), this, SLOT(askMarsOrbitColor()));
connect(ui->colorMPJupiterOrbit, SIGNAL(released()), this, SLOT(askJupiterOrbitColor())); connect(ui->colorMPJupiterOrbit, SIGNAL(released()), this, SLOT(askJupiterOrbitColor()));
connect(ui->colorMPSaturnOrbit, SIGNAL(released()), this, SLOT(askSaturnOrbitColor())); connect(ui->colorMPSaturnOrbit, SIGNAL(released()), this, SLOT(askSaturnOrbitColor()));
connect(ui->colorMPUranusOrbit, SIGNAL(released()), this, SLOT(askUranusOrbitColor())); connect(ui->colorMPUranusOrbit, SIGNAL(released()), this, SLOT(askUranusOrbitColor()));
connect(ui->colorMPNeptuneOrbit, SIGNAL(released()), this, SLOT(askNeptuneOrbitColor())); connect(ui->colorMPNeptuneOrbit, SIGNAL(released()), this, SLOT(askNeptuneOrbitColor()));
} }
skipping to change at line 209 skipping to change at line 210
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorGroupsCom etsOrbits->toolTip())); QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorGroupsCom etsOrbits->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(SolarSystem)->setCometsOrbitsColor(vColor); GETSTELMODULE(SolarSystem)->setCometsOrbitsColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/comet_ orbits_color", StelUtils::vec3fToStr(vColor)); StelApp::getInstance().getSettings()->setValue("color/comet_ orbits_color", StelUtils::vec3fToStr(vColor));
ui->colorGroupsCometsOrbits->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }"); ui->colorGroupsCometsOrbits->setStyleSheet("QToolButton { ba ckground-color:" + c.name() + "; }");
} }
} }
void ConfigureOrbitColorsDialog::askSednoidsGroupOrbitColor()
{
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP
roperty("SolarSystem.sednoidsOrbitsColor")->getValue().value<Vec3f>();
QColor color(0,0,0);
color.setRgbF(vColor.v[0], vColor.v[1], vColor.v[2]);
QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorGroupsSed
noidsOrbits->toolTip()));
if (c.isValid())
{
vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(SolarSystem)->setSednoidsOrbitsColor(vColor);
StelApp::getInstance().getSettings()->setValue("color/sednoi
d_orbits_color", StelUtils::vec3fToStr(vColor));
ui->colorGroupsSednoidsOrbits->setStyleSheet("QToolButton {
background-color:" + c.name() + "; }");
}
}
void ConfigureOrbitColorsDialog::askMoonsGroupOrbitColor() void ConfigureOrbitColorsDialog::askMoonsGroupOrbitColor()
{ {
Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("SolarSystem.moonsOrbitsColor")->getValue().value<Vec3f>(); Vec3f vColor = StelApp::getInstance().getStelPropertyManager()->getP roperty("SolarSystem.moonsOrbitsColor")->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->colorGroupsMoo nsOrbits->toolTip())); QColor c = QColorDialog::getColor(color, NULL, q_(ui->colorGroupsMoo nsOrbits->toolTip()));
if (c.isValid()) if (c.isValid())
{ {
vColor = Vec3f(c.redF(), c.greenF(), c.blueF()); vColor = Vec3f(c.redF(), c.greenF(), c.blueF());
GETSTELMODULE(SolarSystem)->setMoonsOrbitsColor(vColor); GETSTELMODULE(SolarSystem)->setMoonsOrbitsColor(vColor);
 End of changes. 5 change blocks. 
2 lines changed or deleted 22 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/