SatellitesDialog.cpp   SatellitesDialog.cpp 
skipping to change at line 51 skipping to change at line 51
#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 "StelActionMgr.hpp" #include "StelActionMgr.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
SatellitesDialog::SatellitesDialog() SatellitesDialog::SatellitesDialog()
: satelliteModified(false) : StelDialog("Satellites")
, satelliteModified(false)
, updateTimer(0) , updateTimer(0)
, importWindow(0) , importWindow(0)
, filterModel(0) , filterModel(0)
, checkStateRole(Qt::UserRole) , checkStateRole(Qt::UserRole)
{ {
ui = new Ui_satellitesDialog; ui = new Ui_satellitesDialog;
dialogName = "Satellites";
} }
SatellitesDialog::~SatellitesDialog() SatellitesDialog::~SatellitesDialog()
{ {
if (updateTimer) if (updateTimer)
{ {
updateTimer->stop(); updateTimer->stop();
delete updateTimer; delete updateTimer;
updateTimer = NULL; updateTimer = NULL;
} }
skipping to change at line 228 skipping to change at line 228
// bug #1350669 (https://bugs.launchpad.net/stellarium/+bug/1350669) // bug #1350669 (https://bugs.launchpad.net/stellarium/+bug/1350669)
connect(ui->sourceList, SIGNAL(currentRowChanged(int)), ui->sourceLi st, SLOT(repaint())); connect(ui->sourceList, SIGNAL(currentRowChanged(int)), ui->sourceLi st, SLOT(repaint()));
// About tab // About tab
populateAboutPage(); populateAboutPage();
populateFilterMenu(); populateFilterMenu();
populateSourcesList(); populateSourcesList();
initListIridiumFlares(); initListIridiumFlares();
ui->flaresPredictionDepthSpinBox->setValue(plugin->getIridiumFlaresP
redictionDepth());
connect(ui->flaresPredictionDepthSpinBox, SIGNAL(valueChanged(int)),
plugin, SLOT(setIridiumFlaresPredictionDepth(int)));
connect(ui->pushButtonPredictIridiumFlares, SIGNAL(clicked()), this, SLOT(predictIridiumFlares())); connect(ui->pushButtonPredictIridiumFlares, SIGNAL(clicked()), this, SLOT(predictIridiumFlares()));
connect(ui->iridiumFlaresTreeWidget, SIGNAL(doubleClicked(QModelInde x)), this, SLOT(selectCurrentIridiumFlare(QModelIndex))); connect(ui->iridiumFlaresTreeWidget, SIGNAL(doubleClicked(QModelInde x)), this, SLOT(selectCurrentIridiumFlare(QModelIndex)));
} }
void SatellitesDialog::filterListByGroup(int index) void SatellitesDialog::filterListByGroup(int index)
{ {
if (index < 0) if (index < 0)
return; return;
QString groupId = ui->groupFilterCombo->itemData(index).toString(); QString groupId = ui->groupFilterCombo->itemData(index).toString();
skipping to change at line 994 skipping to change at line 996
} }
for(int i = 0; i < IridiumFlaresCount; ++i) for(int i = 0; i < IridiumFlaresCount; ++i)
{ {
ui->iridiumFlaresTreeWidget->resizeColumnToContents(i); ui->iridiumFlaresTreeWidget->resizeColumnToContents(i);
} }
} }
void SatellitesDialog::selectCurrentIridiumFlare(const QModelIndex &modelIn dex) void SatellitesDialog::selectCurrentIridiumFlare(const QModelIndex &modelIn dex)
{ {
StelCore* core = StelApp::getInstance().getCore();
// Find the object // Find the object
QString name = modelIndex.sibling(modelIndex.row(), IridiumFlaresSat ellite).data().toString(); QString name = modelIndex.sibling(modelIndex.row(), IridiumFlaresSat ellite).data().toString();
QString date = modelIndex.sibling(modelIndex.row(), IridiumFlaresDat e).data().toString(); QString date = modelIndex.sibling(modelIndex.row(), IridiumFlaresDat e).data().toString();
bool ok; bool ok;
double JD = StelUtils::getJulianDayFromISO8601String(date.left(10) + "T" + date.right(8), &ok); double JD = StelUtils::getJulianDayFromISO8601String(date.left(10) + "T" + date.right(8), &ok);
JD -= StelApp::getInstance().getCore()->getUTCOffset(JD)/24.; JD -= core->getUTCOffset(JD)/24.;
JD -= core->JD_SECOND*15; // Set start point on 15 seconds before fl
ash (TODO: should be an option in the GUI?)
StelObjectMgr* objectMgr = GETSTELMODULE(StelObjectMgr); StelObjectMgr* objectMgr = GETSTELMODULE(StelObjectMgr);
if (objectMgr->findAndSelectI18n(name) || objectMgr->findAndSelect(n ame)) if (objectMgr->findAndSelectI18n(name) || objectMgr->findAndSelect(n ame))
{ {
StelApp::getInstance().getCore()->setJD(JD); StelApp::getInstance().getCore()->setJD(JD);
const QList<StelObjectP> newSelected = objectMgr->getSelecte dObject(); const QList<StelObjectP> newSelected = objectMgr->getSelecte dObject();
if (!newSelected.empty()) if (!newSelected.empty())
{ {
StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementM gr); StelMovementMgr* mvmgr = GETSTELMODULE(StelMovementM gr);
mvmgr->moveToObject(newSelected[0], mvmgr->getAutoMo veDuration()); mvmgr->moveToObject(newSelected[0], mvmgr->getAutoMo veDuration());
 End of changes. 5 change blocks. 
3 lines changed or deleted 10 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/