SearchDialog.cpp   SearchDialog.cpp 
skipping to change at line 29 skipping to change at line 29
#include "Dialog.hpp" #include "Dialog.hpp"
#include "SearchDialog.hpp" #include "SearchDialog.hpp"
#include "ui_searchDialogGui.h" #include "ui_searchDialogGui.h"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "Planet.hpp"
#include "StelObjectMgr.hpp" #include "StelObjectMgr.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include <QDebug> #include <QDebug>
#include <QFrame> #include <QFrame>
#include <QLabel> #include <QLabel>
#include <QPushButton> #include <QPushButton>
#include <QSettings> #include <QSettings>
skipping to change at line 236 skipping to change at line 237
csys->blockSignals(true); csys->blockSignals(true);
int index = csys->currentIndex(); int index = csys->currentIndex();
QVariant selectedSystemId = csys->itemData(index); QVariant selectedSystemId = csys->itemData(index);
csys->clear(); csys->clear();
//For each coordinate system, display the localized name and store t he key as user //For each coordinate system, display the localized name and store t he key as user
//data. Unfortunately, there's no other way to do this than with a c ycle. //data. Unfortunately, there's no other way to do this than with a c ycle.
csys->addItem(qc_("Equatorial (J2000.0)", "coordinate system"), "equ atorialJ2000"); csys->addItem(qc_("Equatorial (J2000.0)", "coordinate system"), "equ atorialJ2000");
csys->addItem(qc_("Equatorial", "coordinate system"), "equatorial"); csys->addItem(qc_("Equatorial", "coordinate system"), "equatorial");
csys->addItem(qc_("Horizontal", "coordinate system"), "horizontal"); csys->addItem(qc_("Horizontal", "coordinate system"), "horizontal");
csys->addItem(qc_("Galactic", "coordinate system"), "galactic"); csys->addItem(qc_("Galactic", "coordinate system"), "galactic");
csys->addItem(qc_("Ecliptic", "coordinate system"), "ecliptic");
csys->addItem(qc_("Ecliptic (J2000.0)", "coordinate system"), "eclip
ticJ2000");
//Restore the selection //Restore the selection
index = csys->findData(selectedSystemId, Qt::UserRole, Qt::MatchCase Sensitive); index = csys->findData(selectedSystemId, Qt::UserRole, Qt::MatchCase Sensitive);
csys->setCurrentIndex(index); csys->setCurrentIndex(index);
csys->blockSignals(false); csys->blockSignals(false);
} }
void SearchDialog::populateCoordinateAxis() void SearchDialog::populateCoordinateAxis()
{ {
bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDe grees();; bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDe grees();;
skipping to change at line 275 skipping to change at line 278
{ {
ui->AxisXLabel->setText(q_("Azimuth")); ui->AxisXLabel->setText(q_("Azimuth"));
ui->AxisXSpinBox->setDisplayFormat(AngleSpinBox::DMS SymbolsUnsigned); ui->AxisXSpinBox->setDisplayFormat(AngleSpinBox::DMS SymbolsUnsigned);
ui->AxisXSpinBox->setPrefixType(AngleSpinBox::Normal Plus); ui->AxisXSpinBox->setPrefixType(AngleSpinBox::Normal Plus);
ui->AxisYLabel->setText(q_("Altitude")); ui->AxisYLabel->setText(q_("Altitude"));
ui->AxisYSpinBox->setDisplayFormat(AngleSpinBox::DMS Symbols); ui->AxisYSpinBox->setDisplayFormat(AngleSpinBox::DMS Symbols);
ui->AxisYSpinBox->setPrefixType(AngleSpinBox::Normal Plus); ui->AxisYSpinBox->setPrefixType(AngleSpinBox::Normal Plus);
xnormal = false; xnormal = false;
break; break;
} }
case ecliptic:
case eclipticJ2000:
case galactic: case galactic:
{ {
ui->AxisXLabel->setText(q_("Longitude")); ui->AxisXLabel->setText(q_("Longitude"));
ui->AxisXSpinBox->setDisplayFormat(AngleSpinBox::DMS SymbolsUnsigned); ui->AxisXSpinBox->setDisplayFormat(AngleSpinBox::DMS SymbolsUnsigned);
ui->AxisXSpinBox->setPrefixType(AngleSpinBox::Normal Plus); ui->AxisXSpinBox->setPrefixType(AngleSpinBox::Normal Plus);
ui->AxisYLabel->setText(q_("Latitude")); ui->AxisYLabel->setText(q_("Latitude"));
ui->AxisYSpinBox->setDisplayFormat(AngleSpinBox::DMS Symbols); ui->AxisYSpinBox->setDisplayFormat(AngleSpinBox::DMS Symbols);
ui->AxisYSpinBox->setPrefixType(AngleSpinBox::Normal Plus); ui->AxisYSpinBox->setPrefixType(AngleSpinBox::Normal Plus);
xnormal = false; xnormal = false;
break; break;
skipping to change at line 465 skipping to change at line 470
StelUtils::spheToRect(cx, ui->AxisYSpinBox->valueRad ians(), pos); StelUtils::spheToRect(cx, ui->AxisYSpinBox->valueRad ians(), pos);
pos = core->altAzToJ2000(pos); pos = core->altAzToJ2000(pos);
break; break;
} }
case galactic: case galactic:
{ {
StelUtils::spheToRect(ui->AxisXSpinBox->valueRadians (), ui->AxisYSpinBox->valueRadians(), pos); StelUtils::spheToRect(ui->AxisXSpinBox->valueRadians (), ui->AxisYSpinBox->valueRadians(), pos);
pos = core->galacticToJ2000(pos); pos = core->galacticToJ2000(pos);
break; break;
} }
case eclipticJ2000:
{
double ra, dec;
StelUtils::eclToEqu(ui->AxisXSpinBox->valueRadians()
, ui->AxisYSpinBox->valueRadians(), core->getCurrentPlanet()->getRotObliqui
ty(2451545.0), &ra, &dec);
StelUtils::spheToRect(ra, dec, pos);
break;
}
case ecliptic:
{
double ra, dec;
StelUtils::eclToEqu(ui->AxisXSpinBox->valueRadians()
, ui->AxisYSpinBox->valueRadians(), core->getCurrentPlanet()->getRotObliqui
ty(core->getJDE()), &ra, &dec);
StelUtils::spheToRect(ra, dec, pos);
pos = core->equinoxEquToJ2000(pos);
break;
}
} }
mvmgr->setFlagTracking(false); mvmgr->setFlagTracking(false);
mvmgr->moveToJ2000(pos, 0.05); mvmgr->moveToJ2000(pos, 0.05);
} }
void SearchDialog::onSearchTextChanged(const QString& text) void SearchDialog::onSearchTextChanged(const QString& text)
{ {
// This block needs to go before the trimmedText.isEmpty() or the SI MBAD result does not // This block needs to go before the trimmedText.isEmpty() or the SI MBAD result does not
// get properly cleared. // get properly cleared.
if (useSimbad) { if (useSimbad) {
 End of changes. 4 change blocks. 
0 lines changed or deleted 25 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/