AstroCalcDialog.cpp   AstroCalcDialog.cpp 
skipping to change at line 37 skipping to change at line 37
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include "SolarSystem.hpp" #include "SolarSystem.hpp"
#include "Planet.hpp" #include "Planet.hpp"
#include "NebulaMgr.hpp" #include "NebulaMgr.hpp"
#include "Nebula.hpp" #include "Nebula.hpp"
#include "AstroCalcDialog.hpp" #include "AstroCalcDialog.hpp"
#include "ui_astroCalcDialog.h" #include "ui_astroCalcDialog.h"
#include "qcustomplot/qcustomplot.h" #include "external/qcustomplot/qcustomplot.h"
#include <QFileDialog> #include <QFileDialog>
#include <QDir> #include <QDir>
QVector<Vec3d> AstroCalcDialog::EphemerisListJ2000; QVector<Vec3d> AstroCalcDialog::EphemerisListJ2000;
QVector<QString> AstroCalcDialog::EphemerisListDates; QVector<QString> AstroCalcDialog::EphemerisListDates;
int AstroCalcDialog::DisplayedPositionIndex = -1; int AstroCalcDialog::DisplayedPositionIndex = -1;
float AstroCalcDialog::brightLimit = 10.f; float AstroCalcDialog::brightLimit = 10.f;
float AstroCalcDialog::minY = -90.f; float AstroCalcDialog::minY = -90.f;
float AstroCalcDialog::maxY = 90.f; float AstroCalcDialog::maxY = 90.f;
AstroCalcDialog::AstroCalcDialog(QObject *parent) AstroCalcDialog::AstroCalcDialog(QObject *parent)
: StelDialog(parent) : StelDialog("AstroCalc",parent)
, currentTimeLine(NULL) , currentTimeLine(NULL)
, delimiter(", ") , delimiter(", ")
, acEndl("\n") , acEndl("\n")
{ {
dialogName = "AstroCalc";
ui = new Ui_astroCalcDialogForm; ui = new Ui_astroCalcDialogForm;
core = StelApp::getInstance().getCore(); core = StelApp::getInstance().getCore();
solarSystem = GETSTELMODULE(SolarSystem); solarSystem = GETSTELMODULE(SolarSystem);
dsoMgr = GETSTELMODULE(NebulaMgr); dsoMgr = GETSTELMODULE(NebulaMgr);
objectMgr = GETSTELMODULE(StelObjectMgr); objectMgr = GETSTELMODULE(StelObjectMgr);
starMgr = GETSTELMODULE(StarMgr); starMgr = GETSTELMODULE(StarMgr);
ephemerisHeader.clear(); ephemerisHeader.clear();
phenomenaHeader.clear(); phenomenaHeader.clear();
planetaryPositionsHeader.clear(); planetaryPositionsHeader.clear();
} }
skipping to change at line 142 skipping to change at line 141
prepareAxesAndGraph(); prepareAxesAndGraph();
drawCurrentTimeDiagram(); drawCurrentTimeDiagram();
double JD = core->getJD() + core->getUTCOffset(core->getJD())/24; double JD = core->getJD() + core->getUTCOffset(core->getJD())/24;
QDateTime currentDT = StelUtils::jdToQDateTime(JD); QDateTime currentDT = StelUtils::jdToQDateTime(JD);
ui->dateFromDateTimeEdit->setDateTime(currentDT); ui->dateFromDateTimeEdit->setDateTime(currentDT);
ui->dateToDateTimeEdit->setDateTime(currentDT.addMonths(1)); ui->dateToDateTimeEdit->setDateTime(currentDT.addMonths(1));
ui->phenomenFromDateEdit->setDateTime(currentDT); ui->phenomenFromDateEdit->setDateTime(currentDT);
ui->phenomenToDateEdit->setDateTime(currentDT.addYears(1)); ui->phenomenToDateEdit->setDateTime(currentDT.addYears(1));
// TODO: Switch a QDateTimeEdit to StelDateTimeEdit widget to apply
wide range of dates
QDate min = QDate(100,1,1);
ui->dateFromDateTimeEdit->setMinimumDate(min);
ui->dateToDateTimeEdit->setMinimumDate(min);
ui->phenomenFromDateEdit->setMinimumDate(min);
ui->phenomenToDateEdit->setMinimumDate(min);
// bug #1350669 (https://bugs.launchpad.net/stellarium/+bug/1350669) // bug #1350669 (https://bugs.launchpad.net/stellarium/+bug/1350669)
connect(ui->planetaryPositionsTreeWidget, SIGNAL(currentItemChanged( QTreeWidgetItem*,QTreeWidgetItem*)), connect(ui->planetaryPositionsTreeWidget, SIGNAL(currentItemChanged( QTreeWidgetItem*,QTreeWidgetItem*)),
ui->planetaryPositionsTreeWidget, SLOT(repaint())); ui->planetaryPositionsTreeWidget, SLOT(repaint()));
connect(ui->planetaryPositionsTreeWidget, SIGNAL(doubleClicked(QMode lIndex)), this, SLOT(selectCurrentPlanetaryPosition(QModelIndex))); connect(ui->planetaryPositionsTreeWidget, SIGNAL(doubleClicked(QMode lIndex)), this, SLOT(selectCurrentPlanetaryPosition(QModelIndex)));
connect(ui->planetaryPositionsUpdateButton, SIGNAL(clicked()), this, SLOT(currentPlanetaryPositions())); connect(ui->planetaryPositionsUpdateButton, SIGNAL(clicked()), this, SLOT(currentPlanetaryPositions()));
connect(ui->ephemerisPushButton, SIGNAL(clicked()), this, SLOT(gener ateEphemeris())); connect(ui->ephemerisPushButton, SIGNAL(clicked()), this, SLOT(gener ateEphemeris()));
connect(ui->ephemerisCleanupButton, SIGNAL(clicked()), this, SLOT(cl eanupEphemeris())); connect(ui->ephemerisCleanupButton, SIGNAL(clicked()), this, SLOT(cl eanupEphemeris()));
connect(ui->ephemerisSaveButton, SIGNAL(clicked()), this, SLOT(saveE phemeris())); connect(ui->ephemerisSaveButton, SIGNAL(clicked()), this, SLOT(saveE phemeris()));
skipping to change at line 174 skipping to change at line 180
connectBoolProperty(ui->ephemerisShowMarkersCheckBox, "SolarSystem.e phemerisMarkersDisplayed"); connectBoolProperty(ui->ephemerisShowMarkersCheckBox, "SolarSystem.e phemerisMarkersDisplayed");
connectBoolProperty(ui->ephemerisShowDatesCheckBox, "SolarSystem.eph emerisDatesDisplayed"); connectBoolProperty(ui->ephemerisShowDatesCheckBox, "SolarSystem.eph emerisDatesDisplayed");
currentPlanetaryPositions(); currentPlanetaryPositions();
currentTimeLine = new QTimer(this); currentTimeLine = new QTimer(this);
connect(currentTimeLine, SIGNAL(timeout()), this, SLOT(drawCurrentTi meDiagram())); connect(currentTimeLine, SIGNAL(timeout()), this, SLOT(drawCurrentTi meDiagram()));
currentTimeLine->start(500); // Update 'now' line position every 0.5 seconds currentTimeLine->start(500); // Update 'now' line position every 0.5 seconds
connect(solarSystem, SIGNAL(solarSystemDataReloaded()), this, SLOT(u pdateSolarSystemData()));
connect(ui->stackListWidget, SIGNAL(currentItemChanged(QListWidgetIt em *, QListWidgetItem *)), this, SLOT(changePage(QListWidgetItem *, QListWi dgetItem*))); connect(ui->stackListWidget, SIGNAL(currentItemChanged(QListWidgetIt em *, QListWidgetItem *)), this, SLOT(changePage(QListWidgetItem *, QListWi dgetItem*)));
} }
void AstroCalcDialog::initListPlanetaryPositions() void AstroCalcDialog::initListPlanetaryPositions()
{ {
ui->planetaryPositionsTreeWidget->clear(); ui->planetaryPositionsTreeWidget->clear();
ui->planetaryPositionsTreeWidget->setColumnCount(ColumnCount); ui->planetaryPositionsTreeWidget->setColumnCount(ColumnCount);
setPlanetaryPositionsHeaderNames(); setPlanetaryPositionsHeaderNames();
ui->planetaryPositionsTreeWidget->header()->setSectionsMovable(false ); ui->planetaryPositionsTreeWidget->header()->setSectionsMovable(false );
} }
skipping to change at line 724 skipping to change at line 731
QString LT = StelUtils::jdToQDateTime(JD - core->get UTCOffset(JD)).toString("H:mm"); QString LT = StelUtils::jdToQDateTime(JD - core->get UTCOffset(JD)).toString("H:mm");
QString info; QString info;
if (graph->name()=="[Now]") if (graph->name()=="[Now]")
info = q_("Now is %1").arg(LT); info = q_("Now is %1").arg(LT);
else else
{ {
if (StelApp::getInstance().getFlagShowDecima lDegrees()) if (StelApp::getInstance().getFlagShowDecima lDegrees())
info = QString("%1<br />%2: %3<br /> %4: %5%6").arg(ui->altVsTimePlot->graph(0)->name(), q_("Local Time"), LT, q _("Altitude"), QString::number(y, 'f', 2), QChar(0x00B0)); info = QString("%1<br />%2: %3<br /> %4: %5%6").arg(ui->altVsTimePlot->graph(0)->name(), q_("Local Time"), LT, q _("Altitude"), QString::number(y, 'f', 2), QChar(0x00B0));
else else
info = QString("%1<br />%2: %3<br /> %4: %5%6").arg(ui->altVsTimePlot->graph(0)->name(), q_("Local Time"), LT, q _("Altitude"), StelUtils::decDegToDmsStr(y), QChar(0x00B0)); info = QString("%1<br />%2: %3<br /> %4: %5").arg(ui->altVsTimePlot->graph(0)->name(), q_("Local Time"), LT, q_( "Altitude"), StelUtils::decDegToDmsStr(y));
} }
QToolTip::hideText(); QToolTip::hideText();
QToolTip::showText(event->globalPos(), info, ui->alt VsTimePlot, ui->altVsTimePlot->rect()); QToolTip::showText(event->globalPos(), info, ui->alt VsTimePlot, ui->altVsTimePlot->rect());
} }
else else
QToolTip::hideText(); QToolTip::hideText();
} }
ui->altVsTimePlot->update(); ui->altVsTimePlot->update();
skipping to change at line 1530 skipping to change at line 1537
for (int row = 0; row < model->rowCount(); row++) for (int row = 0; row < model->rowCount(); row++)
{ {
int textWidth = fontMetrics.width(ui->stackListWidget->item( row)->text()); int textWidth = fontMetrics.width(ui->stackListWidget->item( row)->text());
width += iconSize > textWidth ? iconSize : textWidth; // use the wider one width += iconSize > textWidth ? iconSize : textWidth; // use the wider one
width += 24; // margin - 12px left and 12px right width += 24; // margin - 12px left and 12px right
} }
// Hack to force the window to be resized... // Hack to force the window to be resized...
ui->stackListWidget->setMinimumWidth(width); ui->stackListWidget->setMinimumWidth(width);
} }
void AstroCalcDialog::updateSolarSystemData()
{
if (dialog)
{
populateCelestialBodyList();
populateGroupCelestialBodyList();
currentPlanetaryPositions();
}
}
 End of changes. 7 change blocks. 
4 lines changed or deleted 12 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/