ExoplanetsDialog.cpp   ExoplanetsDialog.cpp 
skipping to change at line 45 skipping to change at line 45
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelMainView.hpp" #include "StelMainView.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "external/qcustomplot/qcustomplot.h" #include "external/qcustomplot/qcustomplot.h"
ExoplanetsDialog::ExoplanetsDialog() ExoplanetsDialog::ExoplanetsDialog()
: StelDialog("Exoplanets") : StelDialog("Exoplanets")
, ep(NULL) , ep(Q_NULLPTR)
, updateTimer(NULL) , updateTimer(Q_NULLPTR)
{ {
ui = new Ui_exoplanetsDialog; ui = new Ui_exoplanetsDialog;
} }
ExoplanetsDialog::~ExoplanetsDialog() ExoplanetsDialog::~ExoplanetsDialog()
{ {
if (updateTimer) if (updateTimer)
{ {
updateTimer->stop(); updateTimer->stop();
delete updateTimer; delete updateTimer;
updateTimer = NULL; updateTimer = Q_NULLPTR;
} }
delete ui; delete ui;
} }
void ExoplanetsDialog::retranslate() void ExoplanetsDialog::retranslate()
{ {
if (dialog) if (dialog)
{ {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
refreshUpdateValues(); refreshUpdateValues();
skipping to change at line 130 skipping to change at line 130
connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(res toreDefaults())); connect(ui->restoreDefaultsButton, SIGNAL(clicked()), this, SLOT(res toreDefaults()));
connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSe ttings())); connect(ui->saveSettingsButton, SIGNAL(clicked()), this, SLOT(saveSe ttings()));
connect(ui->plotDiagram, SIGNAL(clicked()), this, SLOT(drawDiagram() )); connect(ui->plotDiagram, SIGNAL(clicked()), this, SLOT(drawDiagram() ));
// About & Info tabs // About & Info tabs
setAboutHtml(); setAboutHtml();
setInfoHtml(); setInfoHtml();
setWebsitesHtml(); setWebsitesHtml();
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
if(gui!=NULL) if(gui!=Q_NULLPTR)
{ {
ui->aboutTextBrowser->document()->setDefaultStyleSheet(QStri ng(gui->getStelStyle().htmlStyleSheet)); ui->aboutTextBrowser->document()->setDefaultStyleSheet(QStri ng(gui->getStelStyle().htmlStyleSheet));
ui->infoTextBrowser->document()->setDefaultStyleSheet(QStrin g(gui->getStelStyle().htmlStyleSheet)); ui->infoTextBrowser->document()->setDefaultStyleSheet(QStrin g(gui->getStelStyle().htmlStyleSheet));
ui->websitesTextBrowser->document()->setDefaultStyleSheet(QS tring(gui->getStelStyle().htmlStyleSheet)); ui->websitesTextBrowser->document()->setDefaultStyleSheet(QS tring(gui->getStelStyle().htmlStyleSheet));
} }
populateDiagramsList(); populateDiagramsList();
updateGuiFromSettings(); updateGuiFromSettings();
} }
skipping to change at line 166 skipping to change at line 166
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> ";
// 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 want to read full information about the plugin, its history and format of the catalog you can %1get info here%2."). arg("<a href=\"http://stellarium.org/wiki/index.php/Exoplanets_plugin\">"). arg("</a>") + "</li>"; html += "<li>" + q_("If you want to read full information about the plugin, its history and format of the catalog you can %1get info here%2."). arg("<a href=\"http://stellarium.org/wiki/index.php/Exoplanets_plugin\">"). arg("</a>") + "</li>";
html += "</ul></p></body></html>"; html += "</ul></p></body></html>";
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
if(gui!=NULL) if(gui!=Q_NULLPTR)
{ {
QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet);
ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlS tyleSheet); ui->aboutTextBrowser->document()->setDefaultStyleSheet(htmlS tyleSheet);
} }
ui->aboutTextBrowser->setHtml(html); ui->aboutTextBrowser->setHtml(html);
} }
void ExoplanetsDialog::setInfoHtml(void) void ExoplanetsDialog::setInfoHtml(void)
{ {
const StelTranslator& trans = StelApp::getInstance().getLocaleMgr(). getSkyTranslator(); const StelTranslator& trans = StelApp::getInstance().getLocaleMgr(). getSkyTranslator();
skipping to change at line 249 skipping to change at line 249
html += "<h2>" + q_("Additional info") + "</h2><ul>"; html += "<h2>" + q_("Additional info") + "</h2><ul>";
html += QString("<li><a href='https://en.wikipedia.org/wiki/Circumst ellar_habitable_zone'>%1</a> (en)</li>").arg(q_("Circumstellar habitable zo ne")); html += QString("<li><a href='https://en.wikipedia.org/wiki/Circumst ellar_habitable_zone'>%1</a> (en)</li>").arg(q_("Circumstellar habitable zo ne"));
html += QString("<li><a href='https://en.wikipedia.org/wiki/Planetar y_equilibrium_temperature'>%1</a> (en)</li>").arg(q_("Planetary equilibrium temperature")); html += QString("<li><a href='https://en.wikipedia.org/wiki/Planetar y_equilibrium_temperature'>%1</a> (en)</li>").arg(q_("Planetary equilibrium temperature"));
html += QString("<li><a href='https://en.wikipedia.org/wiki/Planetar y_habitability'>%1</a> (en)</li>").arg(q_("Planetary habitability")); html += QString("<li><a href='https://en.wikipedia.org/wiki/Planetar y_habitability'>%1</a> (en)</li>").arg(q_("Planetary habitability"));
html += QString("<li><a href='https://en.wikipedia.org/wiki/Earth_Si milarity_Index'>%1</a> (en)</li>").arg(q_("Earth Similarity Index")); html += QString("<li><a href='https://en.wikipedia.org/wiki/Earth_Si milarity_Index'>%1</a> (en)</li>").arg(q_("Earth Similarity Index"));
html += QString("<li><a href='http://www.iau.org/news/pressreleases/ detail/iau1514/'>%1</a> (en)</li>").arg(q_("Final Results of NameExoWorlds Public Vote Released")); html += QString("<li><a href='http://www.iau.org/news/pressreleases/ detail/iau1514/'>%1</a> (en)</li>").arg(q_("Final Results of NameExoWorlds Public Vote Released"));
html += QString("<li><a href='http://nameexoworlds.iau.org/'>%1</a> (en)</li>").arg(q_("NameExoWorlds website")); html += QString("<li><a href='http://nameexoworlds.iau.org/'>%1</a> (en)</li>").arg(q_("NameExoWorlds website"));
html += "</ul></body></html>"; html += "</ul></body></html>";
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
if(gui!=NULL) if(gui!=Q_NULLPTR)
{ {
QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet);
ui->infoTextBrowser->document()->setDefaultStyleSheet(htmlSt yleSheet); ui->infoTextBrowser->document()->setDefaultStyleSheet(htmlSt yleSheet);
} }
ui->infoTextBrowser->setHtml(html); ui->infoTextBrowser->setHtml(html);
} }
void ExoplanetsDialog::setWebsitesHtml(void) void ExoplanetsDialog::setWebsitesHtml(void)
{ {
QString html = "<html><head></head><body>"; QString html = "<html><head></head><body>";
skipping to change at line 282 skipping to change at line 282
html += QString("<li><a href='%1'>%2</a></li>").arg("http://exoplane tarchive.ipac.caltech.edu/").arg(q_("The NASA Exoplanet Archive")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://exoplane tarchive.ipac.caltech.edu/").arg(q_("The NASA Exoplanet Archive"));
html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.dtm. ciw.edu/boss/c53index.html").arg(q_("IAU Commission 53: Extrasolar Planets" )); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.dtm. ciw.edu/boss/c53index.html").arg(q_("IAU Commission 53: Extrasolar Planets" ));
html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.exom ol.com/").arg(q_("ExoMol")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.exom ol.com/").arg(q_("ExoMol"));
html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.hzga llery.org/").arg(q_("The Habitable Zone Gallery")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.hzga llery.org/").arg(q_("The Habitable Zone Gallery"));
html += QString("<li><a href='%1'>%2</a></li>").arg("http://planetqu est.jpl.nasa.gov/").arg(q_("PlanetQuest - The Search for Another Earth")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://planetqu est.jpl.nasa.gov/").arg(q_("PlanetQuest - The Search for Another Earth"));
html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.open exoplanetcatalogue.com/").arg(q_("Open Exoplanet Catalogue")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://www.open exoplanetcatalogue.com/").arg(q_("Open Exoplanet Catalogue"));
html += QString("<li><a href='%1'>%2</a></li>").arg("http://phl.upr. edu/projects/habitable-exoplanets-catalog").arg(q_("The Habitable Exoplanet s Catalog")); html += QString("<li><a href='%1'>%2</a></li>").arg("http://phl.upr. edu/projects/habitable-exoplanets-catalog").arg(q_("The Habitable Exoplanet s Catalog"));
html += "</ul></body></html>"; html += "</ul></body></html>";
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
if(gui!=NULL) if(gui!=Q_NULLPTR)
{ {
QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet); QString htmlStyleSheet(gui->getStelStyle().htmlStyleSheet);
ui->websitesTextBrowser->document()->setDefaultStyleSheet(ht mlStyleSheet); ui->websitesTextBrowser->document()->setDefaultStyleSheet(ht mlStyleSheet);
} }
ui->websitesTextBrowser->setHtml(html); ui->websitesTextBrowser->setHtml(html);
} }
void ExoplanetsDialog::refreshUpdateValues(void) void ExoplanetsDialog::refreshUpdateValues(void)
{ {
ui->lastUpdateDateTimeEdit->setDateTime(ep->getLastUpdate()); ui->lastUpdateDateTimeEdit->setDateTime(ep->getLastUpdate());
skipping to change at line 504 skipping to change at line 504
QVariant selectedAxisY = axisY->itemData(indexY); QVariant selectedAxisY = axisY->itemData(indexY);
axisX->clear(); axisX->clear();
axisY->clear(); axisY->clear();
QList<axisPair> axis; QList<axisPair> axis;
axis.append(qMakePair(q_("Orbital Eccentricity"), 0)); axis.append(qMakePair(q_("Orbital Eccentricity"), 0));
axis.append(qMakePair(q_("Orbit Semi-Major Axis, AU"), 1)); axis.append(qMakePair(q_("Orbit Semi-Major Axis, AU"), 1));
axis.append(qMakePair(q_("Planetary Mass, Mjup"), 2)); axis.append(qMakePair(q_("Planetary Mass, Mjup"), 2));
axis.append(qMakePair(q_("Planetary Radius, Rjup"), 3)); axis.append(qMakePair(q_("Planetary Radius, Rjup"), 3));
axis.append(qMakePair(q_("Orbital Period, days"), 4)); axis.append(qMakePair(q_("Orbital Period, days"), 4));
axis.append(qMakePair(q_("Angular Distance, arcsec."), 5)); axis.append(qMakePair(q_("Angular Distance, arcsec"), 5));
axis.append(qMakePair(q_("Effective temperature of host star, K"), 6
));
axis.append(qMakePair(q_("Year of Discovery"), 7));
axis.append(qMakePair(q_("Metallicity of host star"), 8));
axis.append(qMakePair(q_("V magnitude of host star, mag"), 9));
axis.append(qMakePair(q_("RA (J2000) of star, deg"), 10));
axis.append(qMakePair(q_("Dec (J2000) of star, deg"), 11));
axis.append(qMakePair(q_("Distance to star, pc"), 12));
axis.append(qMakePair(q_("Mass of host star, Msol"), 13));
axis.append(qMakePair(q_("Radius of host star, Rsol"), 14));
for(int i=0; i<axis.size(); ++i) for(int i=0; i<axis.size(); ++i)
{ {
axisX->addItem(axis.at(i).first, axis.at(i).second); axisX->addItem(axis.at(i).first, axis.at(i).second);
axisY->addItem(axis.at(i).first, axis.at(i).second); axisY->addItem(axis.at(i).first, axis.at(i).second);
} }
//Restore the selection //Restore the selection
indexX = axisX->findData(selectedAxisX, Qt::UserRole, Qt::MatchCaseS ensitive); indexX = axisX->findData(selectedAxisX, Qt::UserRole, Qt::MatchCaseS ensitive);
if (indexX<0)
indexX = 1;
indexY = axisY->findData(selectedAxisY, Qt::UserRole, Qt::MatchCaseS ensitive); indexY = axisY->findData(selectedAxisY, Qt::UserRole, Qt::MatchCaseS ensitive);
if (indexY<0)
indexY = 0;
axisX->setCurrentIndex(indexX); axisX->setCurrentIndex(indexX);
axisY->setCurrentIndex(indexY); axisY->setCurrentIndex(indexY);
axisX->blockSignals(false); axisX->blockSignals(false);
axisY->blockSignals(false); axisY->blockSignals(false);
} }
 End of changes. 9 change blocks. 
8 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/