SearchDialog.cpp   SearchDialog.cpp 
skipping to change at line 31 skipping to change at line 31
#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 "StelObjectMgr.hpp" #include "StelObjectMgr.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>
#include <QString> #include <QString>
#include <QStringList> #include <QStringList>
#include <QtAlgorithms> #include <QtAlgorithms>
skipping to change at line 244 skipping to change at line 245
csys->addItem(qc_("Galactic", "coordinate system"), "galactic"); csys->addItem(qc_("Galactic", "coordinate system"), "galactic");
//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 xnormal = true;
ui->AxisXSpinBox->setDecimals(2);
ui->AxisYSpinBox->setDecimals(2);
switch (getCurrentCoordinateSystem()) { switch (getCurrentCoordinateSystem()) {
case equatorialJ2000: case equatorialJ2000:
case equatorial: case equatorial:
{ {
ui->AxisXLabel->setText(q_("Right ascension")); ui->AxisXLabel->setText(q_("Right ascension"));
ui->AxisXSpinBox->setDisplayFormat(AngleSpinBox::HMS Letters); ui->AxisXSpinBox->setDisplayFormat(AngleSpinBox::HMS Letters);
ui->AxisXSpinBox->setPrefixType(AngleSpinBox::Normal );
ui->AxisYLabel->setText(q_("Declination")); ui->AxisYLabel->setText(q_("Declination"));
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 = true;
break; break;
} }
case horizontal: case horizontal:
{ {
ui->AxisXLabel->setText(q_("Azimuth")); ui->AxisXLabel->setText(q_("Azimuth"));
ui->AxisXSpinBox->setDisplayFormat(AngleSpinBox::DMS Letters); 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;
break; break;
} }
case galactic: case galactic:
{ {
ui->AxisXLabel->setText(q_("Longitude")); ui->AxisXLabel->setText(q_("Longitude"));
ui->AxisXSpinBox->setDisplayFormat(AngleSpinBox::DMS Letters); 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;
break; break;
} }
} }
if (withDecimalDegree)
{
ui->AxisXSpinBox->setDecimals(5);
ui->AxisYSpinBox->setDecimals(5);
ui->AxisXSpinBox->setDisplayFormat(AngleSpinBox::DecimalDeg)
;
ui->AxisYSpinBox->setDisplayFormat(AngleSpinBox::DecimalDeg)
;
ui->AxisXSpinBox->setPrefixType(AngleSpinBox::NormalPlus);
}
else
{
if (xnormal)
ui->AxisXSpinBox->setPrefixType(AngleSpinBox::Normal
);
}
} }
void SearchDialog::setCoordinateSystem(int csID) void SearchDialog::setCoordinateSystem(int csID)
{ {
QString currentCoordinateSystemID = ui->coordinateSystemComboBox->it emData(csID).toString(); QString currentCoordinateSystemID = ui->coordinateSystemComboBox->it emData(csID).toString();
setCurrentCoordinateSystemKey(currentCoordinateSystemID); setCurrentCoordinateSystemKey(currentCoordinateSystemID);
populateCoordinateAxis(); populateCoordinateAxis();
ui->AxisXSpinBox->setRadians(0.); ui->AxisXSpinBox->setRadians(0.);
ui->AxisYSpinBox->setRadians(0.); ui->AxisYSpinBox->setRadians(0.);
conf->setValue("search/coordinate_system", currentCoordinateSystemID ); conf->setValue("search/coordinate_system", currentCoordinateSystemID );
 End of changes. 9 change blocks. 
2 lines changed or deleted 32 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/