ExoplanetsDialog.cpp   ExoplanetsDialog.cpp 
skipping to change at line 39 skipping to change at line 39
#include "ExoplanetsDialog.hpp" #include "ExoplanetsDialog.hpp"
#include "Exoplanets.hpp" #include "Exoplanets.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelObjectMgr.hpp" #include "StelObjectMgr.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "StelStyle.hpp" #include "StelStyle.hpp"
#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 "qcustomplot/qcustomplot.h"
ExoplanetsDialog::ExoplanetsDialog() ExoplanetsDialog::ExoplanetsDialog()
: ep(NULL) : ep(NULL)
, updateTimer(NULL) , updateTimer(NULL)
{ {
ui = new Ui_exoplanetsDialog; ui = new Ui_exoplanetsDialog;
dialogName = "Exoplanets";
} }
ExoplanetsDialog::~ExoplanetsDialog() ExoplanetsDialog::~ExoplanetsDialog()
{ {
if (updateTimer) if (updateTimer)
{ {
updateTimer->stop(); updateTimer->stop();
delete updateTimer; delete updateTimer;
updateTimer = NULL; updateTimer = NULL;
} }
skipping to change at line 67 skipping to change at line 71
void ExoplanetsDialog::retranslate() void ExoplanetsDialog::retranslate()
{ {
if (dialog) if (dialog)
{ {
ui->retranslateUi(dialog); ui->retranslateUi(dialog);
refreshUpdateValues(); refreshUpdateValues();
setAboutHtml(); setAboutHtml();
setInfoHtml(); setInfoHtml();
setWebsitesHtml(); setWebsitesHtml();
populateDiagramsList();
} }
} }
// Initialize the dialog widgets and connect the signals/slots // Initialize the dialog widgets and connect the signals/slots
void ExoplanetsDialog::createDialogContent() void ExoplanetsDialog::createDialogContent()
{ {
ep = GETSTELMODULE(Exoplanets); ep = GETSTELMODULE(Exoplanets);
ui->setupUi(dialog); ui->setupUi(dialog);
ui->tabs->setCurrentIndex(0); ui->tabs->setCurrentIndex(0);
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), connect(&StelApp::getInstance(), SIGNAL(languageChanged()),
skipping to change at line 101 skipping to change at line 106
ui->displayShowExoplanetsButton->setChecked(ep->getFlagShowExoplanet sButton()); ui->displayShowExoplanetsButton->setChecked(ep->getFlagShowExoplanet sButton());
connect(ui->displayShowExoplanetsButton, SIGNAL(stateChanged(int)), this, SLOT(setDisplayShowExoplanetsButton(int))); connect(ui->displayShowExoplanetsButton, SIGNAL(stateChanged(int)), this, SLOT(setDisplayShowExoplanetsButton(int)));
ui->timelineModeCheckBox->setChecked(ep->getTimelineMode()); ui->timelineModeCheckBox->setChecked(ep->getTimelineMode());
connect(ui->timelineModeCheckBox, SIGNAL(stateChanged(int)), this, S LOT(setTimelineEnabled(int))); connect(ui->timelineModeCheckBox, SIGNAL(stateChanged(int)), this, S LOT(setTimelineEnabled(int)));
ui->habitableModeCheckBox->setChecked(ep->getHabitableMode()); ui->habitableModeCheckBox->setChecked(ep->getHabitableMode());
connect(ui->habitableModeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setHabitableEnabled(int))); connect(ui->habitableModeCheckBox, SIGNAL(stateChanged(int)), this, SLOT(setHabitableEnabled(int)));
connect(ui->internetUpdatesCheckbox, SIGNAL(stateChanged(int)), this , SLOT(setUpdatesEnabled(int))); connect(ui->internetUpdatesCheckbox, SIGNAL(stateChanged(int)), this , SLOT(setUpdatesEnabled(int)));
connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(updateJSON() )); connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(updateJSON() ));
connect(ep, SIGNAL(updateStateChanged(Exoplanets::UpdateState)), thi s, SLOT(updateStateReceiver(Exoplanets::UpdateState))); connect(ep, SIGNAL(updateStateChanged(Exoplanets::UpdateState)), thi s, SLOT(updateStateReceiver(Exoplanets::UpdateState)));
connect(ep, SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateCompl eteReceiver(void))); connect(ep, SIGNAL(jsonUpdateComplete(void)), this, SLOT(updateCompl eteReceiver(void)));
connect(ep, SIGNAL(jsonUpdateComplete(void)), ep, SLOT(reloadCatalog ()));
connect(ui->updateFrequencySpinBox, SIGNAL(valueChanged(int)), this, SLOT(setUpdateValues(int))); connect(ui->updateFrequencySpinBox, SIGNAL(valueChanged(int)), this, SLOT(setUpdateValues(int)));
refreshUpdateValues(); // fetch values for last updated and so on refreshUpdateValues(); // fetch values for last updated and so on
// if the state didn't change, setUpdatesEnabled will not be called, so we force it // if the state didn't change, setUpdatesEnabled will not be called, so we force it
setUpdatesEnabled(ui->internetUpdatesCheckbox->checkState()); setUpdatesEnabled(ui->internetUpdatesCheckbox->checkState());
updateTimer = new QTimer(this); updateTimer = new QTimer(this);
connect(updateTimer, SIGNAL(timeout()), this, SLOT(refreshUpdateValu es())); connect(updateTimer, SIGNAL(timeout()), this, SLOT(refreshUpdateValu es()));
updateTimer->start(7000); updateTimer->start(7000);
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMove dTo(QPoint)));
connect(ui->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() ));
// 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!=NULL)
{ {
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();
updateGuiFromSettings(); updateGuiFromSettings();
} }
void ExoplanetsDialog::setAboutHtml(void) void ExoplanetsDialog::setAboutHtml(void)
{ {
QString html = "<html><head></head><body>"; QString html = "<html><head></head><body>";
html += "<h2>" + q_("Exoplanets Plug-in") + "</h2><table width=\"90% \">"; html += "<h2>" + q_("Exoplanets Plug-in") + "</h2><table width=\"90% \">";
html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</stron g></td><td>" + EXOPLANETS_PLUGIN_VERSION + "</td></tr>"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</stron g></td><td>" + EXOPLANETS_PLUGIN_VERSION + "</td></tr>";
html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Alex ander Wolf &lt;alex.v.wolf@gmail.com&gt;</td></tr></table>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Alex ander Wolf &lt;alex.v.wolf@gmail.com&gt;</td></tr></table>";
html += "<p>" + QString(q_("This plugin plots the position of stars with exoplanets. Exoplanets data is derived from \"%1The Extrasolar Planets Encyclopaedia%2\"")).arg("<a href=\"http://exoplanet.eu/\">").arg("</a>") + ". "; html += "<p>" + QString(q_("This plugin plots the position of stars with exoplanets. Exoplanets data is derived from \"%1The Extrasolar Planets Encyclopaedia%2\"")).arg("<a href=\"http://exoplanet.eu/\">").arg("</a>") + ". ";
skipping to change at line 166 skipping to change at line 174
if(gui!=NULL) if(gui!=NULL)
{ {
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();
QString html = "<html><head></head><body>"; QString html = "<html><head></head><body>";
html += "<h2>" + q_("Potential habitable exoplanets") + "</h2>"; html += "<h2>" + q_("Potential habitable exoplanets") + "</h2>";
html += QString("<p>%1</p>").arg(q_("This plugin can display potenti al habitable exoplanets (orange marker) and some information about those pl anets.")); html += QString("<p>%1</p>").arg(q_("This plugin can display potenti al habitable exoplanets (orange marker) and some information about those pl anets."));
html += QString("<p><b>%1</b> &mdash; %2</p>").arg(q_("Planetary Cla ss")).arg(q_("Planet classification from host star spectral type (F, G, K, M), habitable zone (hot, warm, cold) and size (miniterran, subterran, terra n, superterran, jovian, neptunian) (Earth = G-Warm Terran).")); html += QString("<p><b>%1</b> &mdash; %2</p>").arg(q_("Planetary Cla ss")).arg(q_("Planet classification from host star spectral type (F, G, K, M), habitable zone (hot, warm, cold) and size (miniterran, subterran, terra n, superterran, jovian, neptunian) (Earth = G-Warm Terran)."));
html += QString("<p><b><a href='http://lasp.colorado.edu/~bagenal/37 20/CLASS6/6EquilibriumTemp.html'>%1</a></b> &mdash; %2</p>").arg(q_("Equili brium Temperature")).arg(q_("The planetary equilibrium temperature is a the oretical temperature in (°C) that the planet would be at when considered si mply as if it were a black body being heated only by its parent star (assum ing a 0.3 bond albedo). As example the planetary equilibrium temperature of Earth is -18.15°C (255 K).")); html += QString("<p><b><a href='http://lasp.colorado.edu/~bagenal/37 20/CLASS6/6EquilibriumTemp.html'>%1</a></b> &mdash; %2</p>").arg(q_("Equili brium Temperature")).arg(q_("The planetary equilibrium temperature is a the oretical temperature in (°C) that the planet would be at when considered si mply as if it were a black body being heated only by its parent star (assum ing a 0.3 bond albedo). As example the planetary equilibrium temperature of Earth is -18.15°C (255 K)."));
html += QString("<p><b><a href='http://phl.upr.edu/projects/earth-si milarity-index-esi'>%1</a></b> &mdash; %2</p>").arg(q_("Earth Similarity In dex (ESI)")).arg(q_("Similarity to Earth on a scale from 0 to 1, with 1 bei ng the most Earth-like. ESI depends on the planet's radius, density, escape velocity, and surface temperature.")); html += QString("<p><b><a href='http://phl.upr.edu/projects/earth-si milarity-index-esi'>%1</a></b> &mdash; %2</p>").arg(q_("Earth Similarity In dex (ESI)")).arg(q_("Similarity to Earth on a scale from 0 to 1, with 1 bei ng the most Earth-like. ESI depends on the planet's radius, density, escape velocity, and surface temperature."));
html += "<h3>" + q_("Additional info") + "</h3><ul>"; html += "<h2>" + q_("Proper names") + "</h2>";
html += QString("<li><a href='http://en.wikipedia.org/wiki/Circumste html += "<p>" + q_("In December 2015, the International Astronomical
llar_habitable_zone'>%1</a> (en)</li>").arg(q_("Circumstellar habitable zon Union (IAU) has officially approved names for several exoplanets after a p
e")); ublic vote.") + "</p><ul>";
html += QString("<li><a href='http://en.wikipedia.org/wiki/Planetary html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
_equilibrium_temperature'>%1</a> (en)</li>").arg(q_("Planetary equilibrium <sup>1</sup></li>").arg(trans.qtranslate("Veritate"), "14 And", q_("From th
temperature")); e latin <em>Veritas</em>, truth. The ablative form means <em>where there is
html += QString("<li><a href='http://en.wikipedia.org/wiki/Planetary truth</em>."));
_habitability'>%1</a> (en)</li>").arg(q_("Planetary habitability")); html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
html += QString("<li><a href='http://en.wikipedia.org/wiki/Earth_Sim </li>").arg(trans.qtranslate("Spe"), "14 And b", q_("From the latin <em>Spe
ilarity_Index'>%1</a> (en)</li>").arg(q_("Earth Similarity Index")); s</em>, hope. The ablative form means <em>where there is hope</em>."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Musica"), "18 Del", q_("Musica is Latin for <em>music</em
>."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Arion"), "18 Del b", q_("Arion was a genius of poetry and
music in ancient Greece. According to legend, his life was saved at sea by
dolphins after attracting their attention by the playing of his kithara.")
);
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Fafnir"), "42 Dra", q_("Fafnir was a Norse mythological d
warf who turned into a dragon."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Orbitar"), "42 Dra b", q_("Orbitar is a contrived word pa
ying homage to the space launch and orbital operations of NASA."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Chalawan"), "47 UMa", q_("Chalawan is a mythological croc
odile king from a Thai folktale."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Taphao Thong"), "47 UMa b", q_("Taphao Thong is one of tw
o sisters associated with the Thai folk tale of Chalawan."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Taphao Kaew"), "47 UMa c", q_("Taphao Kae is one of two s
isters associated with the Thai folk tale of Chalawan."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Helvetios"), "51 Peg", q_("Helvetios is Celtic for <em>th
e Helvetian</em> and refers to the Celtic tribe that lived in Switzerland d
uring antiquity."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Dimidium"), "51 Peg b", q_("Dimidium is Latin for <em>hal
f</em>, referring to the planet's mass of at least half the mass of Jupiter
."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Copernicus"), "55 Cnc", q_("Nicolaus Copernicus or Mikola
j Kopernik (1473-1543) was a Polish astronomer who proposed the heliocentri
c model of the solar system in his book <em>De revolutionibus orbium coeles
tium</em>."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Galileo"), "55 Cnc b", q_("Galileo Galilei (1564-1642) wa
s an Italian astronomer and physicist often called the <em>father of observ
ational astronomy</em> and the <em>father of modern physics</em>. Using a t
elescope, he discovered the four largest satellites of Jupiter, and the rep
orted the first telescopic observations of the phases of Venus, among other
discoveries."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Brahe"), "55 Cnc c", q_("Tycho Brahe (1546-1601) was a Da
nish astronomer and nobleman who recorded accurate astronomical observation
s of the stars and planets. These observations were critical to Kepler's fo
rmulation of his three laws of planetary motion."));
html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
<sup>6</sup></li>").arg(trans.qtranslate("Lipperhey"), "55 Cnc d", q_("Hans
Lipperhey (1570-1619) was a German-Dutch lens grinder and spectacle maker
who is often attributed with the invention of the refracting telescope in 1
608."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Janssen"), "55 Cnc e", q_("Jacharias Janssen (1580s-1630s
) was a Dutch spectacle maker who is often attributed with invention of the
microscope, and more controversially with the invention of the telescope."
));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Harriot"), "55 Cnc f", q_("Thomas Harriot (ca. 1560-1621)
was an English astronomer, mathematician, ethnographer, and translator, wh
o is attributed with the first drawing of the Moon through telescopic obser
vations."));
html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
<sup>2</sup></li>").arg(trans.qtranslate("Amateru"), "ε Tau b", q_("<em>Ama
teru</em> is a common Japanese appellation for shrines when they enshrine A
materasu, the Shinto goddess of the Sun, born from the left eye of the god
Izanagi."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Hypatia"), "ι Dra b", q_("Hypatia was a famous Greek astr
onomer, mathematician, and philosopher. She was head of the Neo-Platonic sc
hool at Alexandria in the early 5th century, until murdered by a Christian
mob in 415."));
html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
</li>").arg(trans.qtranslate("Ran"), "ε Eri", q_("Ran is the Norse goddess
of the sea, who stirs up the waves and captures sailors with her net."));
html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
<sup>3</sup></li>").arg(trans.qtranslate("AEgir"), "ε Eri b", q_("AEgir is
Ran's husband, the personified god of the ocean. <em>AEgir</em> and <em>Ran
</em> both represent the <em>Jotuns</em> who reign in the outer Universe; t
ogether they had nine daughters."));
html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
</li>").arg(trans.qtranslate("Tadmor"), "γ Cep b", q_("Ancient Semitic name
and modern Arabic name for the city of Palmyra, a UNESCO World Heritage Si
te."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Dagon"), "α PsA b", q_("Dagon was a Semitic deity, often
represented as half-man, half-fish."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Tonatiuh"), "HD 104985", q_("Tonatiuh was the Aztec god o
f the Sun."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Meztli"), "HD 104985 b", q_("Meztli was the Aztec goddess
of the Moon."));
html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
<sup>4</sup></li>").arg(trans.qtranslate("Ogma"), "HD 149026", q_("Ogma was
a deity of eloquence, writing, and great physical strength in the Celtic m
ythologies of Ireland and Scotland, and may be related to the Gallo-Roman d
eity <em>Ogmios</em>."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Smertrios"), "HD 149026 b", q_("Smertrios was a Gallic de
ity of war."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Intercrus"), "HD 81688", q_("Intercrus means <em>between
the legs</em> in Latin style, referring to the star's position in the const
ellation Ursa Major."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Arkas"), "HD 81688 b", q_("Arkas was the son of Callisto
(Ursa Major) in Greek mythology."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Cervantes"), "μ Ara", q_("Miguel de Cervantes Saavedra (1
547-1616) was a famous Spanish writer and author of <em>El Ingenioso Hidalg
o Don Quixote de la Mancha</em>."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Quijote"), "μ Ara b", q_("Lead fictional character from C
ervantes's <em>El Ingenioso Hidalgo Don Quixote de la Mancha</em>."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Dulcinea"), "μ Ara c", q_("Fictional character and love i
nterest of Don Quijote (or Quixote) in Cervantes's <em>El Ingenioso Hidalgo
Don Quixote de la Mancha</em>."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Rocinante"), "μ Ara d", q_("Fictional horse of Don Quijot
e in Cervantes's <em>El Ingenioso Hidalgo Don Quixote de la Mancha</em>."))
;
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Sancho"), "μ Ara e", q_("Fictional squire of Don Quijote
in Cervantes's <em>El Ingenioso Hidalgo Don Quixote de la Mancha</em>."));
html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
<sup>5</sup></li>").arg(trans.qtranslate("Thestias"), "β Gem b", q_("Thesti
as is the patronym of Leda and her sister Althaea, the daughters of Thestiu
s. Leda was a Greek queen, mother of Pollux and of his twin Castor, and of
Helen and Clytemnestra."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Lich"), "PSR B1257+12", q_("Lich is a fictional undead cr
eature known for controlling other undead creatures with magic."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Draugr"), "PSR B1257+12 b", q_("Draugr refers to undead c
reatures in Norse mythology."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Poltergeist"), "PSR B1257+12 c", q_("Poltergeist is a nam
e for supernatural beings that create physical disturbances, from German fo
r <em>noisy ghost</em>."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Phobetor"), "PSR B1257+12 d", q_("Phobetor is a Greek myt
hological deity of nightmares, the son of Nyx, the primordial deity of nigh
t."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Titawin"), "υ And", q_("Titawin (also known as Medina of
Tetouan) is a settlement in northern Morocco and UNESCO World Heritage Site
. Historically it was an important point of contact between two civilizatio
ns (Spanish and Arab) and two continents (Europe and Africa) after the 8th
century."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Saffar"), "υ And b", q_("Saffar is named for Abu al-Qasim
Ahmed Ibn-Abd Allah Ibn-Omar al Ghafiqi Ibn-al-Saffar, who taught arithmet
ic, geometry, and astronomy in 11th century Cordova in Andalusia (modern Sp
ain), and wrote an influential treatise on the uses of the astrolabe."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Samh"), "υ And c", q_("Samh is named for Abu al-Qasim 'As
bagh ibn Muhammad ibn al-Samh al-Mahri (or <em>Ibn al-Samh</em>), a noted 1
1th century astronomer and mathematician in the school of al Majriti in Cor
dova (Andalusia, now modern Spain)."));
html += QString("<li><strong>%1</strong> (%2) &mdash; %3</li>").arg(
trans.qtranslate("Majriti"), "υ And d", q_("Majriti is named for Abu al-Qas
im al-Qurtubi al-Majriti, a notable mathematician, astronomer, scholar, and
teacher in 10th century and early 11th century Andalusia (modern Spain).")
);
html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
</li>").arg(trans.qtranslate("Libertas"), "ξ Aql", q_("Libertas is Latin fo
r <em>liberty</em>. Liberty refers to social and political freedoms, and a
reminder that there are people deprived of liberty in the world even today.
The constellation Aquila represents an eagle - a popular symbol of liberty
."));
html += QString("<li><strong>%1</strong><sup>*</sup> (%2) &mdash; %3
</li>").arg(trans.qtranslate("Fortitudo"), "ξ Aql b", q_("Fortitudo is Lati
n for <em>fortitude</em>. Fortitude means emotional and mental strength in
the face of adversity, as embodied by the eagle (represented by the constel
lation Aquila)."));
html += QString("</ul><p>%1:").arg(q_("Notes"));
html += QString("<br /><sup>*</sup> %1").arg(q_("These names are mod
ified based on the original proposals, to be consistent with the IAU rules.
"));
html += QString("<br /><sup>1</sup> %1").arg(q_("The original name p
roposed, <em>Veritas</em>, is that of an asteroid important for the study o
f the solar system."));
html += QString("<br /><sup>2</sup> %1").arg(q_("The name originally
proposed, <em>Amaterasu</em>, is already used for an asteroid."));
html += QString("<br /><sup>3</sup> %1").arg(q_("Note the typographi
cal difference between <em>AEgir</em> and <em>Aegir</em>, the Norwegian tra
nsliteration. The same name, with the spelling <em>Aegir</em>, has been att
ributed to one of Saturn's satellites, discovered in 2004."));
html += QString("<br /><sup>4</sup> %1").arg(q_("<em>Ogmios</em> is
a name already attributed to an asteroid."));
html += QString("<br /><sup>5</sup> %1").arg(q_("The original propos
ed name <em>Leda</em> is already attributed to an asteroid and to one of Ju
piter's satellites. The name <em>Althaea</em> is also attributed to an aste
roid."));
html += QString("<br /><sup>6</sup> %1</p>").arg(q_("The original sp
elling of <em>Lippershey</em> was corrected to <em>Lipperhey</em> on 15.01.
2016. The commonly seen spelling <em>Lippershey</em> (with an <em>s</em>) r
esults in fact from a typographical error dating back from 1831, thus shoul
d be avoided."));
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/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/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://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!=NULL)
{ {
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);
} }
skipping to change at line 302 skipping to change at line 369
ui->nextUpdateLabel->setText(q_("Updating now...")); ui->nextUpdateLabel->setText(q_("Updating now..."));
else if (state==Exoplanets::DownloadError || state==Exoplanets::Othe rError) else if (state==Exoplanets::DownloadError || state==Exoplanets::Othe rError)
{ {
ui->nextUpdateLabel->setText(q_("Update error")); ui->nextUpdateLabel->setText(q_("Update error"));
updateTimer->start(); // make sure message is displayed for a while... updateTimer->start(); // make sure message is displayed for a while...
} }
} }
void ExoplanetsDialog::updateCompleteReceiver(void) void ExoplanetsDialog::updateCompleteReceiver(void)
{ {
qDebug() << "[Exoplanets] Updating of catalog is complete";
ui->nextUpdateLabel->setText(QString(q_("Exoplanets is updated"))); ui->nextUpdateLabel->setText(QString(q_("Exoplanets is updated")));
// display the status for another full interval before refreshing st atus // display the status for another full interval before refreshing st atus
updateTimer->start(); updateTimer->start();
ui->lastUpdateDateTimeEdit->setDateTime(ep->getLastUpdate()); ui->lastUpdateDateTimeEdit->setDateTime(ep->getLastUpdate());
QTimer *timer = new QTimer(this); QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(refreshUpdateValues())) ; connect(timer, SIGNAL(timeout()), this, SLOT(refreshUpdateValues())) ;
} }
void ExoplanetsDialog::restoreDefaults(void) void ExoplanetsDialog::restoreDefaults(void)
{ {
qDebug() << "Exoplanets::restoreDefaults"; qDebug() << "[Exoplanets] Restore defaults...";
ep->restoreDefaults(); ep->restoreDefaults();
ep->loadConfiguration(); ep->loadConfiguration();
updateGuiFromSettings(); updateGuiFromSettings();
} }
void ExoplanetsDialog::updateGuiFromSettings(void) void ExoplanetsDialog::updateGuiFromSettings(void)
{ {
ui->internetUpdatesCheckbox->setChecked(ep->getUpdatesEnabled()); ui->internetUpdatesCheckbox->setChecked(ep->getUpdatesEnabled());
refreshUpdateValues(); refreshUpdateValues();
} }
skipping to change at line 336 skipping to change at line 404
ep->saveConfiguration(); ep->saveConfiguration();
} }
void ExoplanetsDialog::updateJSON(void) void ExoplanetsDialog::updateJSON(void)
{ {
if(ep->getUpdatesEnabled()) if(ep->getUpdatesEnabled())
{ {
ep->updateJSON(); ep->updateJSON();
} }
} }
void ExoplanetsDialog::drawDiagram()
{
int currentAxisX = ui->comboAxisX->currentData(Qt::UserRole).toInt()
;
QString currentAxisXString = ui->comboAxisX->currentText();
int currentAxisY = ui->comboAxisY->currentData(Qt::UserRole).toInt()
;
QString currentAxisYString = ui->comboAxisY->currentText();
QList<double> aX = ep->getExoplanetsData(currentAxisX), aY = ep->get
ExoplanetsData(currentAxisY);
QVector<double> x = aX.toVector(), y = aY.toVector();
double minX, minY, maxX, maxY;
minX = maxX = aX.first();
minY = maxY = aY.first();
foreach (double temp, aX)
{
if(maxX < temp) maxX = temp;
if(minX > temp) minX = temp;
}
foreach (double temp, aY)
{
if(maxY < temp) maxY = temp;
if(minY > temp) minY = temp;
}
if (!ui->minX->text().isEmpty())
minX = ui->minX->text().toDouble();
if (!ui->maxX->text().isEmpty())
maxX = ui->maxX->text().toDouble();
if (!ui->minY->text().isEmpty())
minY = ui->minY->text().toDouble();
if (!ui->maxY->text().isEmpty())
maxY = ui->maxY->text().toDouble();
ui->customPlot->addGraph();
ui->customPlot->graph(0)->setData(x, y);
ui->customPlot->graph(0)->setPen(QPen(Qt::blue));
ui->customPlot->graph(0)->setLineStyle(QCPGraph::lsNone);
ui->customPlot->graph(0)->setScatterStyle(QCPScatterStyle(QCPScatter
Style::ssDisc, 4));
ui->customPlot->graph(0)->rescaleAxes(true);
ui->customPlot->xAxis->setLabel(currentAxisXString);
ui->customPlot->yAxis->setLabel(currentAxisYString);
ui->customPlot->xAxis->setRange(minX, maxX);
if (ui->checkBoxLogX->isChecked())
{
ui->customPlot->xAxis->setScaleType(QCPAxis::stLogarithmic);
ui->customPlot->xAxis->setScaleLogBase(10);
}
else
ui->customPlot->xAxis->setScaleType(QCPAxis::stLinear);
ui->customPlot->yAxis->setRange(minY, maxY);
if (ui->checkBoxLogY->isChecked())
{
ui->customPlot->yAxis->setScaleType(QCPAxis::stLogarithmic);
ui->customPlot->yAxis->setScaleLogBase(10);
}
else
ui->customPlot->yAxis->setScaleType(QCPAxis::stLinear);
ui->customPlot->replot();
}
void ExoplanetsDialog::populateDiagramsList()
{
Q_ASSERT(ui->comboAxisX);
Q_ASSERT(ui->comboAxisY);
QComboBox* axisX = ui->comboAxisX;
QComboBox* axisY = ui->comboAxisY;
//Save the current selection to be restored later
axisX->blockSignals(true);
axisY->blockSignals(true);
int indexX = axisX->currentIndex();
int indexY = axisY->currentIndex();
QVariant selectedAxisX = axisX->itemData(indexX);
QVariant selectedAxisY = axisY->itemData(indexY);
axisX->clear();
axisY->clear();
QList<axisPair> axis;
axis.append(qMakePair(q_("Orbital Eccentricity"), 0));
axis.append(qMakePair(q_("Orbit Semi-Major Axis, AU"), 1));
axis.append(qMakePair(q_("Planetary Mass, Mjup"), 2));
axis.append(qMakePair(q_("Planetary Radius, Rjup"), 3));
axis.append(qMakePair(q_("Orbital Period, days"), 4));
axis.append(qMakePair(q_("Angular Distance, arcsec."), 5));
for(int i=0; i<axis.size(); ++i)
{
axisX->addItem(axis.at(i).first, axis.at(i).second);
axisY->addItem(axis.at(i).first, axis.at(i).second);
}
//Restore the selection
indexX = axisX->findData(selectedAxisX, Qt::UserRole, Qt::MatchCaseS
ensitive);
indexY = axisY->findData(selectedAxisY, Qt::UserRole, Qt::MatchCaseS
ensitive);
axisX->setCurrentIndex(indexX);
axisY->setCurrentIndex(indexY);
axisX->blockSignals(false);
axisY->blockSignals(false);
}
 End of changes. 13 change blocks. 
13 lines changed or deleted 243 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/