AstroCalcDialog.hpp   AstroCalcDialog.hpp 
/* /*
* Stellarium * Stellarium
* *
* Copyright (C) 2015 Alexander Wolf * Copyright (C) 2015 Alexander Wolf
* Copyright (C) 2016 Nick Fedoseev (visualization of ephemeris)
* *
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License * modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
skipping to change at line 27 skipping to change at line 28
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifndef _ASTROCALCDIALOG_HPP_ #ifndef _ASTROCALCDIALOG_HPP_
#define _ASTROCALCDIALOG_HPP_ #define _ASTROCALCDIALOG_HPP_
#include <QObject> #include <QObject>
#include <QTreeWidget> #include <QTreeWidget>
#include <QTreeWidgetItem> #include <QTreeWidgetItem>
#include <QMap> #include <QMap>
#include <QVector>
#include "StelDialog.hpp" #include "StelDialog.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "Planet.hpp" #include "Planet.hpp"
class Ui_astroCalcDialogForm; class Ui_astroCalcDialogForm;
class AstroCalcDialog : public StelDialog class AstroCalcDialog : public StelDialog
{ {
Q_OBJECT Q_OBJECT
skipping to change at line 75 skipping to change at line 77
PhenomenaDate, //! date and time of ephemeris PhenomenaDate, //! date and time of ephemeris
PhenomenaObject1, //! first object PhenomenaObject1, //! first object
PhenomenaObject2, //! second object PhenomenaObject2, //! second object
PhenomenaSeparation, //! angular separation PhenomenaSeparation, //! angular separation
PhenomenaCount //! total number of columns PhenomenaCount //! total number of columns
}; };
AstroCalcDialog(QObject* parent); AstroCalcDialog(QObject* parent);
virtual ~AstroCalcDialog(); virtual ~AstroCalcDialog();
static QVector<Vec3d> EphemerisListJ2000;
static QVector<QString> EphemerisListDates;
static int DisplayedPositionIndex;
public slots: public slots:
void retranslate(); void retranslate();
protected: protected:
//! Initialize the dialog widgets and connect the signals/slots. //! Initialize the dialog widgets and connect the signals/slots.
virtual void createDialogContent(); virtual void createDialogContent();
Ui_astroCalcDialogForm *ui; Ui_astroCalcDialogForm *ui;
private slots: private slots:
//! Search planetary positions and fill the list. //! Search planetary positions and fill the list.
void currentPlanetaryPositions(); void currentPlanetaryPositions();
void selectCurrentPlanetaryPosition(const QModelIndex &modelIndex); void selectCurrentPlanetaryPosition(const QModelIndex &modelIndex);
void onChangedEphemerisPosition(const QModelIndex &modelIndex);
//! Calculate ephemeris for selected celestial body and fill the lis t. //! Calculate ephemeris for selected celestial body and fill the lis t.
void generateEphemeris(); void generateEphemeris();
void cleanupEphemeris();
void selectCurrentEphemeride(const QModelIndex &modelIndex); void selectCurrentEphemeride(const QModelIndex &modelIndex);
void saveEphemeris();
//! Calculate phenomena for selected celestial body and fill the lis t. //! Calculate phenomena for selected celestial body and fill the lis t.
void calculatePhenomena(); void calculatePhenomena();
void selectCurrentPhenomen(const QModelIndex &modelIndex); void selectCurrentPhenomen(const QModelIndex &modelIndex);
void savePhenomena();
private: private:
class StelCore* core; class StelCore* core;
class SolarSystem* solarSystem; class SolarSystem* solarSystem;
class StelObjectMgr* objectMgr; class StelObjectMgr* objectMgr;
//! Update header names for planetary positions table //! Update header names for planetary positions table
void setPlanetaryPositionsHeaderNames(); void setPlanetaryPositionsHeaderNames();
//! Update header names for ephemeris table //! Update header names for ephemeris table
void setEphemerisHeaderNames(); void setEphemerisHeaderNames();
skipping to change at line 135 skipping to change at line 145
void populateGroupCelestialBodyList(); void populateGroupCelestialBodyList();
//! Calculation conjuctions and oppositions. //! Calculation conjuctions and oppositions.
//! @note Ported from KStars, should be improved, because this featu re calculate //! @note Ported from KStars, should be improved, because this featu re calculate
//! angular separation ("conjunction" defined as equality of right a scension //! angular separation ("conjunction" defined as equality of right a scension
//! of two body) and current solution is not accurate and slow. //! of two body) and current solution is not accurate and slow.
QMap<double, double> findClosestApproach(PlanetP& object1, PlanetP& object2, double startJD, double stopJD, float maxSeparation, bool oppositio n); QMap<double, double> findClosestApproach(PlanetP& object1, PlanetP& object2, double startJD, double stopJD, float maxSeparation, bool oppositio n);
double findDistance(double JD, PlanetP object1, PlanetP object2, boo l opposition); double findDistance(double JD, PlanetP object1, PlanetP object2, boo l opposition);
bool findPrecise(QPair<double, double>* out, PlanetP object1, Planet P object2, double JD, double step, int prevSign, bool opposition); bool findPrecise(QPair<double, double>* out, PlanetP object1, Planet P object2, double JD, double step, int prevSign, bool opposition);
void fillPhenomenaTable(const QMap<double, double> list, const Plane tP object1, const PlanetP object2, bool opposition); void fillPhenomenaTable(const QMap<double, double> list, const Plane tP object1, const PlanetP object2, bool opposition);
QString delimiter;
QStringList ephemerisHeader, phenomenaHeader, planetaryPositionsHead
er;
}; };
// Reimplements the QTreeWidgetItem class to fix the sorting bug // Reimplements the QTreeWidgetItem class to fix the sorting bug
class ACTreeWidgetItem : public QTreeWidgetItem class ACTreeWidgetItem : public QTreeWidgetItem
{ {
public: public:
ACTreeWidgetItem(QTreeWidget* parent) ACTreeWidgetItem(QTreeWidget* parent)
: QTreeWidgetItem(parent) : QTreeWidgetItem(parent)
{ {
} }
 End of changes. 8 change blocks. 
0 lines changed or deleted 14 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/