AstroCalcDialog.hpp   AstroCalcDialog.hpp 
skipping to change at line 55 skipping to change at line 55
Q_OBJECT Q_OBJECT
public: public:
//! Defines the number and the order of the columns in the table tha t lists celestial bodies positions //! Defines the number and the order of the columns in the table tha t lists celestial bodies positions
//! @enum CPositionsColumns //! @enum CPositionsColumns
enum CPositionsColumns { enum CPositionsColumns {
CColumnName, //! name of object CColumnName, //! name of object
CColumnRA, //! right ascension CColumnRA, //! right ascension
CColumnDec, //! declination CColumnDec, //! declination
CColumnMagnitude, //! magnitude CColumnMagnitude, //! magnitude
CColumnAngularSize, //! angular size
CColumnExtra, //! extra data (surface brightness, separation, period, etc.) CColumnExtra, //! extra data (surface brightness, separation, period, etc.)
CColumnType, //! type of object CColumnType, //! type of object
CColumnCount //! total number of columns CColumnCount //! total number of columns
}; };
//! Defines the number and the order of the columns in the ephemeris table //! Defines the number and the order of the columns in the ephemeris table
//! @enum EphemerisColumns //! @enum EphemerisColumns
enum EphemerisColumns { enum EphemerisColumns {
EphemerisDate, //! date and time of ephemeris EphemerisDate, //! date and time of ephemeris
EphemerisJD, //! JD EphemerisJD, //! JD
skipping to change at line 117 skipping to change at line 118
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:
void currentCelestialPositions(); void currentCelestialPositions();
void populateCelestialCategoryList();
void saveCelestialPositions();
void selectCurrentCelestialPosition(const QModelIndex &modelIndex); void selectCurrentCelestialPosition(const QModelIndex &modelIndex);
void saveCelestialPositionsMagnitudeLimit(double mag); void saveCelestialPositionsMagnitudeLimit(double mag);
void saveCelestialPositionsHorizontalCoordinatesFlag(bool b); void saveCelestialPositionsHorizontalCoordinatesFlag(bool b);
void saveCelestialPositionsCategory(int index); void saveCelestialPositionsCategory(int index);
//! 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 cleanupEphemeris();
void selectCurrentEphemeride(const QModelIndex &modelIndex); void selectCurrentEphemeride(const QModelIndex &modelIndex);
skipping to change at line 164 skipping to change at line 167
void saveGraphsCelestialBody(int index); void saveGraphsCelestialBody(int index);
void saveGraphsFirstId(int index); void saveGraphsFirstId(int index);
void saveGraphsSecondId(int index); void saveGraphsSecondId(int index);
void drawXVsTimeGraphs(); void drawXVsTimeGraphs();
// WUT // WUT
void saveWutMagnitudeLimit(double mag); void saveWutMagnitudeLimit(double mag);
void saveWutTimeInterval(int index); void saveWutTimeInterval(int index);
void calculateWutObjects(); void calculateWutObjects();
void selectWutObject(); void selectWutObject();
void saveWutObjects();
void updateAstroCalcData(); void updateAstroCalcData();
void changePage(QListWidgetItem *current, QListWidgetItem *previous) ; void changePage(QListWidgetItem *current, QListWidgetItem *previous) ;
void updateSolarSystemData(); void updateSolarSystemData();
private: private:
class StelCore* core; class StelCore* core;
class SolarSystem* solarSystem; class SolarSystem* solarSystem;
skipping to change at line 202 skipping to change at line 206
//! Init header and list of ephemeris //! Init header and list of ephemeris
void initListEphemeris(); void initListEphemeris();
//! Init header and list of phenomena //! Init header and list of phenomena
void initListPhenomena(); void initListPhenomena();
//! Populates the drop-down list of celestial bodies. //! Populates the drop-down list of celestial bodies.
//! 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();
void populateCelestialCategoryList();
//! 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 //! Prepare graph settings
void prepareAxesAndGraph(); void prepareAxesAndGraph();
void prepareXVsTimeAxesAndGraph(); void prepareXVsTimeAxesAndGraph();
//! Populates the drop-down list of time intervals for WUT tool. //! Populates the drop-down list of time intervals for WUT tool.
skipping to change at line 266 skipping to change at line 269
} }
private: private:
bool operator < (const QTreeWidgetItem &other) const bool operator < (const QTreeWidgetItem &other) const
{ {
int column = treeWidget()->sortColumn(); int column = treeWidget()->sortColumn();
if (column == AstroCalcDialog::CColumnName) if (column == AstroCalcDialog::CColumnName)
{ {
QRegExp dso("^(\\w+)\\s*(\\d+)\\s*(.*)$"); QRegExp dso("^(\\w+)\\s*(\\d+)\\s*(.*)$");
QRegExp mp("^[(](\\d+)[)]\\s(.+)$");
int a = 0, b = 0; int a = 0, b = 0;
if (dso.exactMatch(text(column))) if (dso.exactMatch(text(column)))
a = dso.capturedTexts().at(2).toInt(); a = dso.capturedTexts().at(2).toInt();
if (a==0 && mp.exactMatch(text(column)))
a = mp.capturedTexts().at(1).toInt();
if (dso.exactMatch(other.text(column))) if (dso.exactMatch(other.text(column)))
b = dso.capturedTexts().at(2).toInt(); b = dso.capturedTexts().at(2).toInt();
if (b==0 && mp.exactMatch(other.text(column)))
b = mp.capturedTexts().at(1).toInt();
if (a>0 && b>0) if (a>0 && b>0)
return a < b; return a < b;
else else
return text(column).toLower() < other.text(c olumn).toLower(); return text(column).toLower() < other.text(c olumn).toLower();
} }
else if (column == AstroCalcDialog::CColumnRA || column == A stroCalcDialog::CColumnDec) else if (column == AstroCalcDialog::CColumnRA || column == A stroCalcDialog::CColumnDec)
{ {
return StelUtils::getDecAngle(text(column)) < StelUt ils::getDecAngle(other.text(column)); return StelUtils::getDecAngle(text(column)) < StelUt ils::getDecAngle(other.text(column));
} }
else if (column == AstroCalcDialog::CColumnMagnitude || colu mn == AstroCalcDialog::CColumnExtra) else if (column == AstroCalcDialog::CColumnMagnitude || colu mn == AstroCalcDialog::CColumnAngularSize || column == AstroCalcDialog::CCo lumnExtra)
{ {
return text(column).toFloat() < other.text(column).t oFloat(); return text(column).toFloat() < other.text(column).t oFloat();
} }
else else
{ {
return text(column).toLower() < other.text(column).t oLower(); return text(column).toLower() < other.text(column).t oLower();
} }
} }
}; };
 End of changes. 8 change blocks. 
2 lines changed or deleted 10 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/