ArchaeoLinesDialog.cpp   ArchaeoLinesDialog.cpp 
skipping to change at line 29 skipping to change at line 29
#include "ArchaeoLines.hpp" #include "ArchaeoLines.hpp"
#include "ArchaeoLinesDialog.hpp" #include "ArchaeoLinesDialog.hpp"
#include "ui_archaeoLinesDialog.h" #include "ui_archaeoLinesDialog.h"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelModule.hpp" #include "StelModule.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelMainView.hpp" #include "StelMainView.hpp"
#include "StelOpenGL.hpp"
ArchaeoLinesDialog::ArchaeoLinesDialog() ArchaeoLinesDialog::ArchaeoLinesDialog()
: al(NULL) : al(NULL)
{ {
dialogName = "ArchaeoLines";
ui = new Ui_archaeoLinesDialog(); ui = new Ui_archaeoLinesDialog();
//colorDialog = new QColorDialog(NULL);
} }
ArchaeoLinesDialog::~ArchaeoLinesDialog() ArchaeoLinesDialog::~ArchaeoLinesDialog()
{ {
//delete colorDialog; colorDialog=NULL;
delete ui; ui=NULL; delete ui; ui=NULL;
} }
void ArchaeoLinesDialog::retranslate() void ArchaeoLinesDialog::retranslate()
{ {
if (dialog) if (dialog)
{ {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
setAboutHtml(); setAboutHtml();
} }
skipping to change at line 66 skipping to change at line 66
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
//Kinetic scrolling for tablet pc and pc //Kinetic scrolling for tablet pc and pc
QList<QWidget *> addscroll; QList<QWidget *> addscroll;
addscroll << ui->aboutTextBrowser; addscroll << ui->aboutTextBrowser;
installKineticScrolling(addscroll); installKineticScrolling(addscroll);
#endif #endif
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate())); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate()));
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)));
//ui->useDmsFormatCheckBox->setChecked(al->isDmsFormat()); connectBoolProperty(ui->equinoxCheckBox, "ArchaeoLines.flagS
//connect(ui->useDmsFormatCheckBox, SIGNAL(toggled(bool)), al, SLOT( howEquinox");
useDmsFormat(bool))); connectBoolProperty(ui->solsticesCheckBox, "ArchaeoLines.flagS
howSolstices");
ui->equinoxCheckBox->setChecked(al->isEquinoxDisplayed()); connectBoolProperty(ui->crossquarterCheckBox, "ArchaeoLines.flagS
connect(ui->equinoxCheckBox, SIGNAL(toggled(bool)), al, SLOT(showEqu howCrossquarters");
inox(bool))); connectBoolProperty(ui->majorStandstillCheckBox, "ArchaeoLines.flagS
ui->solsticesCheckBox->setChecked(al->isSolsticesDisplayed()); howMajorStandstills");
connect(ui->solsticesCheckBox, SIGNAL(toggled(bool)), al, SLOT(showS connectBoolProperty(ui->minorStandstillCheckBox, "ArchaeoLines.flagS
olstices(bool))); howMinorStandstills");
ui->crossquarterCheckBox->setChecked(al->isCrossquartersDisplayed()) connectBoolProperty(ui->zenithPassageCheckBox, "ArchaeoLines.flagS
; howZenithPassage");
connect(ui->crossquarterCheckBox, SIGNAL(toggled(bool)), al, SLOT(sh connectBoolProperty(ui->nadirPassageCheckBox, "ArchaeoLines.flagS
owCrossquarters(bool))); howNadirPassage");
ui->majorStandstillCheckBox->setChecked(al->isMajorStandstillsDispla connectBoolProperty(ui->selectedObjectCheckBox, "ArchaeoLines.flagS
yed()); howSelectedObject");
connect(ui->majorStandstillCheckBox, SIGNAL(toggled(bool)), al, SLOT connectBoolProperty(ui->currentSunCheckBox, "ArchaeoLines.flagS
(showMajorStandstills(bool))); howCurrentSun");
ui->minorStandstillCheckBox->setChecked(al->isMinorStandstillsDispla connectBoolProperty(ui->currentMoonCheckBox, "ArchaeoLines.flagS
yed()); howCurrentMoon");
connect(ui->minorStandstillCheckBox, SIGNAL(toggled(bool)), al, SLOT
(showMinorStandstills(bool)));
ui->zenithPassageCheckBox->setChecked(al->isZenithPassageDisplayed()
);
connect(ui->zenithPassageCheckBox, SIGNAL(toggled(bool)), al, SLOT(s
howZenithPassage(bool)));
ui->nadirPassageCheckBox->setChecked(al->isNadirPassageDisplayed());
connect(ui->nadirPassageCheckBox, SIGNAL(toggled(bool)), al, SLOT(sh
owNadirPassage(bool)));
ui->selectedObjectCheckBox->setChecked(al->isSelectedObjectDisplayed
());
connect(ui->selectedObjectCheckBox, SIGNAL(toggled(bool)), al, SLOT(
showSelectedObject(bool)));
ui->currentSunCheckBox->setChecked(al->isCurrentSunDisplayed());
connect(ui->currentSunCheckBox, SIGNAL(toggled(bool)), al, SLOT(show
CurrentSun(bool)));
ui->currentMoonCheckBox->setChecked(al->isCurrentMoonDisplayed());
connect(ui->currentMoonCheckBox, SIGNAL(toggled(bool)), al, SLOT(sho
wCurrentMoon(bool)));
// Planet ComboBox requires special handling! // Planet ComboBox requires special handling!
ui->currentPlanetComboBox->setCurrentIndex(al->whichCurrentPlanetDis setCurrentPlanetFromApp();
played()-ArchaeoLine::CurrentPlanetNone); //connect(al, SIGNAL(currentPlanetChanged(ArchaeoLine::Line)), this,
connect(ui->currentPlanetComboBox, SIGNAL(currentIndexChanged(int)), SLOT(setCurrentPlanetFromApp()));
this, SLOT(setCurrentPlanetFromGUI(int))); //connect(ui->currentPlanetComboBox, SIGNAL(currentIndexChanged(int)
), this, SLOT(setCurrentPlanetFromGUI(int)));
connectIntProperty(ui->currentPlanetComboBox, "ArchaeoLines.enumShow
CurrentPlanet");
connectBoolProperty(ui->geographicLocation1CheckBox,
"ArchaeoLines.flagShowGeographicLocation1");
connectBoolProperty(ui->geographicLocation2CheckBox,
"ArchaeoLines.flagShowGeographicLocation2");
connectDoubleProperty(ui->geographicLocation1LongitudeDoubleSpinBox,
"ArchaeoLines.geographicLocation1Longitude");
connectDoubleProperty(ui->geographicLocation1LatitudeDoubleSpinBox,
"ArchaeoLines.geographicLocation1Latitude");
connectDoubleProperty(ui->geographicLocation2LongitudeDoubleSpinBox,
"ArchaeoLines.geographicLocation2Longitude");
connectDoubleProperty(ui->geographicLocation2LatitudeDoubleSpinBox,
"ArchaeoLines.geographicLocation2Latitude");
ui->geographicLocation1LineEdit->setText(al->getLineLabel(ArchaeoLin
e::GeographicLocation1));
ui->geographicLocation2LineEdit->setText(al->getLineLabel(ArchaeoLin
e::GeographicLocation2));
connect(ui->geographicLocation1LineEdit, SIGNAL(textChanged(QString)
), al, SLOT(setGeographicLocation1Label(QString)));
connect(ui->geographicLocation2LineEdit, SIGNAL(textChanged(QString)
), al, SLOT(setGeographicLocation2Label(QString)));
connectBoolProperty(ui->customAzimuth1CheckBox, "ArchaeoLines
.flagShowCustomAzimuth1");
connectBoolProperty(ui->customAzimuth2CheckBox, "ArchaeoLines
.flagShowCustomAzimuth2");
connectDoubleProperty(ui->customAzimuth1DoubleSpinBox, "ArchaeoLines
.customAzimuth1");
connectDoubleProperty(ui->customAzimuth2DoubleSpinBox, "ArchaeoLines
.customAzimuth2");
ui->customAzimuth1LineEdit->setText(al->getLineLabel(ArchaeoLine::Cu
stomAzimuth1));
ui->customAzimuth2LineEdit->setText(al->getLineLabel(ArchaeoLine::Cu
stomAzimuth2));
connect(ui->customAzimuth1LineEdit, SIGNAL(textChanged(QString)), al
, SLOT(setCustomAzimuth1Label(QString)));
connect(ui->customAzimuth2LineEdit, SIGNAL(textChanged(QString)), al
, SLOT(setCustomAzimuth2Label(QString)));
{ // just to allow code folding.
equinoxColor = al->getLineColor(ArchaeoLine::Equinox); equinoxColor = al->getLineColor(ArchaeoLine::Equinox);
solsticeColor = al->getLineColor(ArchaeoLine::Solstices); solsticeColor = al->getLineColor(ArchaeoLine::Solstices);
crossquarterColor = al->getLineColor(ArchaeoLine::Crossquarters); crossquarterColor = al->getLineColor(ArchaeoLine::Crossquarters);
majorStandstillColor = al->getLineColor(ArchaeoLine::MajorStandstill ); majorStandstillColor = al->getLineColor(ArchaeoLine::MajorStandstill );
minorStandstillColor = al->getLineColor(ArchaeoLine::MinorStandstill ); minorStandstillColor = al->getLineColor(ArchaeoLine::MinorStandstill );
zenithPassageColor = al->getLineColor(ArchaeoLine::ZenithPassage); zenithPassageColor = al->getLineColor(ArchaeoLine::ZenithPassage);
nadirPassageColor = al->getLineColor(ArchaeoLine::NadirPassage); nadirPassageColor = al->getLineColor(ArchaeoLine::NadirPassage);
selectedObjectColor = al->getLineColor(ArchaeoLine::SelectedObject) ; selectedObjectColor = al->getLineColor(ArchaeoLine::SelectedObject) ;
currentSunColor = al->getLineColor(ArchaeoLine::CurrentSun); currentSunColor = al->getLineColor(ArchaeoLine::CurrentSun);
currentMoonColor = al->getLineColor(ArchaeoLine::CurrentMoon); currentMoonColor = al->getLineColor(ArchaeoLine::CurrentMoon);
currentPlanetColor = al->getLineColor(ArchaeoLine::CurrentPlanetNo ne); currentPlanetColor = al->getLineColor(ArchaeoLine::CurrentPlanetNo ne);
geographicLocation1Color = al->getLineColor(ArchaeoLine::Geographic
Location1);
geographicLocation2Color = al->getLineColor(ArchaeoLine::Geographic
Location2);
customAzimuth1Color = al->getLineColor(ArchaeoLine::CustomAzimuth1)
;
customAzimuth2Color = al->getLineColor(ArchaeoLine::CustomAzimuth2)
;
equinoxColorPixmap=QPixmap(48, 12); equinoxColorPixmap=QPixmap(48, 12);
equinoxColorPixmap.fill(equinoxColor); equinoxColorPixmap.fill(equinoxColor);
ui->equinoxColorToolButton->setIconSize(QSize(48, 12)); ui->equinoxColorToolButton->setIconSize(QSize(48, 12));
ui->equinoxColorToolButton->setIcon(QIcon(equinoxColorPixmap)); ui->equinoxColorToolButton->setIcon(QIcon(equinoxColorPixmap));
solsticeColorPixmap=QPixmap(48, 12); solsticeColorPixmap=QPixmap(48, 12);
solsticeColorPixmap.fill(solsticeColor); solsticeColorPixmap.fill(solsticeColor);
ui->solsticesColorToolButton->setIconSize(QSize(48, 12)); ui->solsticesColorToolButton->setIconSize(QSize(48, 12));
ui->solsticesColorToolButton->setIcon(QIcon(solsticeColorPixmap)); ui->solsticesColorToolButton->setIcon(QIcon(solsticeColorPixmap));
crossquarterColorPixmap=QPixmap(48, 12); crossquarterColorPixmap=QPixmap(48, 12);
crossquarterColorPixmap.fill(crossquarterColor); crossquarterColorPixmap.fill(crossquarterColor);
skipping to change at line 149 skipping to change at line 164
ui->currentSunColorToolButton->setIconSize(QSize(48, 12)); ui->currentSunColorToolButton->setIconSize(QSize(48, 12));
ui->currentSunColorToolButton->setIcon(QIcon(currentSunColorPixmap)) ; ui->currentSunColorToolButton->setIcon(QIcon(currentSunColorPixmap)) ;
currentMoonColorPixmap=QPixmap(48, 12); currentMoonColorPixmap=QPixmap(48, 12);
currentMoonColorPixmap.fill(currentMoonColor); currentMoonColorPixmap.fill(currentMoonColor);
ui->currentMoonColorToolButton->setIconSize(QSize(48, 12)); ui->currentMoonColorToolButton->setIconSize(QSize(48, 12));
ui->currentMoonColorToolButton->setIcon(QIcon(currentMoonColorPixmap )); ui->currentMoonColorToolButton->setIcon(QIcon(currentMoonColorPixmap ));
currentPlanetColorPixmap=QPixmap(48, 12); currentPlanetColorPixmap=QPixmap(48, 12);
currentPlanetColorPixmap.fill(currentPlanetColor); currentPlanetColorPixmap.fill(currentPlanetColor);
ui->currentPlanetColorToolButton->setIconSize(QSize(48, 12)); ui->currentPlanetColorToolButton->setIconSize(QSize(48, 12));
ui->currentPlanetColorToolButton->setIcon(QIcon(currentPlanetColorPi xmap)); ui->currentPlanetColorToolButton->setIcon(QIcon(currentPlanetColorPi xmap));
geographicLocation1ColorPixmap=QPixmap(48, 12);
connect(ui->equinoxColorToolButton, SIGNAL(released()), this geographicLocation1ColorPixmap.fill(geographicLocation1Color);
, SLOT(askEquinoxColor())); ui->geographicLocation1ColorToolButton->setIconSize(QSize(48, 12));
connect(ui->solsticesColorToolButton, SIGNAL(released()), this ui->geographicLocation1ColorToolButton->setIcon(QIcon(geographicLoca
, SLOT(askSolsticeColor())); tion1ColorPixmap));
connect(ui->crossquarterColorToolButton, SIGNAL(released()), this geographicLocation2ColorPixmap=QPixmap(48, 12);
, SLOT(askCrossquarterColor())); geographicLocation2ColorPixmap.fill(geographicLocation2Color);
connect(ui->majorStandstillColorToolButton, SIGNAL(released()), this ui->geographicLocation2ColorToolButton->setIconSize(QSize(48, 12));
, SLOT(askMajorStandstillColor())); ui->geographicLocation2ColorToolButton->setIcon(QIcon(geographicLoca
connect(ui->minorStandstillColorToolButton, SIGNAL(released()), this tion2ColorPixmap));
, SLOT(askMinorStandstillColor())); customAzimuth1ColorPixmap=QPixmap(48, 12);
connect(ui->zenithPassageColorToolButton, SIGNAL(released()), this customAzimuth1ColorPixmap.fill(customAzimuth1Color);
, SLOT(askZenithPassageColor())); ui->customAzimuth1ColorToolButton->setIconSize(QSize(48, 12));
connect(ui->nadirPassageColorToolButton, SIGNAL(released()), this ui->customAzimuth1ColorToolButton->setIcon(QIcon(customAzimuth1Color
, SLOT(askNadirPassageColor())); Pixmap));
connect(ui->selectedObjectColorToolButton, SIGNAL(released()), this customAzimuth2ColorPixmap=QPixmap(48, 12);
, SLOT(askSelectedObjectColor())); customAzimuth2ColorPixmap.fill(customAzimuth2Color);
connect(ui->currentSunColorToolButton, SIGNAL(released()), this ui->customAzimuth2ColorToolButton->setIconSize(QSize(48, 12));
, SLOT(askCurrentSunColor())); ui->customAzimuth2ColorToolButton->setIcon(QIcon(customAzimuth2Color
connect(ui->currentMoonColorToolButton, SIGNAL(released()), this Pixmap));
, SLOT(askCurrentMoonColor())); }
connect(ui->currentPlanetColorToolButton, SIGNAL(released()), this
, SLOT(askCurrentPlanetColor())); connect(ui->equinoxColorToolButton, SIGNAL(released()),
this, SLOT(askEquinoxColor()));
connect(ui->solsticesColorToolButton, SIGNAL(released()),
this, SLOT(askSolsticeColor()));
connect(ui->crossquarterColorToolButton, SIGNAL(released()),
this, SLOT(askCrossquarterColor()));
connect(ui->majorStandstillColorToolButton, SIGNAL(released()),
this, SLOT(askMajorStandstillColor()));
connect(ui->minorStandstillColorToolButton, SIGNAL(released()),
this, SLOT(askMinorStandstillColor()));
connect(ui->zenithPassageColorToolButton, SIGNAL(released()),
this, SLOT(askZenithPassageColor()));
connect(ui->nadirPassageColorToolButton, SIGNAL(released()),
this, SLOT(askNadirPassageColor()));
connect(ui->selectedObjectColorToolButton, SIGNAL(released()),
this, SLOT(askSelectedObjectColor()));
connect(ui->currentSunColorToolButton, SIGNAL(released()),
this, SLOT(askCurrentSunColor()));
connect(ui->currentMoonColorToolButton, SIGNAL(released()),
this, SLOT(askCurrentMoonColor()));
connect(ui->currentPlanetColorToolButton, SIGNAL(released()),
this, SLOT(askCurrentPlanetColor()));
connect(ui->geographicLocation1ColorToolButton, SIGNAL(released()),
this, SLOT(askGeographicLocation1Color()));
connect(ui->geographicLocation2ColorToolButton, SIGNAL(released()),
this, SLOT(askGeographicLocation2Color()));
connect(ui->customAzimuth1ColorToolButton, SIGNAL(released()),
this, SLOT(askCustomAzimuth1Color()));
connect(ui->customAzimuth2ColorToolButton, SIGNAL(released()),
this, SLOT(askCustomAzimuth2Color()));
connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(res etArchaeoLinesSettings())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(res etArchaeoLinesSettings()));
ui->formatDisplayBox->hide(); // We must apparently warn about a potential problem, but only on Wi
// We must apparently warn about a potential problem, but only on Wi ndows in OpenGL mode. (QTBUG-35302?)
ndows. (QTBUG-35302)
#ifndef Q_OS_WIN #ifndef Q_OS_WIN
ui->switchToWindowedModeLabel->hide(); ui->switchToWindowedModeLabel->hide();
#else
QString glRenderer(reinterpret_cast<const char*>(glGetString(GL_REND
ERER)));
if (glRenderer.startsWith("ANGLE", Qt::CaseSensitive))
ui->switchToWindowedModeLabel->hide();
#endif #endif
setAboutHtml(); setAboutHtml();
} }
void ArchaeoLinesDialog::setCurrentPlanetFromGUI(int index) void ArchaeoLinesDialog::setCurrentPlanetFromGUI(int index)
{ {
Q_ASSERT(al); Q_ASSERT(al);
al->showCurrentPlanet((ArchaeoLine::Line) (ArchaeoLine::CurrentPlane tNone+index)); al->showCurrentPlanet((ArchaeoLine::Line) (ArchaeoLine::CurrentPlane tNone+index));
} }
void ArchaeoLinesDialog::setCurrentPlanetFromApp()
{
Q_ASSERT(al);
ui->currentPlanetComboBox->setCurrentIndex(al->whichCurrentPlanetDis
played()-ArchaeoLine::CurrentPlanetNone);
}
void ArchaeoLinesDialog::setAboutHtml(void) void ArchaeoLinesDialog::setAboutHtml(void)
{ {
QString html = "<html><head></head><body>"; QString html = "<html><head></head><body>";
html += "<h2>" + q_("ArchaeoLines Plug-in") + "</h2><table width=\"9 0%\">"; html += "<h2>" + q_("ArchaeoLines Plug-in") + "</h2><table width=\"9 0%\">";
html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</stron g></td><td>" + ARCHAEOLINES_VERSION + "</td></tr>"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</stron g></td><td>" + ARCHAEOLINES_VERSION + "</td></tr>";
html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Geor g Zotti</td></tr>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Geor g Zotti</td></tr>";
//html += "<tr><td><strong>" + q_("Contributors") + ":</strong></td> <td> List with br separators </td></tr>"; //html += "<tr><td><strong>" + q_("Contributors") + ":</strong></td> <td> List with br separators </td></tr>";
html += "</table>"; html += "</table>";
html += "<p>" + q_("The ArchaeoLines plugin displays any combination of declination arcs most relevant to archaeo- or ethnoastronomical studies .") + "</p>"; html += "<p>" + q_("The ArchaeoLines plugin displays any combination of declination arcs most relevant to archaeo- or ethnoastronomical studies .") + "</p>";
skipping to change at line 202 skipping to change at line 247
html += "<li>" + q_("Declination of the Zenith passage") + "</li>"; html += "<li>" + q_("Declination of the Zenith passage") + "</li>";
html += "<li>" + q_("Declination of the Nadir passage") + "</li>"; html += "<li>" + q_("Declination of the Nadir passage") + "</li>";
html += "<li>" + q_("Declination of the currently selected object") + "</li>"; html += "<li>" + q_("Declination of the currently selected object") + "</li>";
html += "<li>" + q_("Current declination of the sun") + "</li>"; html += "<li>" + q_("Current declination of the sun") + "</li>";
html += "<li>" + q_("Current declination of the moon") + "</li>"; html += "<li>" + q_("Current declination of the moon") + "</li>";
html += "<li>" + q_("Current declination of a naked-eye planet") + " </li></ul>"; html += "<li>" + q_("Current declination of a naked-eye planet") + " </li></ul>";
html += "<p>" + q_("The lunar lines include horizon parallax effects . " html += "<p>" + q_("The lunar lines include horizon parallax effects . "
"There are two lines each drawn, for maximum and minimum distance of the moon. " "There are two lines each drawn, for maximum and minimum distance of the moon. "
"Note that declination of the moon at the major s tandstill can exceed the " "Note that declination of the moon at the major s tandstill can exceed the "
"indicated limits if it is high in the sky due to parallax effects.") + "</p>"; "indicated limits if it is high in the sky due to parallax effects.") + "</p>";
html += "<p>" + q_("Some religions, most notably Islam, adhere to a
practice of observing a prayer direction towards a particular location. "
"Azimuth lines for two locations can be shown. De
fault locations are Mecca (Kaaba) and Jerusalem. "
"The directions are computed based on spherical t
rigonometry on a spherical Earth.") + "</p>";
html += "<p>" + q_("In addition, up to two vertical lines with arbit
rary azimuth and custom label can be shown.") + "</p>";
html += "<h3>" + q_("Links") + "</h3>"; html += "<h3>" + q_("Links") + "</h3>";
html += "<p>" + QString(q_("Support is provided via the Launchpad we bsite. Be sure to put \"%1\" in the subject when posting.")).arg("ArchaeoL ines plugin") + "</p>"; html += "<p>" + QString(q_("Support is provided via the Launchpad we bsite. Be sure to put \"%1\" in the subject when posting.")).arg("ArchaeoL ines plugin") + "</p>";
html += "<p><ul>"; html += "<p><ul>";
// TRANSLATORS: The numbers contain the opening and closing tag of a n HTML link // TRANSLATORS: The numbers contain the opening and closing tag of a n HTML link
html += "<li>" + QString(q_("If you have a question, you can %1get a n answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\" >")).arg("</a>") + "</li>"; html += "<li>" + QString(q_("If you have a question, you can %1get a n answer here%2").arg("<a href=\"https://answers.launchpad.net/stellarium\" >")).arg("</a>") + "</li>";
// TRANSLATORS: The numbers contain the opening and closing tag of a n HTML link // TRANSLATORS: The numbers contain the opening and closing tag of a n HTML link
html += "<li>" + QString(q_("Bug reports can be made %1here%2.")).ar g("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li >"; html += "<li>" + QString(q_("Bug reports can be made %1here%2.")).ar g("<a href=\"https://bugs.launchpad.net/stellarium\">").arg("</a>") + "</li >";
// TRANSLATORS: The numbers contain the opening and closing tag of a n HTML link // TRANSLATORS: The numbers contain the opening and closing tag of a n HTML link
html += "<li>" + q_("If you would like to make a feature request, yo u can create a bug report, and set the severity to \"wishlist\".") + "</li> "; html += "<li>" + q_("If you would like to make a feature request, yo u can create a bug report, and set the severity to \"wishlist\".") + "</li> ";
skipping to change at line 240 skipping to change at line 289
solsticeColor = al->getLineColor(ArchaeoLine::Solstices); solsticeColor = al->getLineColor(ArchaeoLine::Solstices);
crossquarterColor = al->getLineColor(ArchaeoLine::Crossquarters); crossquarterColor = al->getLineColor(ArchaeoLine::Crossquarters);
majorStandstillColor = al->getLineColor(ArchaeoLine::MajorStandstill ); majorStandstillColor = al->getLineColor(ArchaeoLine::MajorStandstill );
minorStandstillColor = al->getLineColor(ArchaeoLine::MinorStandstill ); minorStandstillColor = al->getLineColor(ArchaeoLine::MinorStandstill );
zenithPassageColor = al->getLineColor(ArchaeoLine::ZenithPassage); zenithPassageColor = al->getLineColor(ArchaeoLine::ZenithPassage);
nadirPassageColor = al->getLineColor(ArchaeoLine::NadirPassage); nadirPassageColor = al->getLineColor(ArchaeoLine::NadirPassage);
selectedObjectColor = al->getLineColor(ArchaeoLine::SelectedObject) ; selectedObjectColor = al->getLineColor(ArchaeoLine::SelectedObject) ;
currentSunColor = al->getLineColor(ArchaeoLine::CurrentSun); currentSunColor = al->getLineColor(ArchaeoLine::CurrentSun);
currentMoonColor = al->getLineColor(ArchaeoLine::CurrentMoon); currentMoonColor = al->getLineColor(ArchaeoLine::CurrentMoon);
currentPlanetColor = al->getLineColor(ArchaeoLine::CurrentPlanetNo ne); currentPlanetColor = al->getLineColor(ArchaeoLine::CurrentPlanetNo ne);
geographicLocation1Color = al->getLineColor(ArchaeoLine::Geographic
Location1);
geographicLocation2Color = al->getLineColor(ArchaeoLine::Geographic
Location2);
customAzimuth1Color = al->getLineColor(ArchaeoLine::CustomAzimuth1)
;
customAzimuth2Color = al->getLineColor(ArchaeoLine::CustomAzimuth2)
;
equinoxColorPixmap.fill(equinoxColor); equinoxColorPixmap.fill(equinoxColor);
ui->equinoxColorToolButton->setIcon(QIcon(equinoxColorPixmap)); ui->equinoxColorToolButton->setIcon(QIcon(equinoxColorPixmap));
solsticeColorPixmap.fill(solsticeColor); solsticeColorPixmap.fill(solsticeColor);
ui->solsticesColorToolButton->setIcon(QIcon(solsticeColorPixmap)); ui->solsticesColorToolButton->setIcon(QIcon(solsticeColorPixmap));
crossquarterColorPixmap.fill(crossquarterColor); crossquarterColorPixmap.fill(crossquarterColor);
ui->crossquarterColorToolButton->setIcon(QIcon(crossquarterColorPixm ap)); ui->crossquarterColorToolButton->setIcon(QIcon(crossquarterColorPixm ap));
minorStandstillColorPixmap.fill(minorStandstillColor); minorStandstillColorPixmap.fill(minorStandstillColor);
ui->minorStandstillColorToolButton->setIcon(QIcon(minorStandstillCol orPixmap)); ui->minorStandstillColorToolButton->setIcon(QIcon(minorStandstillCol orPixmap));
majorStandstillColorPixmap.fill(majorStandstillColor); majorStandstillColorPixmap.fill(majorStandstillColor);
ui->majorStandstillColorToolButton->setIcon(QIcon(majorStandstillCol orPixmap)); ui->majorStandstillColorToolButton->setIcon(QIcon(majorStandstillCol orPixmap));
skipping to change at line 262 skipping to change at line 315
nadirPassageColorPixmap.fill(nadirPassageColor); nadirPassageColorPixmap.fill(nadirPassageColor);
ui->nadirPassageColorToolButton->setIcon(QIcon(nadirPassageColorPixm ap)); ui->nadirPassageColorToolButton->setIcon(QIcon(nadirPassageColorPixm ap));
selectedObjectColorPixmap.fill(selectedObjectColor); selectedObjectColorPixmap.fill(selectedObjectColor);
ui->selectedObjectColorToolButton->setIcon(QIcon(selectedObjectColor Pixmap)); ui->selectedObjectColorToolButton->setIcon(QIcon(selectedObjectColor Pixmap));
currentSunColorPixmap.fill(currentSunColor); currentSunColorPixmap.fill(currentSunColor);
ui->currentSunColorToolButton->setIcon(QIcon(currentSunColorPixmap)) ; ui->currentSunColorToolButton->setIcon(QIcon(currentSunColorPixmap)) ;
currentMoonColorPixmap.fill(currentMoonColor); currentMoonColorPixmap.fill(currentMoonColor);
ui->currentMoonColorToolButton->setIcon(QIcon(currentMoonColorPixmap )); ui->currentMoonColorToolButton->setIcon(QIcon(currentMoonColorPixmap ));
currentPlanetColorPixmap.fill(currentPlanetColor); currentPlanetColorPixmap.fill(currentPlanetColor);
ui->currentPlanetColorToolButton->setIcon(QIcon(currentPlanetColorPi xmap)); ui->currentPlanetColorToolButton->setIcon(QIcon(currentPlanetColorPi xmap));
geographicLocation1ColorPixmap.fill(geographicLocation1Color);
ui->equinoxCheckBox->setChecked(al->isEquinoxDisplayed()); ui->geographicLocation1ColorToolButton->setIcon(QIcon(geographicLoca
ui->solsticesCheckBox->setChecked(al->isSolsticesDisplayed()); tion1ColorPixmap));
ui->crossquarterCheckBox->setChecked(al->isCrossquartersDisplayed()) geographicLocation2ColorPixmap.fill(geographicLocation2Color);
; ui->geographicLocation2ColorToolButton->setIcon(QIcon(geographicLoca
ui->majorStandstillCheckBox->setChecked(al->isMajorStandstillsDispla tion2ColorPixmap));
yed()); customAzimuth1ColorPixmap.fill(customAzimuth1Color);
ui->minorStandstillCheckBox->setChecked(al->isMinorStandstillsDispla ui->customAzimuth1ColorToolButton->setIcon(QIcon(customAzimuth1Color
yed()); Pixmap));
ui->zenithPassageCheckBox->setChecked(al->isZenithPassageDisplayed() customAzimuth2ColorPixmap.fill(customAzimuth2Color);
); ui->customAzimuth2ColorToolButton->setIcon(QIcon(customAzimuth2Color
ui->nadirPassageCheckBox->setChecked(al->isNadirPassageDisplayed()); Pixmap));
ui->selectedObjectCheckBox->setChecked(al->isSelectedObjectDisplayed
()); // These should no longer be required due to property connections.
ui->currentSunCheckBox->setChecked(al->isCurrentSunDisplayed()); // ui->equinoxCheckBox->setChecked(al->isEquinoxDisplayed());
ui->currentMoonCheckBox->setChecked(al->isCurrentMoonDisplayed()); // ui->solsticesCheckBox->setChecked(al->isSolsticesDisplayed());
ui->currentPlanetComboBox->setCurrentIndex(al->whichCurrentPlanetDis // ui->crossquarterCheckBox->setChecked(al->isCrossquartersDisplayed())
played()-ArchaeoLine::CurrentPlanetNone); ;
// ui->majorStandstillCheckBox->setChecked(al->isMajorStandstillsDispla
yed());
// ui->minorStandstillCheckBox->setChecked(al->isMinorStandstillsDispla
yed());
// ui->zenithPassageCheckBox->setChecked(al->isZenithPassageDisplayed()
);
// ui->nadirPassageCheckBox->setChecked(al->isNadirPassageDisplayed());
// ui->selectedObjectCheckBox->setChecked(al->isSelectedObjectDisplayed
());
// ui->currentSunCheckBox->setChecked(al->isCurrentSunDisplayed());
// ui->currentMoonCheckBox->setChecked(al->isCurrentMoonDisplayed());
// ui->currentPlanetComboBox->setCurrentIndex(al->whichCurrentPlanetDis
played()-ArchaeoLine::CurrentPlanetNone);
// ui->geographicLocation1CheckBox->setChecked(al->isGeographicLocation
1Displayed());
// ui->geographicLocation2CheckBox->setChecked(al->isGeographicLocation
2Displayed());
// ui->customAzimuth1CheckBox->setChecked(al->isCustomAzimuth1Displayed
());
// ui->customAzimuth2CheckBox->setChecked(al->isCustomAzimuth2Displayed
());
// ui->geographicLocation1LongitudeDoubleSpinBox->setValue(al->getGeogr
aphicLocation1Longitude());
// ui->geographicLocation1LatitudeDoubleSpinBox->setValue(al->getGeogra
phicLocation1Latitude());
// ui->geographicLocation2LongitudeDoubleSpinBox->setValue(al->getGeogr
aphicLocation2Longitude());
// ui->geographicLocation2LatitudeDoubleSpinBox->setValue(al->getGeogra
phicLocation2Latitude());
ui->geographicLocation1LineEdit->setText(al->getLineLabel(ArchaeoLin
e::GeographicLocation1));
ui->geographicLocation2LineEdit->setText(al->getLineLabel(ArchaeoLin
e::GeographicLocation2));
ui->customAzimuth1LineEdit->setText(al->getLineLabel(ArchaeoLine::Cu
stomAzimuth1));
ui->customAzimuth2LineEdit->setText(al->getLineLabel(ArchaeoLine::Cu
stomAzimuth2));
} }
// These are called by the respective buttons. // These are called by the respective buttons.
void ArchaeoLinesDialog::askEquinoxColor() void ArchaeoLinesDialog::askEquinoxColor()
{ {
QColor c=QColorDialog::getColor(equinoxColor, NULL, q_("Select color for equinox line")); QColor c=QColorDialog::getColor(equinoxColor, NULL, q_("Select color for equinox line"));
if (c.isValid()) if (c.isValid())
{ {
equinoxColor=c; equinoxColor=c;
al->setLineColor(ArchaeoLine::Equinox, c); al->setLineColor(ArchaeoLine::Equinox, c);
equinoxColorPixmap.fill(c); equinoxColorPixmap.fill(c);
ui->equinoxColorToolButton->setIcon(QIcon(equinoxColorPixmap )); ui->equinoxColorToolButton->setIcon(QIcon(equinoxColorPixmap ));
} }
} }
void ArchaeoLinesDialog::askSolsticeColor() void ArchaeoLinesDialog::askSolsticeColor()
{ {
QColor c=QColorDialog::getColor(solsticeColor, NULL, q_("Select colo r for solstice lines")); QColor c=QColorDialog::getColor(solsticeColor, NULL, q_("Select colo r for solstice lines"));
if (c.isValid()) if (c.isValid())
{ {
solsticeColor=c; solsticeColor=c;
al->setLineColor(ArchaeoLine::Solstices, c); al->setLineColor(ArchaeoLine::Solstices, c);
solsticeColorPixmap.fill(c); solsticeColorPixmap.fill(c);
ui->solsticesColorToolButton->setIcon(QIcon(solsticeColorPix map)); ui->solsticesColorToolButton->setIcon(QIcon(solsticeColorPix map));
} }
} }
void ArchaeoLinesDialog::askCrossquarterColor() void ArchaeoLinesDialog::askCrossquarterColor()
{ {
QColor c=QColorDialog::getColor(crossquarterColor, NULL, q_("Select color for crossquarter lines")); QColor c=QColorDialog::getColor(crossquarterColor, NULL, q_("Select color for crossquarter lines"));
if (c.isValid()) if (c.isValid())
{ {
crossquarterColor=c; crossquarterColor=c;
al->setLineColor(ArchaeoLine::Crossquarters, c); al->setLineColor(ArchaeoLine::Crossquarters, c);
crossquarterColorPixmap.fill(c); crossquarterColorPixmap.fill(c);
ui->crossquarterColorToolButton->setIcon(QIcon(crossquarterC olorPixmap)); ui->crossquarterColorToolButton->setIcon(QIcon(crossquarterC olorPixmap));
} }
} }
void ArchaeoLinesDialog::askMajorStandstillColor() void ArchaeoLinesDialog::askMajorStandstillColor()
{ {
QColor c=QColorDialog::getColor(majorStandstillColor, NULL, q_("Sele ct color for major standstill lines")); QColor c=QColorDialog::getColor(majorStandstillColor, NULL, q_("Sele ct color for major standstill lines"));
if (c.isValid()) if (c.isValid())
{ {
majorStandstillColor=c; majorStandstillColor=c;
al->setLineColor(ArchaeoLine::MajorStandstill, c); al->setLineColor(ArchaeoLine::MajorStandstill, c);
majorStandstillColorPixmap.fill(c); majorStandstillColorPixmap.fill(c);
ui->majorStandstillColorToolButton->setIcon(QIcon(majorStand stillColorPixmap)); ui->majorStandstillColorToolButton->setIcon(QIcon(majorStand stillColorPixmap));
} }
} }
void ArchaeoLinesDialog::askMinorStandstillColor() void ArchaeoLinesDialog::askMinorStandstillColor()
{ {
QColor c=QColorDialog::getColor(minorStandstillColor, NULL, q_("Sele ct color for minor standstill lines")); QColor c=QColorDialog::getColor(minorStandstillColor, NULL, q_("Sele ct color for minor standstill lines"));
if (c.isValid()) if (c.isValid())
{ {
minorStandstillColor=c; minorStandstillColor=c;
al->setLineColor(ArchaeoLine::MinorStandstill, c); al->setLineColor(ArchaeoLine::MinorStandstill, c);
minorStandstillColorPixmap.fill(c); minorStandstillColorPixmap.fill(c);
ui->minorStandstillColorToolButton->setIcon(QIcon(minorStand stillColorPixmap)); ui->minorStandstillColorToolButton->setIcon(QIcon(minorStand stillColorPixmap));
} }
} }
void ArchaeoLinesDialog::askZenithPassageColor() void ArchaeoLinesDialog::askZenithPassageColor()
{ {
QColor c=QColorDialog::getColor(zenithPassageColor, NULL, q_("Select color for zenith passage line")); QColor c=QColorDialog::getColor(zenithPassageColor, NULL, q_("Select color for zenith passage line"));
if (c.isValid()) if (c.isValid())
{ {
zenithPassageColor=c; zenithPassageColor=c;
al->setLineColor(ArchaeoLine::ZenithPassage, c); al->setLineColor(ArchaeoLine::ZenithPassage, c);
zenithPassageColorPixmap.fill(c); zenithPassageColorPixmap.fill(c);
ui->zenithPassageColorToolButton->setIcon(QIcon(zenithPassag eColorPixmap)); ui->zenithPassageColorToolButton->setIcon(QIcon(zenithPassag eColorPixmap));
} }
} }
void ArchaeoLinesDialog::askNadirPassageColor() void ArchaeoLinesDialog::askNadirPassageColor()
{ {
QColor c=QColorDialog::getColor(nadirPassageColor, NULL, q_("Select color for nadir passage line")); QColor c=QColorDialog::getColor(nadirPassageColor, NULL, q_("Select color for nadir passage line"));
if (c.isValid()) if (c.isValid())
{ {
nadirPassageColor=c; nadirPassageColor=c;
al->setLineColor(ArchaeoLine::NadirPassage, c); al->setLineColor(ArchaeoLine::NadirPassage, c);
nadirPassageColorPixmap.fill(c); nadirPassageColorPixmap.fill(c);
ui->nadirPassageColorToolButton->setIcon(QIcon(nadirPassageC olorPixmap)); ui->nadirPassageColorToolButton->setIcon(QIcon(nadirPassageC olorPixmap));
} }
} }
void ArchaeoLinesDialog::askSelectedObjectColor() void ArchaeoLinesDialog::askSelectedObjectColor()
{ {
QColor c=QColorDialog::getColor(selectedObjectColor, NULL, q_("Selec t color for selected object line")); QColor c=QColorDialog::getColor(selectedObjectColor, NULL, q_("Selec t color for selected object line"));
if (c.isValid()) if (c.isValid())
{ {
selectedObjectColor=c; selectedObjectColor=c;
al->setLineColor(ArchaeoLine::SelectedObject, c); al->setLineColor(ArchaeoLine::SelectedObject, c);
selectedObjectColorPixmap.fill(c); selectedObjectColorPixmap.fill(c);
ui->selectedObjectColorToolButton->setIcon(QIcon(selectedObj ectColorPixmap)); ui->selectedObjectColorToolButton->setIcon(QIcon(selectedObj ectColorPixmap));
} }
} }
void ArchaeoLinesDialog::askCurrentSunColor() void ArchaeoLinesDialog::askCurrentSunColor()
{ {
QColor c=QColorDialog::getColor(currentSunColor, NULL, q_("Select co lor for current sun line")); QColor c=QColorDialog::getColor(currentSunColor, NULL, q_("Select co lor for current sun line"));
if (c.isValid()) if (c.isValid())
{ {
currentSunColor=c; currentSunColor=c;
al->setLineColor(ArchaeoLine::CurrentSun, c); al->setLineColor(ArchaeoLine::CurrentSun, c);
currentSunColorPixmap.fill(c); currentSunColorPixmap.fill(c);
ui->currentSunColorToolButton->setIcon(QIcon(currentSunColor Pixmap)); ui->currentSunColorToolButton->setIcon(QIcon(currentSunColor Pixmap));
} }
} }
void ArchaeoLinesDialog::askCurrentMoonColor() void ArchaeoLinesDialog::askCurrentMoonColor()
{ {
QColor c=QColorDialog::getColor(currentMoonColor, NULL, q_("Select c olor for current moon line")); QColor c=QColorDialog::getColor(currentMoonColor, NULL, q_("Select c olor for current moon line"));
if (c.isValid()) if (c.isValid())
{ {
currentMoonColor=c; currentMoonColor=c;
al->setLineColor(ArchaeoLine::CurrentMoon, c); al->setLineColor(ArchaeoLine::CurrentMoon, c);
currentMoonColorPixmap.fill(c); currentMoonColorPixmap.fill(c);
ui->currentMoonColorToolButton->setIcon(QIcon(currentMoonCol orPixmap)); ui->currentMoonColorToolButton->setIcon(QIcon(currentMoonCol orPixmap));
} }
} }
void ArchaeoLinesDialog::askCurrentPlanetColor() void ArchaeoLinesDialog::askCurrentPlanetColor()
{ {
QColor c=QColorDialog::getColor(currentPlanetColor, NULL, q_("Select color for current planet line")); QColor c=QColorDialog::getColor(currentPlanetColor, NULL, q_("Select color for current planet line"));
if (c.isValid()) if (c.isValid())
{ {
currentPlanetColor=c; currentPlanetColor=c;
al->setLineColor(ArchaeoLine::CurrentPlanetNone, c); al->setLineColor(ArchaeoLine::CurrentPlanetNone, c);
currentPlanetColorPixmap.fill(c); currentPlanetColorPixmap.fill(c);
ui->currentPlanetColorToolButton->setIcon(QIcon(currentPlane tColorPixmap)); ui->currentPlanetColorToolButton->setIcon(QIcon(currentPlane tColorPixmap));
} }
} }
void ArchaeoLinesDialog::askGeographicLocation1Color()
{
QColor c=QColorDialog::getColor(geographicLocation1Color, NULL, q_("
Select color for Geographic Location 1 line"));
if (c.isValid())
{
geographicLocation1Color=c;
al->setLineColor(ArchaeoLine::GeographicLocation1, c);
geographicLocation1ColorPixmap.fill(c);
ui->geographicLocation1ColorToolButton->setIcon(QIcon(geogra
phicLocation1ColorPixmap));
}
}
void ArchaeoLinesDialog::askGeographicLocation2Color()
{
QColor c=QColorDialog::getColor(geographicLocation2Color, NULL, q_("
Select color for Geographic Location 2 line"));
if (c.isValid())
{
geographicLocation2Color=c;
al->setLineColor(ArchaeoLine::GeographicLocation2, c);
geographicLocation2ColorPixmap.fill(c);
ui->geographicLocation2ColorToolButton->setIcon(QIcon(geogra
phicLocation2ColorPixmap));
}
}
void ArchaeoLinesDialog::askCustomAzimuth1Color()
{
QColor c=QColorDialog::getColor(customAzimuth1Color, NULL, q_("Selec
t color for Custom Azimuth 1 line"));
if (c.isValid())
{
customAzimuth1Color=c;
al->setLineColor(ArchaeoLine::CustomAzimuth1, c);
customAzimuth1ColorPixmap.fill(c);
ui->customAzimuth1ColorToolButton->setIcon(QIcon(customAzimu
th1ColorPixmap));
}
}
void ArchaeoLinesDialog::askCustomAzimuth2Color()
{
QColor c=QColorDialog::getColor(customAzimuth2Color, NULL, q_("Selec
t color for Custom Azimuth 2 line"));
if (c.isValid())
{
customAzimuth2Color=c;
al->setLineColor(ArchaeoLine::CustomAzimuth2, c);
customAzimuth2ColorPixmap.fill(c);
ui->customAzimuth2ColorToolButton->setIcon(QIcon(customAzimu
th2ColorPixmap));
}
}
// Notes/Observations by GZ in 2015-04 with Qt5.4.0/MinGW on Windows7SP1. // Notes/Observations by GZ in 2015-04 with Qt5.4.0/MinGW on Windows7SP1.
// (1) There are issues in calling the QColorPanel that seem to be related to QTBUG-35302, // (1) There are issues in calling the QColorPanel that seem to be related to QTBUG-35302,
// although it was reportedly fixed at least for X11 in Qt5.3.0. // although it was reportedly fixed at least for X11 in Qt5.3.0.
// On Win7 with NVidia Geforce and Win8.1 on Radeon, the color panel hides behind the Stellarium main window if set to fullscreen. // On Win7 with NVidia Geforce and Win8.1 on Radeon, the color panel hides behind the Stellarium main window if set to fullscreen.
// On Win7 with Intel HD4600, and various Linuces, no problem is seen, the color panel is right on top of the fullscreen main window. // On Win7 with Intel HD4600, and various Linuces, no problem is seen, the color panel is right on top of the fullscreen main window.
// It seems not to depend on MinGW vs. MSVC builds, but on details in GPU d rivers and Qt. // It seems not to depend on MinGW vs. MSVC builds, but on details in GPU d rivers and Qt.
// (2) Likely another bug in QColorDialog: If you choose one of the preconf igured colors (left half), // (2) Likely another bug in QColorDialog: If you choose one of the preconf igured colors (left half),
// on next change of that color it will have toggled one high bit of one co mponent. // on next change of that color it will have toggled one high bit of one co mponent.
 End of changes. 27 change blocks. 
99 lines changed or deleted 267 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/