SatellitesDialog.cpp   SatellitesDialog.cpp 
skipping to change at line 93 skipping to change at line 93
ui->groupsCombo->setCurrentIndex(index); ui->groupsCombo->setCurrentIndex(index);
} }
} }
// Initialize the dialog widgets and connect the signals/slots // Initialize the dialog widgets and connect the signals/slots
void SatellitesDialog::createDialogContent() void SatellitesDialog::createDialogContent()
{ {
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()));
// Settings tab / updates group // Settings tab / updates group
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(updateTLEs() )); connect(ui->updateButton, SIGNAL(clicked()), this, SLOT(updateTLEs() ));
connect(GETSTELMODULE(Satellites), SIGNAL(updateStateChanged(Satelli tes::UpdateState)), this, SLOT(updateStateReceiver(Satellites::UpdateState) )); connect(GETSTELMODULE(Satellites), SIGNAL(updateStateChanged(Satelli tes::UpdateState)), this, SLOT(updateStateReceiver(Satellites::UpdateState) ));
connect(GETSTELMODULE(Satellites), SIGNAL(tleUpdateComplete(int, int , int)), this, SLOT(updateCompleteReceiver(int, int, int))); connect(GETSTELMODULE(Satellites), SIGNAL(tleUpdateComplete(int, int , int)), this, SLOT(updateCompleteReceiver(int, int, int)));
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())) ;
// Settings tab / General settings group // Settings tab / General settings group
connect(ui->labelsGroup, SIGNAL(toggled(bool)), StelApp::getInstance ().getGui()->getGuiActions("actionShow_Satellite_Labels"), SLOT(setChecked( bool))); connect(ui->labelsGroup, SIGNAL(toggled(bool)), dynamic_cast<StelGui *>(StelApp::getInstance().getGui())->getGuiAction("actionShow_Satellite_Lab els"), SLOT(setChecked(bool)));
connect(ui->fontSizeSpinBox, SIGNAL(valueChanged(int)), GETSTELMODUL E(Satellites), SLOT(setLabelFontSize(int))); connect(ui->fontSizeSpinBox, SIGNAL(valueChanged(int)), GETSTELMODUL E(Satellites), SLOT(setLabelFontSize(int)));
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()));
// Settings tab / orbit lines group // Settings tab / orbit lines group
ui->orbitLinesGroup->setChecked(GETSTELMODULE(Satellites)->getOrbitL inesFlag()); ui->orbitLinesGroup->setChecked(GETSTELMODULE(Satellites)->getOrbitL inesFlag());
ui->orbitSegmentsSpin->setValue(Satellite::orbitLineSegments); ui->orbitSegmentsSpin->setValue(Satellite::orbitLineSegments);
ui->orbitFadeSpin->setValue(Satellite::orbitLineFadeSegments); ui->orbitFadeSpin->setValue(Satellite::orbitLineFadeSegments);
ui->orbitDurationSpin->setValue(Satellite::orbitLineSegmentDuration) ; ui->orbitDurationSpin->setValue(Satellite::orbitLineSegmentDuration) ;
skipping to change at line 148 skipping to change at line 148
this, SLOT(updateSelectedInfo(QModelIndex,QModelIndex))); this, SLOT(updateSelectedInfo(QModelIndex,QModelIndex)));
connect(ui->satellitesList, SIGNAL(doubleClicked(QModelIndex)), connect(ui->satellitesList, SIGNAL(doubleClicked(QModelIndex)),
this, SLOT(handleDoubleClick(QModelIndex))); this, SLOT(handleDoubleClick(QModelIndex)));
connect(ui->groupsCombo, SIGNAL(currentIndexChanged(int)), this, SLO T(listSatelliteGroup(int))); connect(ui->groupsCombo, SIGNAL(currentIndexChanged(int)), this, SLO T(listSatelliteGroup(int)));
connect(ui->saveSatellitesButton, SIGNAL(clicked()), this, SLOT(save Satellites())); connect(ui->saveSatellitesButton, SIGNAL(clicked()), this, SLOT(save Satellites()));
connect(ui->removeSatellitesButton, SIGNAL(clicked()), this, SLOT(re moveSatellites())); connect(ui->removeSatellitesButton, SIGNAL(clicked()), this, SLOT(re moveSatellites()));
connectSatelliteGuiForm(); connectSatelliteGuiForm();
importWindow = new SatellitesImportDialog(); importWindow = new SatellitesImportDialog();
connect(ui->addSatellitesButton, SIGNAL(clicked()), connect(ui->addSatellitesButton, SIGNAL(clicked()),
importWindow, SLOT(setVisible())); importWindow, SLOT(setVisible()));
connect(importWindow, SIGNAL(satellitesAccepted(TleDataList)), connect(importWindow, SIGNAL(satellitesAccepted(TleDataList)),
this, SLOT(addSatellites(TleDataList))); this, SLOT(addSatellites(TleDataList )));
// Sources tab // Sources tab
connect(ui->sourceList, SIGNAL(currentTextChanged(const QString&)), ui->sourceEdit, SLOT(setText(const QString&))); connect(ui->sourceList, SIGNAL(currentTextChanged(const QString&)), ui->sourceEdit, SLOT(setText(const QString&)));
connect(ui->sourceEdit, SIGNAL(editingFinished()), this, SLOT(source EditingDone())); connect(ui->sourceEdit, SIGNAL(editingFinished()), this, SLOT(source EditingDone()));
connect(ui->deleteSourceButton, SIGNAL(clicked()), this, SLOT(delete SourceRow())); connect(ui->deleteSourceButton, SIGNAL(clicked()), this, SLOT(delete SourceRow()));
connect(ui->addSourceButton, SIGNAL(clicked()), this, SLOT(addSource Row())); connect(ui->addSourceButton, SIGNAL(clicked()), this, SLOT(addSource Row()));
// About tab // About tab
setAboutHtml(); setAboutHtml();
skipping to change at line 298 skipping to change at line 298
html += "<tr><td>Jose Luis Canales &lt;jlcanales.gasco@gmail.com&gt; </td></tr></table>"; html += "<tr><td>Jose Luis Canales &lt;jlcanales.gasco@gmail.com&gt; </td></tr></table>";
html += "<p>" + q_("The Satellites plugin predicts the positions of artificial satellites in Earth orbit.") + "</p>"; html += "<p>" + q_("The Satellites plugin predicts the positions of artificial satellites in Earth orbit.") + "</p>";
html += "<h3>" + q_("Notes for users") + "</h3><p><ul>"; html += "<h3>" + q_("Notes for users") + "</h3><p><ul>";
html += "<li>" + q_("Satellites and their orbits are only shown when the observer is on Earth.") + "</li>"; html += "<li>" + q_("Satellites and their orbits are only shown when the observer is on Earth.") + "</li>";
html += "<li>" + q_("Predicted positions are only good for a fairly short time (on the order of days, weeks or perhaps a month into the past an d future). Expect high weirdness when looking at dates outside this range." ) + "</li>"; html += "<li>" + q_("Predicted positions are only good for a fairly short time (on the order of days, weeks or perhaps a month into the past an d future). Expect high weirdness when looking at dates outside this range." ) + "</li>";
html += "<li>" + q_("Orbital elements go out of date pretty quickly (over mere weeks, sometimes days). To get useful data out, you need to upd ate the TLE data regularly.") + "</li>"; html += "<li>" + q_("Orbital elements go out of date pretty quickly (over mere weeks, sometimes days). To get useful data out, you need to upd ate the TLE data regularly.") + "</li>";
// TRANSLATORS: The translated names of the button and the tab are f illed in automatically. You can check the original names in Stellarium. Fil e names are not translated. // TRANSLATORS: The translated names of the button and the tab are f illed in automatically. You can check the original names in Stellarium. Fil e names are not translated.
QString resetSettingsText = QString(q_("Clicking the \"%1\" button i n the \"%2\" tab of this dialog will revert to the default %3 file. The ol d file will be backed up as %4. This can be found in the user data directo ry, under \"modules/Satellites/\".")) QString resetSettingsText = QString(q_("Clicking the \"%1\" button i n the \"%2\" tab of this dialog will revert to the default %3 file. The ol d file will be backed up as %4. This can be found in the user data directo ry, under \"modules/Satellites/\"."))
.arg(ui->restoreDefaultsButton->text()) .arg(ui->restoreDefaultsButton->text())
.arg(ui->tabs->tabText(ui->tabs->indexOf(ui->settingsTab))) .arg(ui->tabs->tabText(ui->tabs->indexOf(ui->setting
.arg(jsonFileName) sTab)))
.arg(oldJsonFileName); .arg(jsonFileName)
.arg(oldJsonFileName);
html += "<li>" + resetSettingsText + "</li>"; html += "<li>" + resetSettingsText + "</li>";
html += "<li>" + q_("The Satellites plugin is still under developmen t. Some features are incomplete, missing or buggy.") + "</li>"; html += "<li>" + q_("The Satellites plugin is still under developmen t. Some features are incomplete, missing or buggy.") + "</li>";
html += "</ul></p>"; html += "</ul></p>";
// TRANSLATORS: Title of a section in the About tab of the Satellite s window // TRANSLATORS: Title of a section in the About tab of the Satellite s window
html += "<h3>" + q_("TLE data updates") + "</h3>"; html += "<h3>" + q_("TLE data updates") + "</h3>";
html += "<p>" + q_("The Satellites plugin can automatically download TLE data from Internet sources, and by default the plugin will do this if the existing data is more than 72 hours old. "); html += "<p>" + q_("The Satellites plugin can automatically download TLE data from Internet sources, and by default the plugin will do this if the existing data is more than 72 hours old. ");
html += "</p><p>" + QString(q_("If you disable Internet updates, you may update from a file on your computer. This file must be in the same fo rmat as the Celestrak updates (see %1 for an example).").arg("<a href=\"htt p://celestrak.com/NORAD/elements/visual.txt\">visual.txt</a>")); html += "</p><p>" + QString(q_("If you disable Internet updates, you may update from a file on your computer. This file must be in the same fo rmat as the Celestrak updates (see %1 for an example).").arg("<a href=\"htt p://celestrak.com/NORAD/elements/visual.txt\">visual.txt</a>"));
html += "</p><p>" + q_("<b>Note:</b> if the name of a satellite in u pdate data has anything in square brackets at the end, it will be removed b efore the data is used."); html += "</p><p>" + q_("<b>Note:</b> if the name of a satellite in u pdate data has anything in square brackets at the end, it will be removed b efore the data is used.");
html += "</p>"; html += "</p>";
skipping to change at line 498 skipping to change at line 498
ui->groupsCombo->insertItem(0, q_("[orbit calculation error]"), QVar iant("orbiterror")); ui->groupsCombo->insertItem(0, q_("[orbit calculation error]"), QVar iant("orbiterror"));
ui->groupsCombo->insertItem(0, q_("[all newly added]"), QVariant("ne wlyadded")); ui->groupsCombo->insertItem(0, q_("[all newly added]"), QVariant("ne wlyadded"));
ui->groupsCombo->insertItem(0, q_("[all not displayed]"), QVariant(" notvisible")); ui->groupsCombo->insertItem(0, q_("[all not displayed]"), QVariant(" notvisible"));
ui->groupsCombo->insertItem(0, q_("[all displayed]"), QVariant("visi ble")); ui->groupsCombo->insertItem(0, q_("[all displayed]"), QVariant("visi ble"));
ui->groupsCombo->insertItem(0, q_("[all]"), QVariant("all")); ui->groupsCombo->insertItem(0, q_("[all]"), QVariant("all"));
} }
void SatellitesDialog::saveSettings(void) void SatellitesDialog::saveSettings(void)
{ {
GETSTELMODULE(Satellites)->saveSettingsToConfig(); GETSTELMODULE(Satellites)->saveSettingsToConfig();
GETSTELMODULE(Satellites)->saveTleData();
} }
void SatellitesDialog::addSatellites(const TleDataList& newSatellites) void SatellitesDialog::addSatellites(const TleDataList& newSatellites)
{ {
GETSTELMODULE(Satellites)->add(newSatellites); GETSTELMODULE(Satellites)->add(newSatellites);
saveSatellites(); saveSatellites();
// Trigger re-loading the list to display the new satellites // Trigger re-loading the list to display the new satellites
int index = ui->groupsCombo->findData(QVariant("newlyadded")); int index = ui->groupsCombo->findData(QVariant("newlyadded"));
if (ui->groupsCombo->currentIndex() == index) if (ui->groupsCombo->currentIndex() == index)
skipping to change at line 601 skipping to change at line 602
if (!sat->orbitValid) if (!sat->orbitValid)
return; return;
// Turn on Satellite rendering if it is not already on // Turn on Satellite rendering if it is not already on
sat->visible = true; sat->visible = true;
// If Satellites are not currently displayed, make them visible. // If Satellites are not currently displayed, make them visible.
if (!SatellitesMgr->getFlagHints()) if (!SatellitesMgr->getFlagHints())
{ {
StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance() .getGui()); StelGui* gui = dynamic_cast<StelGui*>(StelApp::getInstance() .getGui());
QAction* setHintsAction = gui->getGuiActions("actionShow_Sat ellite_Hints"); QAction* setHintsAction = gui->getGuiAction("actionShow_Sate llite_Hints");
Q_ASSERT(setHintsAction); Q_ASSERT(setHintsAction);
setHintsAction->setChecked(true); setHintsAction->setChecked(true);
} }
StelObjectP obj = qSharedPointerDynamicCast<StelObject>(sat); StelObjectP obj = qSharedPointerDynamicCast<StelObject>(sat);
StelObjectMgr& objectMgr = StelApp::getInstance().getStelObjectMgr() ; StelObjectMgr& objectMgr = StelApp::getInstance().getStelObjectMgr() ;
if (objectMgr.setSelectedObject(obj)) if (objectMgr.setSelectedObject(obj))
{ {
GETSTELMODULE(StelMovementMgr)->autoZoomIn(); GETSTELMODULE(StelMovementMgr)->autoZoomIn();
GETSTELMODULE(StelMovementMgr)->setFlagTracking(true); GETSTELMODULE(StelMovementMgr)->setFlagTracking(true);
 End of changes. 7 change blocks. 
9 lines changed or deleted 11 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/