ObservabilityDialog.cpp   ObservabilityDialog.cpp 
skipping to change at line 77 skipping to change at line 77
connect(ui->Goods, SIGNAL(stateChanged(int)), this, SLOT(setGoodDate sFlag(int))); connect(ui->Goods, SIGNAL(stateChanged(int)), this, SLOT(setGoodDate sFlag(int)));
connect(ui->FullMoon, SIGNAL(stateChanged(int)), this, SLOT(setFullM oonFlag(int))); connect(ui->FullMoon, SIGNAL(stateChanged(int)), this, SLOT(setFullM oonFlag(int)));
// connect(ui->Crescent, SIGNAL(stateChanged(int)), this, SLOT(setCresc entMoonFlag(int))); // connect(ui->Crescent, SIGNAL(stateChanged(int)), this, SLOT(setCresc entMoonFlag(int)));
// connect(ui->SuperMoon, SIGNAL(stateChanged(int)), this, SLOT(setSupe rMoonFlag(int))); // connect(ui->SuperMoon, SIGNAL(stateChanged(int)), this, SLOT(setSupe rMoonFlag(int)));
connect(ui->Red, SIGNAL(sliderMoved(int)), this, SLOT(setRed(int))); connect(ui->Red, SIGNAL(sliderMoved(int)), this, SLOT(setRed(int)));
connect(ui->Green, SIGNAL(sliderMoved(int)), this, SLOT(setGreen(int ))); connect(ui->Green, SIGNAL(sliderMoved(int)), this, SLOT(setGreen(int )));
connect(ui->Blue, SIGNAL(sliderMoved(int)), this, SLOT(setBlue(int)) ); connect(ui->Blue, SIGNAL(sliderMoved(int)), this, SLOT(setBlue(int)) );
connect(ui->fontSize, SIGNAL(sliderMoved(int)), this, SLOT(setSize(i nt))); connect(ui->fontSize, SIGNAL(sliderMoved(int)), this, SLOT(setSize(i nt)));
connect(ui->SunAltitude, SIGNAL(sliderMoved(int)), this, SLOT(setAlt itude(int))); connect(ui->SunAltitude, SIGNAL(sliderMoved(int)), this, SLOT(setAlt itude(int)));
connect(ui->HorizAltitude, SIGNAL(sliderMoved(int)), this, SLOT(setH orizon(int)));
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
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()));
// About tab // About tab
setAboutHtml(); setAboutHtml();
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( )); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance().getGui( ));
Q_ASSERT(gui); Q_ASSERT(gui);
ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui-> getStelStyle().htmlStyleSheet)); ui->aboutTextBrowser->document()->setDefaultStyleSheet(QString(gui-> getStelStyle().htmlStyleSheet));
updateGuiFromSettings(); updateGuiFromSettings();
} }
void ObservabilityDialog::setAboutHtml(void) void ObservabilityDialog::setAboutHtml(void)
{ {
QString html = "<html><head></head><body>"; QString html = "<html><head></head><body>";
html += "<h2>" + q_("Observability Plug-in") + "</h2><table width=\" 90%\">"; html += "<h2>" + q_("Observability Plug-in") + "</h2><table width=\" 90%\">";
html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</stron g></td><td> 1.0.2</td></tr>"; html += "<tr width=\"30%\"><td><strong>" + q_("Version") + ":</stron g></td><td>" + OBSERVABILITY_PLUGIN_VERSION + "</td></tr>";
html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Ivan Marti-Vidal &lt;i.martividal@gmail.com&gt;</td></tr></table>"; html += "<tr><td><strong>" + q_("Author") + ":</strong></td><td>Ivan Marti-Vidal &lt;i.martividal@gmail.com&gt;</td></tr></table>";
html += "<p>" + q_("Plugin that analyzes the observability of the se lected source (or the screen center, if no source is selected). The plugin can show rise, transit, and set times, as well as the best epoch of the yea r (i.e., largest angular separation from the Sun), the date range when the source is above the horizon at dark night, and the dates of Acronychal and Cosmical rise/set.<br>Ephemeris of the Solar-System objects and parallax ef fects are taken into account.<br><br> The author thanks Alexander Wolf and Georg Zotti for their advice.<br><br>Ivan Marti-Vidal (Onsala Space Observa tory)") + "</p>"; html += "<p>" + q_("Plugin that analyzes the observability of the se lected source (or the screen center, if no source is selected). The plugin can show rise, transit, and set times, as well as the best epoch of the yea r (i.e., largest angular separation from the Sun), the date range when the source is above the horizon at dark night, and the dates of Acronychal and Cosmical rise/set.<br>Ephemeris of the Solar-System objects and parallax ef fects are taken into account.<br><br> The author thanks Alexander Wolf and Georg Zotti for their advice.<br><br>Ivan Marti-Vidal (Onsala Space Observa tory)") + "</p>";
html += "<h3>" + q_("Explanation of some parameters") + "</h3><table width=\"90%\">"; html += "<h3>" + q_("Explanation of some parameters") + "</h3><table width=\"90%\">";
html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Sun altit ude at twilight:")).arg(q_("Any celestial object will be considered visible when the Sun is below this altitude. The altitude at astronomical twilight ranges usually between -12 and -18 degrees. This parameter is only used fo r the estimate of the range of observable epochs (see below).")); html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Sun altit ude at twilight:")).arg(q_("Any celestial object will be considered visible when the Sun is below this altitude. The altitude at astronomical twilight ranges usually between -12 and -18 degrees. This parameter is only used fo r the estimate of the range of observable epochs (see below)."));
html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Horizon a
ltitude:")).arg(q_("Minimum observable altitude (due to mountains, building
s, or just a limited telescope mount)."));
html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Today eph emeris:")).arg(q_("Self-explanatory. The program will show the rise, set, a nd culmination (transit) times. The exact times for these ephemeris are giv en in two ways: as time spans (referred to the current time) and as clock h ours (in local time).")); html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Today eph emeris:")).arg(q_("Self-explanatory. The program will show the rise, set, a nd culmination (transit) times. The exact times for these ephemeris are giv en in two ways: as time spans (referred to the current time) and as clock h ours (in local time)."));
html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Acronycha l/Cosmical rise/set:")).arg(q_("The Acronychal rise (or set) of an object h appens when the object rises (or sets) just when the Sun sets (or rises), r espectively. The exact dates of these ephemeris depend on the Observer's lo cation. The dates between the Acronychal set and rise are those when the al titude of the celestial object uses to be high when the Sun is well below t he horizon (hence the object can be well observed). On the contrary, the Co smical rise (or set) happens when both, the object and the Sun, rise (or se t) simultaneously. It is obvious that the source is hardly observable (or n ot observable at all) in the dates between Cosmical set and rise.")); html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Acronycha l/Cosmical rise/set:")).arg(q_("The Acronychal rise (or set) of an object h appens when the object rises (or sets) just when the Sun sets (or rises), r espectively. The exact dates of these ephemeris depend on the Observer's lo cation. The dates between the Acronychal set and rise are those when the al titude of the celestial object uses to be high when the Sun is well below t he horizon (hence the object can be well observed). On the contrary, the Co smical rise (or set) happens when both, the object and the Sun, rise (or se t) simultaneously. It is obvious that the source is hardly observable (or n ot observable at all) in the dates between Cosmical set and rise."));
html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Largest S un separation:")).arg(q_("Happens when the angular separation between the S un and the celestial object are maximum. In most cases, this is equivalent to say that the Equatorial longitudes of the Sun and the object differ by 1 80 degrees, so the Sun is in opposition to the object. When an object is at its maximum possible angular separation from the Sun (no matter if it is a planet or a star), it culminates roughly at midnight, and on the darkest p ossible area of the Sky at that declination. Hence, that is the 'best' nigh t to observe a particular object.")); html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Largest S un separation:")).arg(q_("Happens when the angular separation between the S un and the celestial object are maximum. In most cases, this is equivalent to say that the Equatorial longitudes of the Sun and the object differ by 1 80 degrees, so the Sun is in opposition to the object. When an object is at its maximum possible angular separation from the Sun (no matter if it is a planet or a star), it culminates roughly at midnight, and on the darkest p ossible area of the Sky at that declination. Hence, that is the 'best' nigh t to observe a particular object."));
html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Nights wi th source above horizon:")).arg(q_("The program computes the range of dates when the celestial object is above the horizon at least during one moment of the night. By 'night', the program considers the time span when the Sun altitude is below that of the twilight (which can be set by the user; see a bove). When the objects are fixed on the sky (or are exterior planets), the range of observable epochs for the current year can have two possible form s: either a range from one date to another (e.g., 20 Jan to 15 Sep) or in t wo steps (from 1 Jan to a given date and from another date to 31 Dec). In t he first case, the first date (20 Jan in our example) shall be close to the so-called 'Heliacal rise of a star' and the second date (15 Sep in our exa mple) shall be close to the 'Heliacal set'. In the second case (e.g., a ran ge in the form 1 Jan to 20 May and 21 Sep to 31 Dec), the first date (20 Ma y in our example) would be close to the Heliacal set and the second one (21 Sep in our example) to the Heliacal rise. More exact equations to estimate the Heliacal rise/set of stars and planets (which will not depend on the m ere input of a twilight Sun elevation by the user) will be implemented in f uture versions of this plugin.")); html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Nights wi th source above horizon:")).arg(q_("The program computes the range of dates when the celestial object is above the horizon at least during one moment of the night. By 'night', the program considers the time span when the Sun altitude is below that of the twilight (which can be set by the user; see a bove). When the objects are fixed on the sky (or are exterior planets), the range of observable epochs for the current year can have two possible form s: either a range from one date to another (e.g., 20 Jan to 15 Sep) or in t wo steps (from 1 Jan to a given date and from another date to 31 Dec). In t he first case, the first date (20 Jan in our example) shall be close to the so-called 'Heliacal rise of a star' and the second date (15 Sep in our exa mple) shall be close to the 'Heliacal set'. In the second case (e.g., a ran ge in the form 1 Jan to 20 May and 21 Sep to 31 Dec), the first date (20 Ma y in our example) would be close to the Heliacal set and the second one (21 Sep in our example) to the Heliacal rise. More exact equations to estimate the Heliacal rise/set of stars and planets (which will not depend on the m ere input of a twilight Sun elevation by the user) will be implemented in f uture versions of this plugin."));
html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Full Moon :")).arg(q_("When the Moon is selected, the program can compute the exact c losest dates of the Moon's opposition to the Sun.")); html += QString("<tr><td>%1</td><td>%2</td></tr>").arg(q_("Full Moon :")).arg(q_("When the Moon is selected, the program can compute the exact c losest dates of the Moon's opposition to the Sun."));
html += "</table>"; html += "</table>";
html += "</body></html>"; html += "</body></html>";
ui->aboutTextBrowser->setHtml(html); ui->aboutTextBrowser->setHtml(html);
} }
skipping to change at line 143 skipping to change at line 147
Vec3f currFont = GETSTELMODULE(Observability)->getFontColor(); Vec3f currFont = GETSTELMODULE(Observability)->getFontColor();
int Rv = (int)(100.*currFont[0]); int Rv = (int)(100.*currFont[0]);
int Gv = (int)(100.*currFont[1]); int Gv = (int)(100.*currFont[1]);
int Bv = (int)(100.*currFont[2]); int Bv = (int)(100.*currFont[2]);
ui->Red->setValue(Rv); ui->Red->setValue(Rv);
ui->Green->setValue(Gv); ui->Green->setValue(Gv);
ui->Blue->setValue(Bv); ui->Blue->setValue(Bv);
ui->fontSize->setValue(GETSTELMODULE(Observability)->getFontSize()); ui->fontSize->setValue(GETSTELMODULE(Observability)->getFontSize());
int SAlti = GETSTELMODULE(Observability)->getSunAltitude(); int SAlti = GETSTELMODULE(Observability)->getSunAltitude();
ui->SunAltitude->setValue(SAlti); ui->SunAltitude->setValue(SAlti);
ui->AltiText->setText(QString("-%1 %2").arg(SAlti).arg(q_("deg."))); ui->AltiText->setText(QString("%1 -%2 %3").arg(q_("Sun altitude at t
wilight:")).arg(SAlti).arg(q_("deg.")));
SAlti = GETSTELMODULE(Observability)->getHorizAltitude();
ui->HorizAltitude->setValue(SAlti);
ui->HorizText->setText(QString("%1 %2 %3").arg(q_("Horizon altitude:
")).arg(SAlti).arg(q_("deg.")));
} }
void ObservabilityDialog::saveSettings(void) void ObservabilityDialog::saveSettings(void)
{ {
GETSTELMODULE(Observability)->saveSettingsToConfig(); GETSTELMODULE(Observability)->saveSettingsToConfig();
} }
void ObservabilityDialog::setTodayFlag(int checkState) void ObservabilityDialog::setTodayFlag(int checkState)
{ {
bool b = checkState != Qt::Unchecked; bool b = checkState != Qt::Unchecked;
skipping to change at line 215 skipping to change at line 224
GETSTELMODULE(Observability)->setFontColor(2,Value); GETSTELMODULE(Observability)->setFontColor(2,Value);
} }
void ObservabilityDialog::setSize(int Value) void ObservabilityDialog::setSize(int Value)
{ {
GETSTELMODULE(Observability)->setFontSize(Value); GETSTELMODULE(Observability)->setFontSize(Value);
} }
void ObservabilityDialog::setAltitude(int Value) void ObservabilityDialog::setAltitude(int Value)
{ {
ui->AltiText->setText(QString("-%1 %2").arg(Value).arg(q_("deg."))); ui->AltiText->setText(QString("%1 -%2 %3").arg(q_("Sun altitude at t wilight:")).arg(Value).arg(q_("deg.")));
GETSTELMODULE(Observability)->setSunAltitude(Value); GETSTELMODULE(Observability)->setSunAltitude(Value);
} }
void ObservabilityDialog::setHorizon(int Value)
{
ui->HorizText->setText(QString("%1 %2 %3").arg(q_("Horizon altitude:
")).arg(Value).arg(q_("deg.")));
GETSTELMODULE(Observability)->setHorizAltitude(Value);
}
 End of changes. 6 change blocks. 
3 lines changed or deleted 16 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/