AstroCalcDialog.hpp   AstroCalcDialog.hpp 
skipping to change at line 29 skipping to change at line 29
*/ */
#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 <QVector>
#include <QTimer>
#include "StelDialog.hpp" #include "StelDialog.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "Planet.hpp" #include "Planet.hpp"
#include "SolarSystem.hpp"
#include "Nebula.hpp"
#include "NebulaMgr.hpp"
#include "StarMgr.hpp"
class Ui_astroCalcDialogForm; class Ui_astroCalcDialogForm;
class QListWidgetItem;
class AstroCalcDialog : public StelDialog class AstroCalcDialog : public StelDialog
{ {
Q_OBJECT Q_OBJECT
public: public:
//! Defines the number and the order of the columns in the table tha t lists planetary positions //! Defines the number and the order of the columns in the table tha t lists planetary positions
//! @enum PlanetaryPositionsColumns //! @enum PlanetaryPositionsColumns
enum PlanetaryPositionsColumns { enum PlanetaryPositionsColumns {
ColumnName, //! name of object ColumnName, //! name of object
skipping to change at line 77 skipping to change at line 83
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();
//! Notify that the application style changed
void styleChanged();
static QVector<Vec3d> EphemerisListJ2000; static QVector<Vec3d> EphemerisListJ2000;
static QVector<QString> EphemerisListDates; static QVector<QString> EphemerisListDates;
static int DisplayedPositionIndex; 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();
skipping to change at line 106 skipping to change at line 115
void generateEphemeris(); void generateEphemeris();
void cleanupEphemeris(); void cleanupEphemeris();
void selectCurrentEphemeride(const QModelIndex &modelIndex); void selectCurrentEphemeride(const QModelIndex &modelIndex);
void saveEphemeris(); 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(); void savePhenomena();
void drawAltVsTimeDiagram();
void drawCurrentTimeDiagram();
void mouseOverLine(QMouseEvent *event);
void changePage(QListWidgetItem *current, QListWidgetItem *previous)
;
private: private:
class StelCore* core; class StelCore* core;
class SolarSystem* solarSystem; class SolarSystem* solarSystem;
class NebulaMgr* dsoMgr;
class StarMgr* starMgr;
class StelObjectMgr* objectMgr; class StelObjectMgr* objectMgr;
QTimer *currentTimeLine;
//! 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();
//! Update header names for phenomena table //! Update header names for phenomena table
void setPhenomenaHeaderNames(); void setPhenomenaHeaderNames();
//! Init header and list of planetary positions //! Init header and list of planetary positions
void initListPlanetaryPositions(); void initListPlanetaryPositions();
skipping to change at line 136 skipping to change at line 154
//! The displayed names are localized in the current interface langu age. //! The displayed names are localized in the current interface langu age.
//! The original names are kept in the user data field of each QComb oBox //! The original names are kept in the user data field of each QComb oBox
//! item. //! item.
void populateCelestialBodyList(); void populateCelestialBodyList();
//! Populates the drop-down list of time steps. //! Populates the drop-down list of time steps.
void populateEphemerisTimeStepsList(); void populateEphemerisTimeStepsList();
//! Populates the drop-down list of major planets. //! Populates the drop-down list of major planets.
void populateMajorPlanetList(); void populateMajorPlanetList();
//! Populates the drop-down list of groups of celestial bodies. //! Populates the drop-down list of groups of celestial bodies.
void populateGroupCelestialBodyList(); void populateGroupCelestialBodyList();
//! Prepare graph settings
void prepareAxesAndGraph();
//! Calculation conjuctions and oppositions. //! Calculation conjunctions 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, double maxSeparation, bool oppositi on);
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; QMap<double, double> findClosestApproach(PlanetP& object1, NebulaP&
object2, double startJD, double stopJD, double maxSeparation);
double findDistance(double JD, PlanetP object1, NebulaP object2);
bool findPrecise(QPair<double, double>* out, PlanetP object1, Nebula
P object2, double JD, double step, int prevSign);
void fillPhenomenaTable(const QMap<double, double> list, const Plane
tP object1, const NebulaP object2);
QMap<double, double> findClosestApproach(PlanetP& object1, StelObjec
tP& object2, double startJD, double stopJD, double maxSeparation);
double findDistance(double JD, PlanetP object1, StelObjectP object2)
;
bool findPrecise(QPair<double, double>* out, PlanetP object1, StelOb
jectP object2, double JD, double step, int prevSign);
void fillPhenomenaTable(const QMap<double, double> list, const Plane
tP object1, const StelObjectP object2);
QString delimiter, acEndl;
QStringList ephemerisHeader, phenomenaHeader, planetaryPositionsHead er; QStringList ephemerisHeader, phenomenaHeader, planetaryPositionsHead er;
static float brightLimit;
static float minY, maxY;
//! Make sure that no tabs icons are outside of the viewport.
//! @todo Limit the width to the width of the screen *available to t
he window*.
void updateTabBarListWidgetWidth();
}; };
// 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. 12 change blocks. 
3 lines changed or deleted 48 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/