Stellarium 0.13.3
List of all members | Public Slots | Public Member Functions | Properties
NebulaMgr Class Reference

Manage a collection of nebulae. More...

#include <NebulaMgr.hpp>

Public Slots

void setCirclesColor (const Vec3f &c)
 Set the color used to draw the nebula symbols (circles, boxes. More...
 
const Vec3fgetCirclesColor (void) const
 Get current value of the nebula circle color. More...
 
void setCircleScale (float scale)
 Set Nebulae Hints circle scale. More...
 
float getCircleScale (void) const
 Get Nebulae Hints circle scale. More...
 
void setHintsFadeDuration (float duration)
 Set how long it takes for nebula hints to fade in and out when turned on and off. More...
 
void setFlagHints (bool b)
 Set flag for displaying Nebulae Hints. More...
 
bool getFlagHints (void) const
 Get flag for displaying Nebulae Hints. More...
 
void setHintsProportional (const bool proportional)
 Set whether hints (symbols) should be scaled according to nebula size. More...
 
bool getHintsProportional (void) const
 Get whether hints (symbols) are scaled according to nebula size. More...
 
void setFlagShow (bool b)
 Set flag used to turn on and off Nebula rendering. More...
 
bool getFlagShow (void) const
 Get value of flag used to turn on and off Nebula rendering. More...
 
void setLabelsColor (const Vec3f &c)
 Set the color used to draw nebula labels. More...
 
const Vec3fgetLabelsColor (void) const
 Get current value of the nebula label color. More...
 
void setLabelsAmount (float a)
 Set the amount of nebulae labels. More...
 
float getLabelsAmount (void) const
 Get the amount of nebulae labels. More...
 
void setHintsAmount (float f)
 Set the amount of nebulae hints. More...
 
float getHintsAmount (void) const
 Get the amount of nebulae labels. More...
 

Public Member Functions

virtual void init ()
 Initialize the NebulaMgr object. More...
 
virtual void draw (StelCore *core)
 Draws all nebula objects. More...
 
virtual void update (double deltaTime)
 Update state which is time dependent. More...
 
virtual double getCallOrder (StelModuleActionName actionName) const
 Determines the order in which the various modules are drawn. More...
 
virtual QList< StelObjectPsearchAround (const Vec3d &v, double limitFov, const StelCore *core) const
 Used to get a vector of objects which are near to some position. More...
 
virtual StelObjectP searchByNameI18n (const QString &nameI18n) const
 Return the matching nebula object's pointer if exists or NULL. More...
 
virtual StelObjectP searchByName (const QString &name) const
 Return the matching nebula if exists or NULL. More...
 
virtual QStringList listMatchingObjectsI18n (const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false) const
 Find and return the list of at most maxNbItem objects auto-completing the passed object I18n name. More...
 
virtual QStringList listMatchingObjects (const QString &objPrefix, int maxNbItem=5, bool useStartOfWords=false) const
 Find and return the list of at most maxNbItem objects auto-completing the passed object English name. More...
 
virtual QStringList listAllObjects (bool inEnglish) const
 
virtual QStringList listAllObjectsByType (const QString &objType, bool inEnglish) const
 
virtual QString getName () const
 
float computeMaxMagHint (const class StelSkyDrawer *skyDrawer) const
 Compute the maximum magntiude for which hints will be displayed. More...
 
- Public Member Functions inherited from StelModule
virtual void deinit ()
 Called before the module will be delete, and before the openGL context is suppressed. More...
 
virtual QString getModuleVersion () const
 Get the version of the module, default is stellarium main version. More...
 
virtual QString getAuthorName () const
 Get the name of the module author. More...
 
virtual QString getAuthorEmail () const
 Get the email adress of the module author. More...
 
virtual void handleMouseClicks (class QMouseEvent *)
 Handle mouse clicks. More...
 
virtual void handleMouseWheel (class QWheelEvent *)
 Handle mouse wheel. More...
 
virtual bool handleMouseMoves (int x, int y, Qt::MouseButtons b)
 Handle mouse moves. More...
 
virtual void handleKeys (class QKeyEvent *e)
 Handle key events. More...
 
virtual bool handlePinch (qreal scale, bool started)
 Handle pinch gesture events. More...
 
virtual bool configureGui (bool show=true)
 Detect or show the configuration GUI elements for the module. More...
 

Properties

bool flagHintDisplayed
 

Additional Inherited Members

- Public Types inherited from StelModule
enum  StelModuleSelectAction { AddToSelection, ReplaceSelection, RemoveFromSelection }
 Enum used when selecting objects to define whether to add to, replace, or remove from the existing selection list. More...
 
enum  StelModuleActionName {
  ActionDraw, ActionUpdate, ActionHandleMouseClicks, ActionHandleMouseMoves,
  ActionHandleKeys
}
 Define the possible action for which an order is defined. More...
 
- Protected Member Functions inherited from StelModule
class StelActionaddAction (const QString &id, const QString &groupId, const QString &text, QObject *target, const char *slot, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action to the StelActionMgr object. More...
 
class StelActionaddAction (const QString &id, const QString &groupId, const QString &text, const char *slot, const QString &shortcut="", const QString &altShortcut="")
 convenience methods to add an action to the StelActionMgr object. More...
 

Detailed Description

Manage a collection of nebulae.

This class is used to display the NGC catalog with information, and textures for some of them.

Definition at line 48 of file NebulaMgr.hpp.

Member Function Documentation

float NebulaMgr::computeMaxMagHint ( const class StelSkyDrawer skyDrawer) const

Compute the maximum magntiude for which hints will be displayed.

virtual void NebulaMgr::draw ( StelCore core)
virtual

Draws all nebula objects.

Reimplemented from StelModule.

virtual double NebulaMgr::getCallOrder ( StelModuleActionName  actionName) const
virtual

Determines the order in which the various modules are drawn.

Reimplemented from StelModule.

float NebulaMgr::getCircleScale ( void  ) const
slot

Get Nebulae Hints circle scale.

const Vec3f& NebulaMgr::getCirclesColor ( void  ) const
slot

Get current value of the nebula circle color.

bool NebulaMgr::getFlagHints ( void  ) const
inlineslot

Get flag for displaying Nebulae Hints.

Definition at line 142 of file NebulaMgr.hpp.

bool NebulaMgr::getFlagShow ( void  ) const
inlineslot

Get value of flag used to turn on and off Nebula rendering.

Definition at line 152 of file NebulaMgr.hpp.

float NebulaMgr::getHintsAmount ( void  ) const
inlineslot

Get the amount of nebulae labels.

The real amount is also proportional with FOV.

Returns
the amount between 0 and 10. 0 is no hints, 10 is maximum of hints

Definition at line 178 of file NebulaMgr.hpp.

bool NebulaMgr::getHintsProportional ( void  ) const
slot

Get whether hints (symbols) are scaled according to nebula size.

float NebulaMgr::getLabelsAmount ( void  ) const
inlineslot

Get the amount of nebulae labels.

The real amount is also proportional with FOV.

Returns
the amount between 0 and 10. 0 is no labels, 10 is maximum of labels

Definition at line 170 of file NebulaMgr.hpp.

const Vec3f& NebulaMgr::getLabelsColor ( void  ) const
slot

Get current value of the nebula label color.

virtual void NebulaMgr::init ( )
virtual

Initialize the NebulaMgr object.

  • Load the font into the Nebula class, which is used to draw Nebula labels.
  • Load the texture used to draw nebula locations into the Nebula class (for those with no individual texture).
  • Load the pointer texture.
  • Set flags values from ini parser which relate to nebula display.
  • call updateI18n() to translate names.

Implements StelModule.

virtual QStringList NebulaMgr::listAllObjects ( bool  inEnglish) const
virtual
Note
Loading deep-sky objects with the proper names only.

Implements StelObjectModule.

virtual QStringList NebulaMgr::listMatchingObjects ( const QString &  objPrefix,
int  maxNbItem = 5,
bool  useStartOfWords = false 
) const
virtual

Find and return the list of at most maxNbItem objects auto-completing the passed object English name.

Parameters
objPrefixthe case insensitive first letters of the searched object
maxNbItemthe maximum number of returned object names
useStartOfWordsthe autofill mode for returned objects names
Returns
a list of matching object name by order of relevance, or an empty list if nothing match

Implements StelObjectModule.

virtual QStringList NebulaMgr::listMatchingObjectsI18n ( const QString &  objPrefix,
int  maxNbItem = 5,
bool  useStartOfWords = false 
) const
virtual

Find and return the list of at most maxNbItem objects auto-completing the passed object I18n name.

Parameters
objPrefixthe case insensitive first letters of the searched object
maxNbItemthe maximum number of returned object names
useStartOfWordsthe autofill mode for returned objects names
Returns
a list of matching object name by order of relevance, or an empty list if nothing match

Implements StelObjectModule.

virtual QList<StelObjectP> NebulaMgr::searchAround ( const Vec3d v,
double  limitFov,
const StelCore core 
) const
virtual

Used to get a vector of objects which are near to some position.

Parameters
va vector representing the position in th sky around which to search for nebulae.
limitFovthe field of view around the position v in which to search for nebulae.
corethe StelCore to use for computations.
Returns
an list containing the nebulae located inside the limitFov circle around position v.

Implements StelObjectModule.

virtual StelObjectP NebulaMgr::searchByName ( const QString &  name) const
virtual

Return the matching nebula if exists or NULL.

Parameters
nameThe case in-sensistive standard program name

Implements StelObjectModule.

virtual StelObjectP NebulaMgr::searchByNameI18n ( const QString &  nameI18n) const
virtual

Return the matching nebula object's pointer if exists or NULL.

Parameters
nameI18nThe case in-sensistive nebula name or NGC M catalog name : format can be M31, M 31, NGC31, NGC 31

Implements StelObjectModule.

void NebulaMgr::setCircleScale ( float  scale)
slot

Set Nebulae Hints circle scale.

void NebulaMgr::setCirclesColor ( const Vec3f c)
slot

Set the color used to draw the nebula symbols (circles, boxes.

etc).

Parameters
cThe color of the nebula symbols
// example of usage in scripts
void NebulaMgr::setFlagHints ( bool  b)
inlineslot

Set flag for displaying Nebulae Hints.

Definition at line 140 of file NebulaMgr.hpp.

void NebulaMgr::setFlagShow ( bool  b)
inlineslot

Set flag used to turn on and off Nebula rendering.

Definition at line 150 of file NebulaMgr.hpp.

void NebulaMgr::setHintsAmount ( float  f)
inlineslot

Set the amount of nebulae hints.

The real amount is also proportional with FOV. The limit is set in function of the nebulae magnitude

Parameters
fthe amount between 0 and 10. 0 is no hints, 10 is maximum of hints

Definition at line 175 of file NebulaMgr.hpp.

void NebulaMgr::setHintsFadeDuration ( float  duration)
inlineslot

Set how long it takes for nebula hints to fade in and out when turned on and off.

Parameters
durationgiven in seconds

Definition at line 137 of file NebulaMgr.hpp.

void NebulaMgr::setHintsProportional ( const bool  proportional)
slot

Set whether hints (symbols) should be scaled according to nebula size.

void NebulaMgr::setLabelsAmount ( float  a)
inlineslot

Set the amount of nebulae labels.

The real amount is also proportional with FOV. The limit is set in function of the nebulae magnitude

Parameters
athe amount between 0 and 10. 0 is no labels, 10 is maximum of labels

Definition at line 167 of file NebulaMgr.hpp.

void NebulaMgr::setLabelsColor ( const Vec3f c)
slot

Set the color used to draw nebula labels.

Parameters
cThe color of the nebula labels
// example of usage in scripts
virtual void NebulaMgr::update ( double  deltaTime)
inlinevirtual

Update state which is time dependent.

Implements StelModule.

Definition at line 74 of file NebulaMgr.hpp.


The documentation for this class was generated from the following file: