24 #include <QVariantMap> 26 #include "StelFader.hpp" 27 #include "StelObjectModule.hpp" 40 static const int RCMAG_TABLE_SIZE = 4096;
91 Q_PROPERTY(
bool flagStarsDisplayed
94 NOTIFY starsDisplayedChanged)
95 Q_PROPERTY(
bool flagLabelsDisplayed
98 NOTIFY starLabelsDisplayedChanged)
99 Q_PROPERTY(
double labelsAmount
102 NOTIFY labelsAmountChanged)
124 virtual void update(
double deltaTime) {labelsFader.update((
int)(deltaTime*1000)); starsFader.update((
int)(deltaTime*1000));}
148 virtual QStringList
listMatchingObjects(
const QString& objPrefix,
int maxNbItem=5,
bool useStartOfWords=
false,
bool inEnglish=
false)
const;
152 virtual QString getName()
const {
return "Stars"; }
168 void setFlagStars(
bool b) {starsFader=b; emit starsDisplayedChanged(b);}
173 void setFlagLabels(
bool b) {labelsFader=b; emit starLabelsDisplayedChanged(b);}
180 void setLabelsAmount(
double a) {
if(a!=labelsAmount){ labelsAmount=a; emit labelsAmountChanged(a);}}
190 static bool getFlagSciNames(
void) {
return flagSciNames;}
322 static QString convertToSpectralType(
int index);
323 static QString convertToComponentIds(
int index);
325 QVariantList getCatalogsDescription()
const {
return catalogsDescription;}
342 void updateSkyCulture(
const QString& skyCultureDir);
345 void starLabelsDisplayedChanged(
const bool displayed);
346 void starsDisplayedChanged(
const bool displayed);
347 void labelsAmountChanged(
float a);
351 void setCheckFlag(
const QString& catalogId,
bool b);
353 void copyDefaultConfigFile();
359 int loadCommonNames(
const QString& commonNameFile);
364 void loadSciNames(
const QString& sciNameFile);
368 void loadGcvs(
const QString& GcvsFile);
372 void loadWds(
const QString& WdsFile);
376 void loadCrossIdentificationData(
const QString& crossIdFile);
380 int getMaxSearchLevel()
const;
383 void loadData(QVariantMap starsConfigFile);
389 QList<StelObjectP> hipparcosStars;
398 int maxGeodesicGridLevel;
399 int lastMaxSearchLevel;
402 QVector<ZoneArray*> gridLevels;
403 static void initTriangleFunc(
int lev,
int index,
409 reinterpret_cast<StarMgr*
>(context)->initTriangle(lev, index, c0, c1, c2);
412 void initTriangle(
int lev,
int index,
419 static QHash<int, QString> commonNamesMap;
420 static QHash<int, QString> commonNamesMapI18n;
421 static QMap<QString, int> commonNamesIndexI18n;
422 static QMap<QString, int> commonNamesIndex;
424 static QHash<int, QString> additionalNamesMap;
425 static QHash<int, QString> additionalNamesMapI18n;
426 static QMap<QString, int> additionalNamesIndex;
427 static QMap<QString, int> additionalNamesIndexI18n;
429 static QHash<int, QString> sciNamesMapI18n;
430 static QMap<QString, int> sciNamesIndexI18n;
432 static QHash<int, QString> sciAdditionalNamesMapI18n;
433 static QMap<QString, int> sciAdditionalNamesIndexI18n;
435 static QHash<int, varstar> varStarsMapI18n;
436 static QMap<QString, int> varStarsIndexI18n;
438 static QHash<int, wds> wdsStarsMapI18n;
439 static QMap<QString, int> wdsStarsIndexI18n;
441 static QHash<int, int> saoStarsMap;
442 static QMap<int, int> saoStarsIndex;
443 static QHash<int, int> hdStarsMap;
444 static QMap<int, int> hdStarsIndex;
445 static QHash<int, int> hrStarsMap;
446 static QMap<int, int> hrStarsIndex;
448 static QHash<int, QString> referenceMap;
451 static bool flagSciNames;
458 QString starConfigFileFullPath;
459 QVariantMap starSettings;
460 QVariantList catalogsDescription;
464 #endif // _STARMGR_HPP_ static QString getSciName(int hip)
Get the (translated) scientific name for a star with a specified Hipparcos catalogue number...
static double getGcvsEpoch(int hip)
Get Epoch for maximum light for a variable star with a specified Hipparcos catalogue number...
bool getFlagStars(void) const
Get display flag for Stars.
float separation
Position Angle at date of last satisfactory observation, deg.
static int getGcvsMM(int hip)
Get the rising time or duration of eclipse for a variable star with a specified Hipparcos catalogue n...
int Mm
Period of the variable star (days)
StelObjectP searchHP(int hip) const
Search by Hipparcos catalogue number.
double epoch
The photometric system for magnitudes.
Container for Hipparcos information.
virtual void init()
Initialize the StarMgr.
double getLabelsAmount(void) const
Get the amount of star labels.
float min2mag
First minimum magnitude or amplitude.
float min1mag
Magnitude flag code.
virtual StelObjectP searchByName(const QString &name) const
Return the matching star if exists or NULL.
int observation
WDS designation.
void setLabelsAmount(double a)
Set the amount of star labels.
Implementation of StelFader which implements a linear transition.
float maxmag
Type of variability.
const QList< StelObjectP > & getHipparcosStars() const
Get the list of all Hipparcos stars.
The base abstract class for sky objects used in Stellarium like Stars, Planets, Constellations etc...
static QString getSciAdditionalName(int hip)
Get the (translated) additional scientific name for a star with a specified Hipparcos catalogue numbe...
Define the StelTextureSP type.
virtual QStringList listAllObjectsByType(const QString &objType, bool inEnglish) const
List all StelObjects by type.
Vec3f getLabelColor(void) const
Get the current color used to label bright stars.
double period
Epoch for maximum light (Julian days)
QString vtype
GCVS designation.
Manages all ZoneData structures of a given StelGeodesicGrid level.
static float getGcvsMaxMagnitude(int hip)
Get the magnitude at maximum brightness for a variable star with a specified Hipparcos catalogue numb...
Special version of QSharedPointer which by default doesn't delete the referenced pointer when the ref...
static double getGcvsPeriod(int hip)
Get the period for a variable star with a specified Hipparcos catalogue number.
void setLabelColor(const Vec3f &c)
Set the color used to label bright stars.
QString stype
Rising time or duration of eclipse (%)
Main class for Stellarium core processing.
bool getFlagLabels(void) const
Get display flag for Star names (labels).
void setFlagStars(bool b)
Set display flag for Stars.
float positionAngle
Date of last satisfactory observation, yr.
static int getGcvsMagnitudeFlag(int hip)
Get the magnitude flag code for a variable star with a specified Hipparcos catalogue number...
Specialization of StelModule which manages a collection of StelObject.
virtual void draw(StelCore *core)
Draw the stars and the star selection indicator if necessary.
void setFontSize(float newFontSize)
Define font size to use for star names display.
bool checkAndLoadCatalog(const QVariantMap &m)
Try to load the given catalog, even if it is marched as unchecked.
Converts tones in function of the eye adaptation to luminance.
static QString getAdditionalEnglishNames(int hip)
Get the English additional names for a star with a specified Hipparcos catalogue number.
Provides functions for performing openGL drawing operations.
Provide the main interface to all operations of projecting coordinates from sky to screen...
virtual QList< StelObjectP > searchAround(const Vec3d &v, double limitFov, const StelCore *core) const
Return a list containing the stars located inside the limFov circle around position v...
static QString getAdditionalNames(int hip)
Get the (translated) additional names for a star with a specified Hipparcos catalogue number...
virtual void update(double deltaTime)
Update any time-dependent features.
Stores the star catalogue data.
static QString getGcvsVariabilityType(int hip)
Get the type of variability for a variable star with a specified Hipparcos catalogue number...
static int getWdsLastPositionAngle(int hip)
Get position angle at date of last satisfactory observation of double star with a Hipparcos catalogue...
Manage the selection and queries on one or more StelObjects.
StelModuleActionName
Define the possible action for which an order is defined.
static float getGcvsMinMagnitude(int hip, bool firstMinimumFlag=true)
Get the minimum magnitude or amplitude for a variable star with a specified Hipparcos catalogue numbe...
virtual QStringList listAllObjects(bool inEnglish) const
static float getWdsLastSeparation(int hip)
Get separation angle at date of last satisfactory observation of double star with a Hipparcos catalog...
static int getWdsLastObservation(int hip)
Get year of last satisfactory observation of double star with a Hipparcos catalogue number...
static QString getGcvsName(int hip)
Get the (translated) scientific name for a variable star with a specified Hipparcos catalogue number...
int mflag
Magnitude at maximum brightness.
static QString getCommonName(int hip)
Get the (translated) common name for a star with a specified Hipparcos catalogue number.
Define the StelProjectorP type.
static QString getWdsName(int hip)
Get the (translated) scientific name for a double star with a specified Hipparcos catalogue number...
QSharedPointer< StelTexture > StelTextureSP
Use shared pointer to simplify memory managment.
void setFlagLabels(bool b)
Set display flag for Star names (labels).
virtual QStringList listMatchingObjects(const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false, bool inEnglish=false) const
Find and return the list of at most maxNbItem objects auto-completing the passed object English name...
virtual double getCallOrder(StelModuleActionName actionName) const
Used to determine the order in which the various StelModules are drawn.
static void setFlagSciNames(bool f)
Show scientific or catalog names on stars without common names.
virtual StelObjectP searchByNameI18n(const QString &nameI18n) const
Return the matching Stars object's pointer if exists or NULL.
static QString getCrossIdentificationDesignations(int hip)
Get the cross-identification designations for a star with a specified Hipparcos catalogue number...
QString photosys
Second minimum magnitude or amplitude.
static QString getCommonEnglishName(int hip)
Get the (English) common name for a star with a specified Hipparcos catalogue number.
static QString getGcvsPhotometricSystem(int hip)
Get the photometric system for a variable star with a specified Hipparcos catalogue number...