ExoplanetsDialog.cpp   ExoplanetsDialog.cpp 
skipping to change at line 21 skipping to change at line 21
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "config.h"
#include <QDebug> #include <QDebug>
#include <QTimer> #include <QTimer>
#include <QDateTime> #include <QDateTime>
#include <QUrl> #include <QUrl>
#include <QFileDialog> #include <QFileDialog>
#include "StelApp.hpp" #include "StelApp.hpp"
#include "ui_exoplanetsDialog.h" #include "ui_exoplanetsDialog.h"
#include "ExoplanetsDialog.hpp" #include "ExoplanetsDialog.hpp"
#include "Exoplanets.hpp" #include "Exoplanets.hpp"
skipping to change at line 81 skipping to change at line 79
// 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()),
this, SLOT(retranslate())); this, SLOT(retranslate()));
#ifdef Q_OS_WIN
//Kinetic scrolling for tablet pc and pc
QList<QWidget *> addscroll;
addscroll << ui->aboutTextBrowser << ui->infoTextBrowser << ui->webs
itesTextBrowser;
installKineticScrolling(addscroll);
#endif
// Settings tab / updates group // Settings tab / updates group
ui->displayAtStartupCheckBox->setChecked(ep->getEnableAtStartup()); ui->displayAtStartupCheckBox->setChecked(ep->getEnableAtStartup());
connect(ui->displayAtStartupCheckBox, SIGNAL(stateChanged(int)), thi s, SLOT(setDisplayAtStartupEnabled(int))); connect(ui->displayAtStartupCheckBox, SIGNAL(stateChanged(int)), thi s, SLOT(setDisplayAtStartupEnabled(int)));
ui->displayModeCheckBox->setChecked(ep->getDisplayMode()); ui->displayModeCheckBox->setChecked(ep->getDisplayMode());
connect(ui->displayModeCheckBox, SIGNAL(stateChanged(int)), this, SL OT(setDistributionEnabled(int))); connect(ui->displayModeCheckBox, SIGNAL(stateChanged(int)), this, SL OT(setDistributionEnabled(int)));
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());
skipping to change at line 163 skipping to change at line 168
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)
{ {
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 html += QString("<p>%1</p>").arg(q_("This plugin can display potenti
al habitable exoplanets (orange marker) and some information about those pl al habitable exoplanets (orange marker) and some information about those pl
anets - habitable class, mean surface temperature and Earth Similarity Inde anets."));
x.")); html += QString("<p><b>%1</b> &mdash; %2</p>").arg(q_("Planetary Cla
html += QString("<p><b>%1</b> &mdash; %2</p>").arg(q_("Habitable Cla ss")).arg(q_("Planet classification from host star spectral type (F, G, K,
ss")).arg(q_("Classifies habitable planets based on temperature: hypopsychr M), habitable zone (hot, warm, cold) and size (miniterran, subterran, terra
oplanets (O or hP) = very cold (less −50°C); psychroplanets (P) = cold; mes n, superterran, jovian, neptunian) (Earth = G-Warm Terran)."));
oplanets (M) = medium-temperature (0–50°C); thermoplanets (T) = hot; hypert html += QString("<p><b><a href='http://lasp.colorado.edu/~bagenal/37
hermoplanets (E or hT) = very hot (above 100°C). Mesoplanets would be ideal 20/CLASS6/6EquilibriumTemp.html'>%1</a></b> &mdash; %2</p>").arg(q_("Equili
for complex life, whereas class O or E would only support extremophilic li brium Temperature")).arg(q_("The planetary equilibrium temperature is a the
fe. Non-habitable planets are simply given the class X (or NH).")); oretical temperature in (°C) that the planet would be at when considered si
html += QString("<p><b>%1</b> &mdash; %2</p>").arg(q_("Mean Surface mply as if it were a black body being heated only by its parent star (assum
Temperature")).arg(q_("Temperature in (°C) based on a similar terrestrial a ing a 0.3 bond albedo). As example the planetary equilibrium temperature of
tmosphere to planet mass ratio and a greenhouse effect due to 1 percent of Earth is -18.15°C (255 K)."));
CO2 (assuming an albedo of 0.3 in all cases)."));
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 += "</body></html>"; html += "<h3>" + q_("Additional info") + "</h3><ul>";
html += QString("<li><a href='http://en.wikipedia.org/wiki/Circumste
llar_habitable_zone'>%1</a> (en)</li>").arg(q_("Circumstellar habitable zon
e"));
html += QString("<li><a href='http://en.wikipedia.org/wiki/Planetary
_equilibrium_temperature'>%1</a> (en)</li>").arg(q_("Planetary equilibrium
temperature"));
html += QString("<li><a href='http://en.wikipedia.org/wiki/Planetary
_habitability'>%1</a> (en)</li>").arg(q_("Planetary habitability"));
html += QString("<li><a href='http://en.wikipedia.org/wiki/Earth_Sim
ilarity_Index'>%1</a> (en)</li>").arg(q_("Earth Similarity Index"));
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);
} }
 End of changes. 4 change blocks. 
18 lines changed or deleted 34 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/