22 #ifndef _NEBULAMGR_HPP_ 23 #define _NEBULAMGR_HPP_ 26 #include "StelFader.hpp" 27 #include "StelSphericalIndex.hpp" 28 #include "StelObjectModule.hpp" 33 #include <QStringList> 41 typedef QSharedPointer<Nebula> NebulaP;
52 Q_PROPERTY(
bool flagHintDisplayed
56 Q_PROPERTY(
bool flagTypeFiltersUsage
61 Q_PROPERTY(Nebula::TypeGroup typeFilters
66 Q_PROPERTY(Nebula::CatalogGroup catalogFilters
67 READ getCatalogFilters
68 WRITE setCatalogFilters
71 Q_PROPERTY(
bool hintsProportional
74 NOTIFY hintsProportionalChanged
76 Q_PROPERTY(
bool flagOutlinesDisplayed
79 NOTIFY flagOutlinesDisplayedChanged
81 Q_PROPERTY(
bool flagSurfaceBrightnessUsage
84 NOTIFY flagSurfaceBrightnessUsageChanged
86 Q_PROPERTY(
bool flagSurfaceBrightnessArcsecUsage
89 NOTIFY flagSurfaceBrightnessArcsecUsageChanged
91 Q_PROPERTY(
bool flagSurfaceBrightnessShortNotationUsage
94 NOTIFY flagSurfaceBrightnessShortNotationUsageChanged
99 NOTIFY labelsAmountChanged
104 NOTIFY hintsAmountChanged
106 Q_PROPERTY(
bool flagDesignationLabels
109 NOTIFY designationUsageChanged
112 Q_PROPERTY(
Vec3f labelsColor
115 NOTIFY labelsColorChanged
117 Q_PROPERTY(
Vec3f circlesColor
120 NOTIFY circlesColorChanged
122 Q_PROPERTY(
Vec3f galaxiesColor
125 NOTIFY galaxiesColorChanged
127 Q_PROPERTY(
Vec3f activeGalaxiesColor
130 NOTIFY activeGalaxiesColorChanged
132 Q_PROPERTY(
Vec3f radioGalaxiesColor
135 NOTIFY radioGalaxiesColorChanged
137 Q_PROPERTY(
Vec3f interactingGalaxiesColor
140 NOTIFY interactingGalaxiesColorChanged
142 Q_PROPERTY(
Vec3f quasarsColor
145 NOTIFY quasarsColorChanged
147 Q_PROPERTY(
Vec3f possibleQuasarsColor
150 NOTIFY possibleQuasarsColorChanged
152 Q_PROPERTY(
Vec3f clustersColor
155 NOTIFY clustersColorChanged
157 Q_PROPERTY(
Vec3f openClustersColor
160 NOTIFY openClustersColorChanged
162 Q_PROPERTY(
Vec3f globularClustersColor
165 NOTIFY globularClustersColorChanged
167 Q_PROPERTY(
Vec3f stellarAssociationsColor
170 NOTIFY stellarAssociationsColorChanged
172 Q_PROPERTY(
Vec3f starCloudsColor
175 NOTIFY starCloudsColorChanged
177 Q_PROPERTY(
Vec3f starsColor
180 NOTIFY starsColorChanged
182 Q_PROPERTY(
Vec3f symbioticStarsColor
185 NOTIFY symbioticStarsColorChanged
187 Q_PROPERTY(
Vec3f emissionLineStarsColor
190 NOTIFY emissionLineStarsColorChanged
192 Q_PROPERTY(
Vec3f nebulaeColor
195 NOTIFY nebulaeColorChanged
197 Q_PROPERTY(
Vec3f planetaryNebulaeColor
200 NOTIFY planetaryNebulaeColorChanged
202 Q_PROPERTY(
Vec3f darkNebulaeColor
205 NOTIFY darkNebulaeColorChanged
207 Q_PROPERTY(
Vec3f reflectionNebulaeColor
210 NOTIFY reflectionNebulaeColorChanged
212 Q_PROPERTY(
Vec3f bipolarNebulaeColor
215 NOTIFY bipolarNebulaeColorChanged
217 Q_PROPERTY(
Vec3f emissionNebulaeColor
220 NOTIFY emissionNebulaeColorChanged
222 Q_PROPERTY(
Vec3f possiblePlanetaryNebulaeColor
225 NOTIFY possiblePlanetaryNebulaeColorChanged
227 Q_PROPERTY(
Vec3f protoplanetaryNebulaeColor
230 NOTIFY protoplanetaryNebulaeColorChanged
232 Q_PROPERTY(
Vec3f clusterWithNebulosityColor
235 NOTIFY clusterWithNebulosityColorChanged
237 Q_PROPERTY(
Vec3f hydrogenRegionsColor
240 NOTIFY hydrogenRegionsColorChanged
242 Q_PROPERTY(
Vec3f interstellarMatterColor
245 NOTIFY interstellarMatterColorChanged
247 Q_PROPERTY(
Vec3f emissionObjectsColor
250 NOTIFY emissionObjectsColorChanged
252 Q_PROPERTY(
Vec3f molecularCloudsColor
255 NOTIFY molecularCloudsColorChanged
257 Q_PROPERTY(
Vec3f blLacObjectsColor
260 NOTIFY blLacObjectsColorChanged
262 Q_PROPERTY(
Vec3f blazarsColor
265 NOTIFY blazarsColorChanged
267 Q_PROPERTY(
Vec3f youngStellarObjectsColor
270 NOTIFY youngStellarObjectsColorChanged
272 Q_PROPERTY(
Vec3f supernovaRemnantsColor
275 NOTIFY supernovaRemnantsColorChanged
277 Q_PROPERTY(
Vec3f supernovaCandidatesColor
280 NOTIFY supernovaCandidatesColorChanged
282 Q_PROPERTY(
Vec3f supernovaRemnantCandidatesColor
285 NOTIFY supernovaRemnantCandidatesColorChanged
287 Q_PROPERTY(
Vec3f galaxyClustersColor
290 NOTIFY galaxyClustersColorChanged
295 virtual ~NebulaMgr();
312 virtual
void update(
double deltaTime) {hintsFader.update((
int)(deltaTime*1000)); flagShow.update((
int)(deltaTime*1000));}
342 virtual QStringList
listMatchingObjects(
const QString& objPrefix,
int maxNbItem=5,
bool useStartOfWords=
false,
bool inEnglish=
false)
const;
346 virtual QString
getName()
const {
return "Deep-sky objects"; }
366 void setCatalogFilters(Nebula::CatalogGroup cflags);
367 Nebula::CatalogGroup getCatalogFilters()
const {
return Nebula::catalogFilters; }
369 void setTypeFilters(Nebula::TypeGroup tflags);
370 Nebula::TypeGroup getTypeFilters()
const {
return Nebula::typeFilters; }
760 void setFlagSurfaceBrightnessUsage(
const bool usage) {
if(usage!=Nebula::surfaceBrightnessUsage){ Nebula::surfaceBrightnessUsage=usage; emit flagSurfaceBrightnessUsageChanged(usage);}}
819 void hintsProportionalChanged(
bool b);
820 void flagOutlinesDisplayedChanged(
bool b);
821 void designationUsageChanged(
bool b);
822 void flagSurfaceBrightnessUsageChanged(
bool b);
823 void flagSurfaceBrightnessArcsecUsageChanged(
bool b);
824 void flagSurfaceBrightnessShortNotationUsageChanged(
bool b);
825 void labelsAmountChanged(
double a);
826 void hintsAmountChanged(
double f);
828 void labelsColorChanged(
const Vec3f & color)
const;
829 void circlesColorChanged(
const Vec3f & color)
const;
830 void galaxiesColorChanged(
const Vec3f & color)
const;
831 void activeGalaxiesColorChanged(
const Vec3f & color)
const;
832 void radioGalaxiesColorChanged(
const Vec3f & color)
const;
833 void interactingGalaxiesColorChanged(
const Vec3f & color)
const;
834 void quasarsColorChanged(
const Vec3f & color)
const;
835 void possibleQuasarsColorChanged(
const Vec3f & color)
const;
836 void clustersColorChanged(
const Vec3f & color)
const;
837 void openClustersColorChanged(
const Vec3f & color)
const;
838 void globularClustersColorChanged(
const Vec3f & color)
const;
839 void stellarAssociationsColorChanged(
const Vec3f & color)
const;
840 void starCloudsColorChanged(
const Vec3f & color)
const;
841 void starsColorChanged(
const Vec3f & color)
const;
842 void symbioticStarsColorChanged(
const Vec3f & color)
const;
843 void emissionLineStarsColorChanged(
const Vec3f & color)
const;
844 void nebulaeColorChanged(
const Vec3f & color)
const;
845 void planetaryNebulaeColorChanged(
const Vec3f & color)
const;
846 void darkNebulaeColorChanged(
const Vec3f & color)
const;
847 void reflectionNebulaeColorChanged(
const Vec3f & color)
const;
848 void bipolarNebulaeColorChanged(
const Vec3f & color)
const;
849 void emissionNebulaeColorChanged(
const Vec3f & color)
const;
850 void possiblePlanetaryNebulaeColorChanged(
const Vec3f & color)
const;
851 void protoplanetaryNebulaeColorChanged(
const Vec3f & color)
const;
852 void clusterWithNebulosityColorChanged(
const Vec3f & color)
const;
853 void hydrogenRegionsColorChanged(
const Vec3f & color)
const;
854 void interstellarMatterColorChanged(
const Vec3f & color)
const;
855 void emissionObjectsColorChanged(
const Vec3f & color)
const;
856 void molecularCloudsColorChanged(
const Vec3f & color)
const;
857 void blLacObjectsColorChanged(
const Vec3f & color)
const;
858 void blazarsColorChanged(
const Vec3f & color)
const;
859 void youngStellarObjectsColorChanged(
const Vec3f & color)
const;
860 void supernovaRemnantsColorChanged(
const Vec3f & color)
const;
861 void supernovaCandidatesColorChanged(
const Vec3f & color)
const;
862 void supernovaRemnantCandidatesColorChanged(
const Vec3f & color)
const;
863 void galaxyClustersColorChanged(
const Vec3f & color)
const;
874 void updateSkyCulture(
const QString& skyCultureDir);
879 NebulaP search(
const QString& name);
882 NebulaP search(
const Vec3d& pos);
890 void loadNebulaSet(
const QString& setName);
895 NebulaP searchDSO(
unsigned int DSO);
896 NebulaP searchM(
unsigned int M);
897 NebulaP searchNGC(
unsigned int NGC);
898 NebulaP searchIC(
unsigned int IC);
899 NebulaP searchC(
unsigned int C);
900 NebulaP searchB(
unsigned int B);
901 NebulaP searchSh2(
unsigned int Sh2);
902 NebulaP searchVdB(
unsigned int VdB);
903 NebulaP searchRCW(
unsigned int RCW);
904 NebulaP searchLDN(
unsigned int LDN);
905 NebulaP searchLBN(
unsigned int LBN);
906 NebulaP searchCr(
unsigned int Cr);
907 NebulaP searchMel(
unsigned int Mel);
908 NebulaP searchPGC(
unsigned int PGC);
909 NebulaP searchUGC(
unsigned int UGC);
910 NebulaP searchCed(QString Ced);
911 NebulaP searchArp(
unsigned int Arp);
912 NebulaP searchVV(
unsigned int VV);
913 NebulaP searchPK(QString PK);
914 NebulaP searchPNG(QString PNG);
915 NebulaP searchSNRG(QString SNRG);
916 NebulaP searchACO(QString ACO);
919 bool loadDSOCatalog(
const QString& filename);
920 void convertDSOCatalog(
const QString& in,
const QString& out,
bool decimal);
922 bool loadDSONames(
const QString& filename);
924 bool loadDSOOutlines(
const QString& filename);
926 QVector<NebulaP> dsoArray;
927 QHash<unsigned int, NebulaP> dsoIndex;
947 bool flagDecimalCoordinates;
950 #endif // _NEBULAMGR_HPP_ const Vec3f getOpenClusterColor(void) const
Get current value of the open star cluster symbol color.
void setHintsFadeDuration(float duration)
Set how long it takes for nebula hints to fade in and out when turned on and off. ...
virtual void update(double deltaTime)
Update state which is time dependent.
const Vec3f getClusterColor(void) const
Get current value of the star cluster symbol color.
virtual StelObjectP searchByName(const QString &name) const
Return the matching nebula if exists or Q_NULLPTR.
const Vec3f getBipolarNebulaColor(void) const
Get current value of the bipolar nebula circle color.
void setYoungStellarObjectColor(const Vec3f &c)
Set the color used to draw the young stellar objects symbols.
virtual StelObjectP searchByID(const QString &id) const
Return the StelObject with the given ID if exists or the empty StelObject if not found.
void setInteractingGalaxyColor(const Vec3f &c)
Set the color used to draw the interacting galaxy symbols (ellipses).
Provide a set of methods used to draw sky objects taking into account eyes adaptation, zoom level, instrument model and artificially set magnitude limits.
virtual StelObjectP searchByNameI18n(const QString &nameI18n) const
Return the matching nebula object's pointer if exists or an "empty" StelObjectP.
void setBlazarColor(const Vec3f &c)
Set the color used to draw the blazars symbols.
void setClusterColor(const Vec3f &c)
Set the color used to draw the star cluster symbols (Open/Globular).
void setFlagSurfaceBrightnessUsage(const bool usage)
Set whether hints (symbols) should be visible according to surface brightness value.
bool getFlagOutlines(void) const
Get flag for usage outlines for big DSO instead their hints.
void setClusterWithNebulosityColor(const Vec3f &c)
Set the color used to draw the cluster associated with nebulosity symbols.
void setFlagOutlines(const bool flag)
Set flag for usage outlines for big DSO instead their hints.
Class used to translate strings to any language.
void setPlanetaryNebulaColor(const Vec3f &c)
Set the color used to draw the planetary nebulae symbols.
bool getFlagShow(void) const
Get value of flag used to turn on and off Nebula rendering.
void setStellarAssociationColor(const Vec3f &c)
Set the color used to draw the stellar associations symbols.
void setSymbioticStarColor(const Vec3f &c)
Set the color used to draw the symbiotic stars symbols.
void setBrightNebulaColor(const Vec3f &c)
Set the color used to draw the bright nebula symbols (emission nebula boxes, planetary nebulae circle...
Implementation of StelFader which implements a linear transition.
const Vec3f getRadioGalaxyColor(void) const
Get current value of the radio galaxy symbol color.
void setGalaxyClusterColor(const Vec3f &c)
Set the color used to draw the cluster of galaxies symbols.
const Vec3f getGalaxyClusterColor(void) const
Get current value of the cluster of galaxies symbol color.
const Vec3f getStarCloudColor(void) const
Get current value of the star cloud symbol color.
void setFlagSurfaceBrightnessShortNotationUsage(const bool usage)
Set flag for usage of short notation for measure unit to surface brightness value.
Define the StelTextureSP type.
virtual QStringList listAllObjects(bool inEnglish) const
const Vec3f getQuasarColor(void) const
Get current value of the quasar symbol color.
void setStarCloudColor(const Vec3f &c)
Set the color used to draw the star clouds symbols.
QString getLatestSelectedDSODesignation()
Get designation for latest selected DSO with priority.
void flagUseTypeFiltersChanged(bool b)
Emitted when filter types are changed.
bool getFlagSurfaceBrightnessUsage(void) const
Get whether hints (symbols) are visible according to surface brightness value.
void setSupernovaRemnantCandidateColor(const Vec3f &c)
Set the color used to draw the supernova remnant candidate symbols.
virtual QList< StelObjectP > searchAround(const Vec3d &v, double limitFov, const StelCore *core) const
Used to get a vector of objects which are near to some position.
void setHintsAmount(double f)
Set the amount of nebulae hints.
void setBipolarNebulaColor(const Vec3f &c)
Set the color used to draw the bipolar nebulae symbols.
const Vec3f getStellarAssociationColor(void) const
Get current value of the stellar association symbol color.
virtual void init()
Initialize the NebulaMgr object.
void setEmissionLineStarColor(const Vec3f &c)
Set the color used to draw the emission-line stars symbols.
Main class for Stellarium core processing.
const Vec3f getCirclesColor(void) const
Get current value of the nebula circle color.
void setMolecularCloudColor(const Vec3f &c)
Set the color used to draw the molecular clouds symbols.
float computeMaxMagHint(const class StelSkyDrawer *skyDrawer) const
Compute the maximum magntiude for which hints will be displayed.
void setEmissionObjectColor(const Vec3f &c)
Set the color used to draw the emission objects symbols.
bool getFlagSurfaceBrightnessShortNotationUsage(void) const
Get flag for usage of short notation for measure unit to surface brightness value.
const Vec3f getSymbioticStarColor(void) const
Get current value of the symbiotic star symbol color.
void setNebulaColor(const Vec3f &c)
Set the color used to draw the bright nebula symbols (emission nebula boxes, planetary nebulae circle...
bool getFlagHints(void) const
Get flag for displaying Nebulae Hints.
const Vec3f getNebulaColor(void) const
Get current value of the nebula circle color.
void catalogFiltersChanged(Nebula::CatalogGroup flags)
Emitted when the catalog filter is changed.
Specialization of StelModule which manages a collection of StelObject.
void setQuasarColor(const Vec3f &c)
Set the color used to draw the quasars symbols (ellipses).
void setFlagShow(bool b)
Set flag used to turn on and off Nebula rendering.
const Vec3f getEmissionObjectColor(void) const
Get current value of the emission object symbol color.
void setProtoplanetaryNebulaColor(const Vec3f &c)
Set the color used to draw the protoplanetary nebulae symbols.
const Vec3f getBlazarColor(void) const
Get current value of the blazar symbol color.
const Vec3f getYoungStellarObjectColor(void) const
Get current value of the young stellar object symbol color.
void setSupernovaCandidateColor(const Vec3f &c)
Set the color used to draw the supernova candidate symbols.
void setHydrogenRegionColor(const Vec3f &c)
Set the color used to draw the ionized hydrogen region symbols.
const Vec3f getSupernovaCandidateColor(void) const
Get current value of the supernova candidate symbol color.
const Vec3f getBlLacObjectColor(void) const
Get current value of the BL Lac object symbol color.
void setCirclesColor(const Vec3f &c)
Set the default color used to draw the nebula symbols (default circles, etc).
const Vec3f getSupernovaRemnantColor(void) const
Get current value of the supernova remnant symbol color.
void setInterstellarMatterColor(const Vec3f &c)
Set the color used to draw the interstellar matter symbols.
Converts tones in function of the eye adaptation to luminance.
const Vec3f getActiveGalaxyColor(void) const
Get current value of the active galaxy symbol color.
const Vec3f getInteractingGalaxyColor(void) const
Get current value of the interacting galaxy symbol color.
void setStarColor(const Vec3f &c)
Set the color used to draw the stars symbols.
void setReflectionNebulaColor(const Vec3f &c)
Set the color used to draw the reflection nebulae symbols.
const Vec3f getPossiblePlanetaryNebulaColor(void) const
Get current value of the possible planetary nebula symbol color.
void setRadioGalaxyColor(const Vec3f &c)
Set the color used to draw the radio galaxy symbols (ellipses).
Define the StelObjectP type.
Provides functions for performing openGL drawing operations.
void setFlagHints(bool b)
Set flag for displaying Nebulae Hints.
void setHintsProportional(const bool proportional)
Set whether hints (symbols) should be scaled according to nebula size.
virtual double getCallOrder(StelModuleActionName actionName) const
Determines the order in which the various modules are drawn.
const Vec3f getProtoplanetaryNebulaColor(void) const
Get current value of the protoplanetary nebula symbol color.
double getHintsAmount(void) const
Get the amount of nebulae labels.
const QVector< NebulaP > & getAllDeepSkyObjects() const
Get the list of all deep-sky objects.
double hintsAmount
The amount of hints (between 0 and 10)
bool getHintsProportional(void) const
Get whether hints (symbols) are scaled according to nebula size.
void setEmissionNebulaColor(const Vec3f &c)
Set the color used to draw the emission nebulae symbols.
void setPossibleQuasarColor(const Vec3f &c)
Set the color used to draw the possible quasars symbols.
const Vec3f getPossibleQuasarColor(void) const
Get current value of the possible quasar symbol color.
const Vec3f getEmissionLineStarColor(void) const
Get current value of the emission-line star symbol color.
virtual QStringList listAllObjectsByType(const QString &objType, bool inEnglish) const
List all StelObjects by type.
StelModuleActionName
Define the possible action for which an order is defined.
const Vec3f getInterstellarMatterColor(void) const
Get current value of the interstellar matter symbol color.
Container allowing to store and query SphericalRegion.
bool getFlagSurfaceBrightnessArcsecUsage(void) const
Get flag for usage of measure unit mag/arcsec^2 to surface brightness value.
const Vec3f getSupernovaRemnantCandidateColor(void) const
Get current value of the supernova remnant candidate symbol color.
QList< NebulaP > getDeepSkyObjectsByType(const QString &objType)
Get the list of deep-sky objects by type.
void setFlagSurfaceBrightnessArcsecUsage(const bool usage)
Set flag for usage of measure unit mag/arcsec^2 to surface brightness value.
void typeFiltersChanged(Nebula::TypeGroup flags)
Emitted when the type filter is changed.
const Vec3f getStarColor(void) const
Get current value of the star symbol color.
void setBlLacObjectColor(const Vec3f &c)
Set the color used to draw the BL Lac objects symbols.
double getLabelsAmount(void) const
Get the amount of nebulae labels.
const Vec3f getLabelsColor(void) const
Get current value of the nebula label color.
const Vec3f getEmissionNebulaColor(void) const
Get current value of the emission nebula circle color.
bool getDesignationUsage(void) const
Get flag for usage designations of DSO for their labels instead common names.
void setOpenClusterColor(const Vec3f &c)
Set the color used to draw the open star cluster symbols.
void setDesignationUsage(const bool flag)
Set flag for usage designations of DSO for their labels instead common names.
virtual QString getName() const
Gets a user-displayable name of the object category.
void setLabelsAmount(double a)
Set the amount of nebulae labels.
double labelsAmount
The amount of labels (between 0 and 10)
void setGalaxyColor(const Vec3f &c)
Set the color used to draw the galaxy symbols (ellipses).
void setGlobularClusterColor(const Vec3f &c)
Set the color used to draw the globular star cluster symbols.
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...
const Vec3f getHydrogenRegionColor(void) const
Get current value of the hydrogen region symbol color.
const Vec3f getDarkNebulaColor(void) const
Get current value of the dark nebula color.
const Vec3f getPlanetaryNebulaColor(void) const
Get current value of the planetary nebula circle color.
QSharedPointer< StelTexture > StelTextureSP
Use shared pointer to simplify memory managment.
void setPossiblePlanetaryNebulaColor(const Vec3f &c)
Set the color used to draw the possible planetary nebulae symbols.
const Vec3f getClusterWithNebulosityColor(void) const
Get current value of the cluster associated with nebulosity color.
bool getFlagUseTypeFilters(void) const
Get value of flag used to turn on and off DSO type filtering.
const Vec3f getBrightNebulaColor(void) const
Get current value of the nebula circle color.
void setSupernovaRemnantColor(const Vec3f &c)
Set the color used to draw the supernova remnant symbols.
void setDarkNebulaColor(const Vec3f &c)
Set the color used to draw the dark nebula symbols (gray boxes).
virtual QString getStelObjectType() const
Returns the name that will be returned by StelObject::getType() for the objects this module manages...
virtual void draw(StelCore *core)
Draws all nebula objects.
const Vec3f getReflectionNebulaColor(void) const
Get current value of the reflection nebula circle color.
Manage a collection of nebulae.
void setLabelsColor(const Vec3f &c)
Set the color used to draw nebula labels.
void setActiveGalaxyColor(const Vec3f &c)
Set the color used to draw the active galaxy symbols (ellipses).
const Vec3f getGlobularClusterColor(void) const
Get current value of the globular star cluster symbol color.
const Vec3f getMolecularCloudColor(void) const
Get current value of the molecular cloud symbol color.
void setFlagUseTypeFilters(bool b)
Set flag used to turn on and off DSO type filtering.
void flagHintsDisplayedChanged(bool b)
Emitted when hints are toggled.
const Vec3f getGalaxyColor(void) const
Get current value of the galaxy symbol color.