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 flagSurfaceBrightnessUsage
79 NOTIFY flagSurfaceBrightnessUsageChanged
84 NOTIFY labelsAmountChanged
89 NOTIFY hintsAmountChanged
91 Q_PROPERTY(
bool flagDesignationLabels
94 NOTIFY designationUsageChanged
97 Q_PROPERTY(
Vec3f labelsColor
100 NOTIFY labelsColorChanged
102 Q_PROPERTY(
Vec3f circlesColor
105 NOTIFY circlesColorChanged
107 Q_PROPERTY(
Vec3f galaxiesColor
110 NOTIFY galaxiesColorChanged
112 Q_PROPERTY(
Vec3f activeGalaxiesColor
115 NOTIFY activeGalaxiesColorChanged
117 Q_PROPERTY(
Vec3f radioGalaxiesColor
120 NOTIFY radioGalaxiesColorChanged
122 Q_PROPERTY(
Vec3f interactingGalaxiesColor
125 NOTIFY interactingGalaxiesColorChanged
127 Q_PROPERTY(
Vec3f quasarsColor
130 NOTIFY quasarsColorChanged
132 Q_PROPERTY(
Vec3f possibleQuasarsColor
135 NOTIFY possibleQuasarsColorChanged
137 Q_PROPERTY(
Vec3f clustersColor
140 NOTIFY clustersColorChanged
142 Q_PROPERTY(
Vec3f openClustersColor
145 NOTIFY openClustersColorChanged
147 Q_PROPERTY(
Vec3f globularClustersColor
150 NOTIFY globularClustersColorChanged
152 Q_PROPERTY(
Vec3f stellarAssociationsColor
155 NOTIFY stellarAssociationsColorChanged
157 Q_PROPERTY(
Vec3f starCloudsColor
160 NOTIFY starCloudsColorChanged
162 Q_PROPERTY(
Vec3f starsColor
165 NOTIFY starsColorChanged
167 Q_PROPERTY(
Vec3f nebulaeColor
170 NOTIFY nebulaeColorChanged
172 Q_PROPERTY(
Vec3f planetaryNebulaeColor
175 NOTIFY planetaryNebulaeColorChanged
177 Q_PROPERTY(
Vec3f darkNebulaeColor
180 NOTIFY darkNebulaeColorChanged
182 Q_PROPERTY(
Vec3f reflectionNebulaeColor
185 NOTIFY reflectionNebulaeColorChanged
187 Q_PROPERTY(
Vec3f bipolarNebulaeColor
190 NOTIFY bipolarNebulaeColorChanged
192 Q_PROPERTY(
Vec3f emissionNebulaeColor
195 NOTIFY emissionNebulaeColorChanged
197 Q_PROPERTY(
Vec3f possiblePlanetaryNebulaeColor
200 NOTIFY possiblePlanetaryNebulaeColorChanged
202 Q_PROPERTY(
Vec3f protoplanetaryNebulaeColor
205 NOTIFY protoplanetaryNebulaeColorChanged
207 Q_PROPERTY(
Vec3f clusterWithNebulosityColor
210 NOTIFY clusterWithNebulosityColorChanged
212 Q_PROPERTY(
Vec3f hydrogenRegionsColor
215 NOTIFY hydrogenRegionsColorChanged
217 Q_PROPERTY(
Vec3f interstellarMatterColor
220 NOTIFY interstellarMatterColorChanged
222 Q_PROPERTY(
Vec3f emissionObjectsColor
225 NOTIFY emissionObjectsColorChanged
227 Q_PROPERTY(
Vec3f molecularCloudsColor
230 NOTIFY molecularCloudsColorChanged
232 Q_PROPERTY(
Vec3f blLacObjectsColor
235 NOTIFY blLacObjectsColorChanged
237 Q_PROPERTY(
Vec3f blazarsColor
240 NOTIFY blazarsColorChanged
242 Q_PROPERTY(
Vec3f youngStellarObjectsColor
245 NOTIFY youngStellarObjectsColorChanged
247 Q_PROPERTY(
Vec3f supernovaRemnantsColor
250 NOTIFY supernovaRemnantsColorChanged
255 virtual ~NebulaMgr();
272 virtual
void update(
double deltaTime) {hintsFader.update((
int)(deltaTime*1000)); flagShow.update((
int)(deltaTime*1000));}
300 virtual QStringList
listMatchingObjects(
const QString& objPrefix,
int maxNbItem=5,
bool useStartOfWords=
false,
bool inEnglish=
false)
const;
304 virtual QString getName()
const {
return "Deep-sky objects"; }
309 bool objectInDisplayedCatalog(NebulaP n);
322 void setCatalogFilters(Nebula::CatalogGroup cflags);
323 Nebula::CatalogGroup getCatalogFilters()
const {
return Nebula::catalogFilters; }
325 void setTypeFilters(Nebula::TypeGroup tflags);
326 Nebula::TypeGroup getTypeFilters()
const {
return Nebula::typeFilters; }
660 void setFlagSurfaceBrightnessUsage(
const bool usage) {
if(usage!=Nebula::surfaceBrightnessUsage){ Nebula::surfaceBrightnessUsage=usage; emit flagSurfaceBrightnessUsageChanged(usage);}}
709 void hintsProportionalChanged(
bool b);
710 void designationUsageChanged(
bool b);
711 void flagSurfaceBrightnessUsageChanged(
bool b);
712 void labelsAmountChanged(
double a);
713 void hintsAmountChanged(
double f);
715 void labelsColorChanged(
const Vec3f & color)
const;
716 void circlesColorChanged(
const Vec3f & color)
const;
717 void galaxiesColorChanged(
const Vec3f & color)
const;
718 void activeGalaxiesColorChanged(
const Vec3f & color)
const;
719 void radioGalaxiesColorChanged(
const Vec3f & color)
const;
720 void interactingGalaxiesColorChanged(
const Vec3f & color)
const;
721 void quasarsColorChanged(
const Vec3f & color)
const;
722 void possibleQuasarsColorChanged(
const Vec3f & color)
const;
723 void clustersColorChanged(
const Vec3f & color)
const;
724 void openClustersColorChanged(
const Vec3f & color)
const;
725 void globularClustersColorChanged(
const Vec3f & color)
const;
726 void stellarAssociationsColorChanged(
const Vec3f & color)
const;
727 void starCloudsColorChanged(
const Vec3f & color)
const;
728 void starsColorChanged(
const Vec3f & color)
const;
729 void nebulaeColorChanged(
const Vec3f & color)
const;
730 void planetaryNebulaeColorChanged(
const Vec3f & color)
const;
731 void darkNebulaeColorChanged(
const Vec3f & color)
const;
732 void reflectionNebulaeColorChanged(
const Vec3f & color)
const;
733 void bipolarNebulaeColorChanged(
const Vec3f & color)
const;
734 void emissionNebulaeColorChanged(
const Vec3f & color)
const;
735 void possiblePlanetaryNebulaeColorChanged(
const Vec3f & color)
const;
736 void protoplanetaryNebulaeColorChanged(
const Vec3f & color)
const;
737 void clusterWithNebulosityColorChanged(
const Vec3f & color)
const;
738 void hydrogenRegionsColorChanged(
const Vec3f & color)
const;
739 void interstellarMatterColorChanged(
const Vec3f & color)
const;
740 void emissionObjectsColorChanged(
const Vec3f & color)
const;
741 void molecularCloudsColorChanged(
const Vec3f & color)
const;
742 void blLacObjectsColorChanged(
const Vec3f & color)
const;
743 void blazarsColorChanged(
const Vec3f & color)
const;
744 void youngStellarObjectsColorChanged(
const Vec3f & color)
const;
745 void supernovaRemnantsColorChanged(
const Vec3f & color)
const;
756 void updateSkyCulture(
const QString& skyCultureDir);
761 NebulaP search(
const QString& name);
764 NebulaP search(
const Vec3d& pos);
772 void loadNebulaSet(
const QString& setName);
777 NebulaP searchDSO(
unsigned int DSO);
778 NebulaP searchM(
unsigned int M);
779 NebulaP searchNGC(
unsigned int NGC);
780 NebulaP searchIC(
unsigned int IC);
781 NebulaP searchC(
unsigned int C);
782 NebulaP searchB(
unsigned int B);
783 NebulaP searchSh2(
unsigned int Sh2);
784 NebulaP searchVdB(
unsigned int VdB);
785 NebulaP searchRCW(
unsigned int RCW);
786 NebulaP searchLDN(
unsigned int LDN);
787 NebulaP searchLBN(
unsigned int LBN);
788 NebulaP searchCr(
unsigned int Cr);
789 NebulaP searchMel(
unsigned int Mel);
790 NebulaP searchPGC(
unsigned int PGC);
791 NebulaP searchUGC(
unsigned int UGC);
792 NebulaP searchCed(QString Ced);
795 bool loadDSOCatalog(
const QString& filename);
796 void convertDSOCatalog(
const QString& in,
const QString& out,
bool decimal);
798 bool loadDSONames(
const QString& filename);
800 QVector<NebulaP> dsoArray;
801 QHash<unsigned int, NebulaP> dsoIndex;
821 bool flagDecimalCoordinates;
824 #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 NULL.
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.
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 NULL.
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.
void setClusterWithNebulosityColor(const Vec3f &c)
Set the color used to draw the cluster associated with nebulosity symbols.
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 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.
const Vec3f getStarCloudColor(void) const
Get current value of the star cloud symbol color.
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.
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.
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.
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 setHydrogenRegionColor(const Vec3f &c)
Set the color used to draw the ionized hydrogen region symbols.
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 the bodies of the solar system.
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.
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.
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.
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 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.